altered logic for total quantity in wire master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 18s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 21s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Larastan / larastan (pull_request) Failing after 3m47s
Laravel Pint / pint (pull_request) Successful in 4m34s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 18s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 21s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Larastan / larastan (pull_request) Failing after 3m47s
Laravel Pint / pint (pull_request) Successful in 4m34s
This commit is contained in:
@@ -250,10 +250,12 @@ class CreateWireMasterPacking extends CreateRecord
|
|||||||
->selectRaw('SUM(CAST(weight AS NUMERIC)) as total_weight')
|
->selectRaw('SUM(CAST(weight AS NUMERIC)) as total_weight')
|
||||||
->value('total_weight');
|
->value('total_weight');
|
||||||
|
|
||||||
$totalQty = (float)$alreadyScannedQty + (float)$weight;
|
$totalQty = round((float)$alreadyScannedQty + (float)$weight, 3);
|
||||||
|
|
||||||
if($totalQty > (float)$customerPoRecord->quantity)
|
|
||||||
|
if($totalQty > round((float)$customerPoRecord->quantity, 3))
|
||||||
{
|
{
|
||||||
|
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->title("Scanned Weight Exceeds PO Quantity")
|
->title("Scanned Weight Exceeds PO Quantity")
|
||||||
->body("Scanned weight '$weight' and already scanned weight '$alreadyScannedQty' exceeds allowed quantity '{$customerPoRecord->quantity}' for PO '$customerPoRecord->customer_po' and Item '$materialCode'")
|
->body("Scanned weight '$weight' and already scanned weight '$alreadyScannedQty' exceeds allowed quantity '{$customerPoRecord->quantity}' for PO '$customerPoRecord->customer_po' and Item '$materialCode'")
|
||||||
|
|||||||
Reference in New Issue
Block a user