Added duplicate logic for bulk sticker printing
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 12s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 13s
Laravel Pint / pint (pull_request) Successful in 2m47s
Laravel Larastan / larastan (pull_request) Failing after 5m2s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 12s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 13s
Laravel Pint / pint (pull_request) Successful in 2m47s
Laravel Larastan / larastan (pull_request) Failing after 5m2s
This commit is contained in:
@@ -879,6 +879,18 @@ class BulkStickerPrinting extends Page implements HasForms
|
||||
}
|
||||
}
|
||||
|
||||
$updatePrintStatusCompleted = ProductionOrder::where('plant_id', $plantId)->where('production_order', $pOrder)->where('from_serial_number', $fromSerNo)->where('to_serial_number', $toSerNo)->where('print_status', 'Printed')->first();
|
||||
|
||||
if ($updatePrintStatusCompleted) {
|
||||
Notification::make()
|
||||
->danger()
|
||||
->title('Duplicate Sticker')
|
||||
->body("Already Sticker generated successfully for Production Order '$pOrder' and plant '$plantName'.")
|
||||
->send();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$structure = StickerStructureDetail::where('sticker_id',$stickerId)->first();
|
||||
|
||||
if (!$structure) {
|
||||
@@ -1035,6 +1047,13 @@ class BulkStickerPrinting extends Page implements HasForms
|
||||
|
||||
$totalStickers = ($toSerNo - $fromSerNo) + 1;
|
||||
|
||||
$updatePrintStatus = ProductionOrder::where('plant_id', $plantId)->where('production_order', $pOrder)->where('from_serial_number', $fromSerNo)->where('to_serial_number', $toSerNo)->first();
|
||||
|
||||
if ($updatePrintStatus) {
|
||||
$updatePrintStatus->update([
|
||||
'print_status' => 'Printed',
|
||||
]);
|
||||
}
|
||||
|
||||
Notification::make()
|
||||
->success()
|
||||
|
||||
Reference in New Issue
Block a user