fix fetch from vt

This commit is contained in:
omair saleh
2022-04-14 13:14:47 +08:00
parent f55a57c222
commit 7fc4568fbf
@@ -200,14 +200,14 @@ class FetchWarehouseReceiveListFromVTPortalProcessor
/** @var Transport $transport */
$transport = $packingList->transports()->first();
if(!$packingList) {
$packingList = $this->createPackingListProcessor->execute($packingListObject, $order);
$transportObject = new TransportObject(TransportType::LAND, null, $tracking, Carbon::parse($receiveDate), Carbon::parse($receiveDate), ApprovalStatus::APPROVED);
$transport = $this->createsTransport->execute($transportObject, $packingList);
}
if($transport) $transport->schedules()->update(['status' => ApprovalStatus::EXPIRED]);
$transport->schedules()->update(['status' => ApprovalStatus::EXPIRED]);
$this->createsSchedule->execute($transport, new ScheduleObject(Carbon::parse($receiveDate), Carbon::parse($receiveDate), ApprovalStatus::APPROVED));