Changed logic in create wire master packing #600
@@ -83,7 +83,8 @@ class CreateWireMasterPacking extends CreateRecord
|
|||||||
}
|
}
|
||||||
|
|
||||||
// $pattern = '/^([^|]+)\|([^|]+)\|(\d+(\.\d+)?)$/';
|
// $pattern = '/^([^|]+)\|([^|]+)\|(\d+(\.\d+)?)$/';
|
||||||
$pattern = '/^([^|]+)\|([^|]+)\|([^|]+)\|(\d+(\.\d+)?)$/';
|
// $pattern = '/^([^|]+)\|([^|]+)\|([^|]+)\|(\d+(\.\d+)?)$/';
|
||||||
|
$pattern = '/^([^|]+)\|([^|]+)\|([^|]+)\|(\d+(\.\d+)?)(kg)?$/i';
|
||||||
|
|
||||||
if (!preg_match($pattern, $processOrder, $matches))
|
if (!preg_match($pattern, $processOrder, $matches))
|
||||||
{
|
{
|
||||||
@@ -108,7 +109,8 @@ class CreateWireMasterPacking extends CreateRecord
|
|||||||
|
|
||||||
$materialCode = $matches[1];
|
$materialCode = $matches[1];
|
||||||
$processOrderId = $matches[2];
|
$processOrderId = $matches[2];
|
||||||
$weight = $matches[3];
|
$coilNo = $matches[3];
|
||||||
|
$weight = $matches[4];
|
||||||
|
|
||||||
$icode = Item::where('code', $materialCode)->first();
|
$icode = Item::where('code', $materialCode)->first();
|
||||||
|
|
||||||
@@ -256,7 +258,7 @@ class CreateWireMasterPacking extends CreateRecord
|
|||||||
'plant_id' => $plantId,
|
'plant_id' => $plantId,
|
||||||
'item_id' => $itemId,
|
'item_id' => $itemId,
|
||||||
'wire_packing_number' => $wirePackNo,
|
'wire_packing_number' => $wirePackNo,
|
||||||
'process_order' => $processOrderId,
|
'process_order' => $processOrderId . '-' . $coilNo,
|
||||||
'customer_po_master_id' => $customerPo,
|
'customer_po_master_id' => $customerPo,
|
||||||
'weight' => $weight,
|
'weight' => $weight,
|
||||||
'created_by' => $createdBy,
|
'created_by' => $createdBy,
|
||||||
|
|||||||
Reference in New Issue
Block a user