Added validation for sticker order reprint
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 16s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 12s
Laravel Pint / pint (pull_request) Successful in 3m16s
Laravel Larastan / larastan (pull_request) Failing after 5m47s

This commit is contained in:
dhanabalan
2026-10-04 16:00:40 +05:30
parent 799102362a
commit 36355bd9c8

View File

@@ -986,6 +986,22 @@ class StickerOrderReprint extends Page implements HasForms
return;
}
$stickerOrderExist = StickerOrder::where('plant_id', $plantId)
->where('item_id',$itemCharacteristicId)
->where('sticker_id', $stickerId)
->where('production_order', $pOrder)
->first();
if (!$stickerOrderExist) {
Notification::make()
->danger()
->title('Invalid Sticker Reprint')
->body("No records found for sticker reprint in the sticker order for sticker ID '{$stickerId}'.")
->send();
return;
}
$itemCode = Item::where('id',$itemCharacteristicId)->where('plant_id',$plantId)->value('code');
if (!$itemCode) {
@@ -1005,13 +1021,13 @@ class StickerOrderReprint extends Page implements HasForms
Notification::make()
->danger()
->title('Sticker Details Not Found')
->body('No sticker details configured for the selected sticker.')
->body("No sticker details configured for the selected sticker.")
->send();
return;
}
//..
//..
$matchedMachineId = null;