mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into delivery-complete-button-ui
This commit is contained in:
@@ -69,7 +69,7 @@ class CreateOrderLogic extends AbstractControllerLogic
|
||||
$originWarehouse = $originWarehouse->reference === WarehouseReferences::VT_GUANG_ZHOU ? $this->fetchesCompanyModule->execute(['reference' => in_array($company->id, [2376]) ? WarehouseReferences::VT_GUANG_ZHOU : WarehouseReferences::YD_GUANG_ZHOU]) : $this->fetchesCompanyModule->execute(['reference' => WarehouseReferences::YD_YIWU]);
|
||||
|
||||
if($originWarehouse->reference === WarehouseReferences::YD_YIWU && in_array($address->state_id, [5, 13, 14])) {
|
||||
throw new RequestValidationException('Our Yiwu warehouse is unable to ship goods to Sabah & Sarawak at the moment due to the chinese new year\'s holiday. you can select our Guangzhou warehouse as an alternative.');
|
||||
throw new RequestValidationException('Our Yiwu warehouse is unable to ship goods to Sabah & Sarawak at the moment. you can select our Guangzhou warehouse as an alternative.');
|
||||
}
|
||||
|
||||
$order = $this->createOrderProcessor->execute($company, $originWarehouse, $address, $this->generatesOrderNumber->execute());
|
||||
|
||||
@@ -100,8 +100,7 @@ class AssignPackingListOrderLogic extends AbstractControllerLogic
|
||||
{
|
||||
$warehouse_packing_list = $this->fetchesPackingList->execute([
|
||||
'id' => $request->route('id'),
|
||||
'type' => PackingListType::WAREHOUSE_RECEIVE_LIST,
|
||||
'status' => ApprovalStatus::REJECTED
|
||||
'type' => PackingListType::WAREHOUSE_RECEIVE_LIST
|
||||
]);
|
||||
|
||||
$order = $this->fetchesOrder->execute(['reference' => $request->route('reference')]);
|
||||
@@ -129,8 +128,7 @@ class AssignPackingListOrderLogic extends AbstractControllerLogic
|
||||
|
||||
$packing_list = $this->fetchesPackingList->execute([
|
||||
'reference' => $warehouse_packing_list->reference,
|
||||
'type' => PackingListType::SHIPPING_PACKING_LIST,
|
||||
'status' => ApprovalStatus::PENDING_VERIFICATION
|
||||
'type' => PackingListType::SHIPPING_PACKING_LIST
|
||||
]);
|
||||
|
||||
$warehouse_packing_list = $this->updatesPackingListOwner->execute($packing_list, $order);
|
||||
|
||||
+15
-2
@@ -269,7 +269,7 @@ class FetchOrderListsFromYdPortalProcessor
|
||||
$this->unityAssignContractEntity->execute($supervisorContractEntity->hash_id, $contractObligations);
|
||||
}
|
||||
|
||||
$packingListObject = new PackingListObject($packingListReference, $appointee_id, PackingListType::SHIPPING_PACKING_LIST, ApprovalStatus::PENDING_VERIFICATION, !$allow_contract ? null : $contractReference);
|
||||
$packingListObject = new PackingListObject($packingListReference, $appointee_id, PackingListType::SHIPPING_PACKING_LIST, ApprovalStatus::SUSPENDED, !$allow_contract ? null : $contractReference);
|
||||
|
||||
/** @var PackingList $packingList */
|
||||
$packingList = $this->createPackingListProcessor->execute($packingListObject, $order);
|
||||
@@ -326,7 +326,8 @@ class FetchOrderListsFromYdPortalProcessor
|
||||
/** @var Container $container */
|
||||
$container = $this->createContainerProcessor->execute($containerObject, $originWarehouse);
|
||||
|
||||
$container->packingLists()->attach($packingList);
|
||||
$container->packingLists()->detach($packingList);
|
||||
$container->packingLists()->attach($packingList);
|
||||
|
||||
$transport = $container->transports()->first();
|
||||
|
||||
@@ -338,6 +339,18 @@ class FetchOrderListsFromYdPortalProcessor
|
||||
}
|
||||
}
|
||||
|
||||
if($delayDate){
|
||||
|
||||
$transport = $container->transports()->first();
|
||||
|
||||
if(!$transport->schedules()->where('eta', '=', $delayDate)->first()) {
|
||||
$etd = $transport->schedules()->where('status', '=', ApprovalStatus::APPROVED)->first()->etd;
|
||||
$transport->schedules()->update(['status' => ApprovalStatus::EXPIRED]);
|
||||
$this->createsSchedule->execute($transport, new ScheduleObject($etd, $delayDate, ApprovalStatus::APPROVED));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if($unstuffingDate && $container->status !== ApprovalStatus::COMPLETED){
|
||||
$container->update(['status' => ApprovalStatus::COMPLETED]);
|
||||
$container->transports()->first()->update(['drop_date' => $unstuffingDate, 'status' => ApprovalStatus::COMPLETED]);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row align-items-center p-t-5 p-b-5">
|
||||
<div class="col-auto p-r-0">
|
||||
<div class="col-auto p-r-0" v-if="!$store.getters.isAdmin">
|
||||
<div class="padding-5 lh-25 btn-rounded bg-white" v-if="item.type === 0">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
|
||||
width="30" height="30"
|
||||
@@ -22,19 +22,19 @@
|
||||
<p class="no-margin all-caps fs-10 light">Arrival Date</p>
|
||||
<p class="no-margin text-success bold">{{item.transport ? item.transport.drop_date : 'n/a'}}</p>
|
||||
</div>
|
||||
<div class="col-auto text-center">
|
||||
<div class="col-auto p-l-0 p-r-0 text-center">
|
||||
<p class="no-margin all-caps fs-10 light">Qty</p>
|
||||
<p class="no-margin bold">{{item.quantity}}</p>
|
||||
</div>
|
||||
<div class="col-auto" v-if="!$store.getters.isAdmin">
|
||||
<div class="col-auto">
|
||||
<p class="no-margin all-caps fs-10 light">Est. CBM</p>
|
||||
<p class="no-margin">{{((parseFloat(item.cbm) * 1000) / 1000).toFixed(3)}}</p>
|
||||
</div>
|
||||
<div class="col-auto" v-if="$store.getters.isAdmin">
|
||||
<div class="col" v-if="$store.getters.isAdmin">
|
||||
<p class="no-margin all-caps fs-10 light">Warehouse</p>
|
||||
<p class="no-margin">{{item.order.warehouse.reference}}</p>
|
||||
</div>
|
||||
<div class="col text-right">
|
||||
<div class="col-auto text-right">
|
||||
<div class="btn btn-xs btn-default" @click="expanded = !expanded"><i class="fa" :class="{'fa-angle-up': expanded, 'fa-angle-down': !expanded}"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@extends('layouts.base_portal')
|
||||
@section('inner_content')
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<div class="col-5">
|
||||
<list-component section="warehouseListSection" :endpoint="route('api.packing_list.list')" :options="{packing_list_type: 1, packing_list_status: 2, per_page: 20, order_by: {column: 'arrival_date', DESC: true}, with_arrival_date: true}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<parcel-component v-for="packages in data.packages" :data="packages" :key="packages.id"></parcel-component>
|
||||
|
||||
Reference in New Issue
Block a user