Added logic for total received quantity in process order
This commit is contained in:
@@ -606,6 +606,13 @@ class PdfController extends Controller
|
||||
$lastRecord = $processOrderRecords->first();
|
||||
$item = $lastRecord->item;
|
||||
|
||||
if ($totalReceivedQty == $proOrdAgPlant->order_quantity) {
|
||||
return response()->json([
|
||||
'status_code' => 'ERROR',
|
||||
'status_description' => "Process order '{$processOrder}' for plant '{$plantCode}' has already reached its order quantity."
|
||||
], 400);
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
'item_code' => $item?->code ?? "",
|
||||
'description' => $item?->description ?? "",
|
||||
|
||||
Reference in New Issue
Block a user