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
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:
@@ -277,15 +277,14 @@ class StickerOrderReprint extends Page implements HasForms
|
|||||||
$plantId = $get('plant_id');
|
$plantId = $get('plant_id');
|
||||||
$machineId = $get('machine_id');
|
$machineId = $get('machine_id');
|
||||||
|
|
||||||
$record = ClassCharacteristic::where('plant_id', $plantId)
|
$record = ClassCharacteristic::where('plant_id', $plantId)->where('machine_id', $machineId)->where('gernr', $state)->first();
|
||||||
->where('machine_id', $machineId)
|
|
||||||
->where('gernr', $state)
|
|
||||||
->first();
|
|
||||||
|
|
||||||
if (! $record) {
|
if (! $record) {
|
||||||
|
$plantName = Plant::find($plantId)?->name;
|
||||||
|
$machineName = Machine::find($machineId)?->work_center;
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->title('Serial Number Not Found')
|
->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()
|
->danger()
|
||||||
->send();
|
->send();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user