1
0
forked from poc/pds

Changed logic in wire master packing for scanned quantity

This commit is contained in:
dhanabalan
2026-05-15 12:51:08 +05:30
parent 62259d4afe
commit 2431f73571

View File

@@ -250,7 +250,8 @@ class CreateWireMasterPacking extends CreateRecord
$alreadyScannedQty = WireMasterPacking::where('customer_po_master_id', $customerPo)
->where('plant_id', $plantId)
->where('item_id', $itemId)
->sum('weight');
->selectRaw('SUM(CAST(weight AS NUMERIC)) as total_weight')
->value('total_weight');
$totalQty = (float)$alreadyScannedQty + (float)$weight;