Added notification in sticker order reprint #1281

Merged
jothi merged 1 commits from ranjith-dev into master 2026-10-20 05:51:36 +00:00
Showing only changes of commit 93092f45fe - Show all commits

View File

@@ -277,15 +277,14 @@ class StickerOrderReprint extends Page implements HasForms
$plantId = $get('plant_id');
$machineId = $get('machine_id');
$record = ClassCharacteristic::where('plant_id', $plantId)
->where('machine_id', $machineId)
->where('gernr', $state)
->first();
$record = ClassCharacteristic::where('plant_id', $plantId)->where('machine_id', $machineId)->where('gernr', $state)->first();
if (! $record) {
$plantName = Plant::find($plantId)?->name;
$machineName = Machine::find($machineId)?->work_center;
Notification::make()
->title('Serial Number Not Found')
->body("Serial number '{$state}' was not found.")
->body("Serial number '{$state}' was not found against work center '$machineName' and plant '$plantName'.")
->danger()
->send();