Changed logic in wire master packing for scanned quantity #606

Merged
jothi merged 1 commits from ranjith-dev into master 2026-05-15 07:21:29 +00:00

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;