Added notification in sticker order reprint
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 14s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 12s
Laravel Larastan / larastan (pull_request) Failing after 4m43s
Laravel Pint / pint (pull_request) Successful in 3m16s

This commit is contained in:
dhanabalan
2026-10-20 11:21:17 +05:30
parent ab6a3b7c5c
commit 93092f45fe

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