diff --git a/app/Classes/Modules/PackingLists/Processors/FetchPackingListsFromYdPortalProcessor.php b/app/Classes/Modules/PackingLists/Processors/FetchPackingListsFromYdPortalProcessor.php index 563a2712..d376878d 100644 --- a/app/Classes/Modules/PackingLists/Processors/FetchPackingListsFromYdPortalProcessor.php +++ b/app/Classes/Modules/PackingLists/Processors/FetchPackingListsFromYdPortalProcessor.php @@ -138,7 +138,13 @@ class FetchPackingListsFromYdPortalProcessor $receiveDate = Carbon::parse(substr(preg_replace("/[^0-9]/", "", $row->expressno), 0, 8)); - $customerno = preg_split('(-|\(|\)|\/)', $row->customerno); + $customerno = $row->customerno; + // Check if $customerno contains '正确唛头YD' and extract the part after it + if (strpos($customerno, '正确唛头YD') !== false) { + $customerno = explode('正确唛头YD', $customerno)[1]; + } + + $customerno = preg_split('/[-()\/]/', $customerno); $orderNumber = $customerno[array_key_last($customerno)]; $allow_contract = true;