diff --git a/app/Filament/Pages/StickerOrderReprint.php b/app/Filament/Pages/StickerOrderReprint.php index 88313535..10134aef 100644 --- a/app/Filament/Pages/StickerOrderReprint.php +++ b/app/Filament/Pages/StickerOrderReprint.php @@ -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();