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
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #605
This commit was merged in pull request #605.
This commit is contained in:
@@ -247,7 +247,14 @@ class CreateWireMasterPacking extends CreateRecord
|
|||||||
return;
|
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()
|
Notification::make()
|
||||||
->title("Scanned Weight Exceeds PO Quantity")
|
->title("Scanned Weight Exceeds PO Quantity")
|
||||||
|
|||||||
Reference in New Issue
Block a user