Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development

# Conflicts:
#	app/Classes/Modules/PackingLists/Processors/FetchOrderListsFromYdPortalProcessor.php
This commit is contained in:
omair saleh
2022-02-23 18:55:28 +08:00
parent 0f508aed3a
commit 816a40d647
@@ -30,6 +30,7 @@ use App\Classes\ValueObjects\Constants\PackageType;
use App\Classes\ValueObjects\Constants\PackingListType;
use App\Classes\ValueObjects\Constants\TransportType;
use App\Models\Container;
use App\Models\Order;
use App\Models\PackingList;
use App\Models\Transport;
use Carbon\Carbon;
@@ -296,15 +297,16 @@ class FetchOrderListsFromYdPortalProcessor
$this->createPackageProcessor->execute($packageObject, $packingList);
}
DB::commit();
$marking = $order->companyModule->inviters()->withPivot('invitee_reference')->first()->pivot->invitee_reference;
if(!in_array($marking, ['2192KAA', '2353GFE', '6866DTR', '153DSR', '1291NSC', '8288MIB'])){
$this->fetchesDataFRomYDPortal->clientRequest('http://www.yd-wl.com/api/confirmsendorder.ashx', 'GET', [
'expressno' => $row->expressno
]);
if($order instanceof Order){
$marking = $order->companyModule->inviters()->withPivot('invitee_reference')->first()->pivot->invitee_reference;
if(!in_array($marking, ['2192KAA', '2353GFE', '6866DTR', '153DSR', '1291NSC', '8288MIB'])){
$this->fetchesDataFRomYDPortal->clientRequest('http://www.yd-wl.com/api/confirmsendorder.ashx', 'GET', [
'expressno' => $row->expressno
]);
}
}
if($containerReference) {
try {
$container = $this->fetchesContainer->execute(['reference' => $containerReference]);
@@ -377,6 +379,8 @@ class FetchOrderListsFromYdPortalProcessor
$deliveryStep->update(['status' => ApprovalStatus::COMPLETED]);
}
DB::commit();
}
} catch (\Exception $exception) {
Log::debug($exception);