added received quantity logic in api

This commit is contained in:
dhanabalan
2025-11-19 13:38:20 +05:30
parent b89d96f859
commit 0be804d81c

View File

@@ -612,7 +612,7 @@ class PdfController extends Controller
// $lastRecord = $processOrderRecords->first();
$item = $lastRecord->item;
if ($totalReceivedQty == $proOrdAgPlant->order_quantity) {
if ($totalReceivedQty == $proOrdAgPlant->order_quantity || $totalReceivedQty > $proOrdAgPlant->order_quantity) {
return response()->json([
'status_code' => 'ERROR',
'status_description' => "Process order '{$processOrder}' for plant '{$plantCode}' has already reached its order quantity."