diff --git a/app/Filament/Resources/WireMasterPackingResource/Pages/CreateWireMasterPacking.php b/app/Filament/Resources/WireMasterPackingResource/Pages/CreateWireMasterPacking.php index 8ff8334..71123a5 100644 --- a/app/Filament/Resources/WireMasterPackingResource/Pages/CreateWireMasterPacking.php +++ b/app/Filament/Resources/WireMasterPackingResource/Pages/CreateWireMasterPacking.php @@ -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;