Changed logic in wire master packing for scanned quantity #606
@@ -250,7 +250,8 @@ class CreateWireMasterPacking extends CreateRecord
|
|||||||
$alreadyScannedQty = WireMasterPacking::where('customer_po_master_id', $customerPo)
|
$alreadyScannedQty = WireMasterPacking::where('customer_po_master_id', $customerPo)
|
||||||
->where('plant_id', $plantId)
|
->where('plant_id', $plantId)
|
||||||
->where('item_id', $itemId)
|
->where('item_id', $itemId)
|
||||||
->sum('weight');
|
->selectRaw('SUM(CAST(weight AS NUMERIC)) as total_weight')
|
||||||
|
->value('total_weight');
|
||||||
|
|
||||||
$totalQty = (float)$alreadyScannedQty + (float)$weight;
|
$totalQty = (float)$alreadyScannedQty + (float)$weight;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user