Merge pull request 'Added duplicate logic for bulk sticker printing' (#1012) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s

Reviewed-on: #1012
This commit was merged in pull request #1012.
This commit is contained in:
2026-09-10 12:41:38 +00:00

View File

@@ -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()