Merge pull request 'Added notification in sticker order reprint' (#1281) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #1281
This commit was merged in pull request #1281.
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user