mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-21 13:34:08 +00:00
update packinglists from vt portal jobs and schedule
This commit is contained in:
+4
@@ -162,12 +162,14 @@ class FetchLoadedContainersFromVTPortalProcessor
|
||||
$marking = explode('/', explode('CIEF/', $packingList[13])[1]);
|
||||
|
||||
if(!array_key_exists(1, $marking)){
|
||||
Log::error('unknown order number');
|
||||
continue;
|
||||
}
|
||||
|
||||
$orderNumber = $marking[1];
|
||||
|
||||
if(!$packingList[22]){
|
||||
Log::error('no quantity');
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -175,6 +177,7 @@ class FetchLoadedContainersFromVTPortalProcessor
|
||||
/** @var Order $order */
|
||||
$order = $this->fetchesOrder->execute(['reference' => $orderNumber]);
|
||||
} catch (ResourceNotFoundException $exception){
|
||||
Log::error('order doesnt exist');
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -203,6 +206,7 @@ class FetchLoadedContainersFromVTPortalProcessor
|
||||
|
||||
/** @var PackingList $packingList */
|
||||
$packingList = $this->createPackingListProcessor->execute($packingListObject, $order);
|
||||
Log::error($packingList);
|
||||
$container->packingLists()->attach($packingList);
|
||||
|
||||
foreach($contractObligations as $obligation) {
|
||||
|
||||
@@ -21,12 +21,14 @@ class OrdersTableSeeder extends Seeder
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
FetchWarehouseReceiveListFromVTPortalJob::withChain([
|
||||
new FetchLoadedContainersFromVTPortalJob,
|
||||
new FetchPackingListFromVTPortalJob,
|
||||
new FetchContainersStatusUpdateFromVTPortalJob,
|
||||
new FetchDeliveryListFromVTPortalJob
|
||||
])->dispatch();
|
||||
FetchLoadedContainersFromVTPortalJob::dispatch();
|
||||
//
|
||||
// FetchWarehouseReceiveListFromVTPortalJob::withChain([
|
||||
// new FetchLoadedContainersFromVTPortalJob,
|
||||
// new FetchPackingListFromVTPortalJob,
|
||||
// new FetchContainersStatusUpdateFromVTPortalJob,
|
||||
// new FetchDeliveryListFromVTPortalJob
|
||||
// ])->dispatch();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user