Changed logic in create wire master packing
Some checks failed
Gemini PR Review / Gemini PR Review (pull_request) Waiting to run
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Waiting to run
Laravel Larastan / larastan (pull_request) Waiting to run
Laravel Pint / pint (pull_request) Waiting to run
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Some checks failed
Gemini PR Review / Gemini PR Review (pull_request) Waiting to run
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Waiting to run
Laravel Larastan / larastan (pull_request) Waiting to run
Laravel Pint / pint (pull_request) Waiting to run
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
This commit is contained in:
@@ -83,7 +83,8 @@ class CreateWireMasterPacking extends CreateRecord
|
||||
}
|
||||
|
||||
// $pattern = '/^([^|]+)\|([^|]+)\|(\d+(\.\d+)?)$/';
|
||||
$pattern = '/^([^|]+)\|([^|]+)\|([^|]+)\|(\d+(\.\d+)?)$/';
|
||||
// $pattern = '/^([^|]+)\|([^|]+)\|([^|]+)\|(\d+(\.\d+)?)$/';
|
||||
$pattern = '/^([^|]+)\|([^|]+)\|([^|]+)\|(\d+(\.\d+)?)(kg)?$/i';
|
||||
|
||||
if (!preg_match($pattern, $processOrder, $matches))
|
||||
{
|
||||
@@ -108,7 +109,8 @@ class CreateWireMasterPacking extends CreateRecord
|
||||
|
||||
$materialCode = $matches[1];
|
||||
$processOrderId = $matches[2];
|
||||
$weight = $matches[3];
|
||||
$coilNo = $matches[3];
|
||||
$weight = $matches[4];
|
||||
|
||||
$icode = Item::where('code', $materialCode)->first();
|
||||
|
||||
@@ -256,7 +258,7 @@ class CreateWireMasterPacking extends CreateRecord
|
||||
'plant_id' => $plantId,
|
||||
'item_id' => $itemId,
|
||||
'wire_packing_number' => $wirePackNo,
|
||||
'process_order' => $processOrderId,
|
||||
'process_order' => $processOrderId . '-' . $coilNo,
|
||||
'customer_po_master_id' => $customerPo,
|
||||
'weight' => $weight,
|
||||
'created_by' => $createdBy,
|
||||
|
||||
Reference in New Issue
Block a user