2 Commits

Author SHA1 Message Date
70441ea411 Merge pull request 'Changed logic for checking exustng weight with total quantity' (#605) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #605
2026-05-15 07:18:21 +00:00
dhanabalan
62259d4afe Changed logic for checking exustng weight with total quantity
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Has been cancelled
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Has been cancelled
Laravel Larastan / larastan (pull_request) Has been cancelled
Laravel Pint / pint (pull_request) Has been cancelled
2026-05-15 12:48:00 +05:30

View File

@@ -247,7 +247,14 @@ class CreateWireMasterPacking extends CreateRecord
return;
}
if((float)$weight > (float)$customerPoRecord->quantity)
$alreadyScannedQty = WireMasterPacking::where('customer_po_master_id', $customerPo)
->where('plant_id', $plantId)
->where('item_id', $itemId)
->sum('weight');
$totalQty = (float)$alreadyScannedQty + (float)$weight;
if($totalQty > (float)$customerPoRecord->quantity)
{
Notification::make()
->title("Scanned Weight Exceeds PO Quantity")