Merge pull request 'Added machine id checking validation in bulk sticker printing page' (#1253) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Reviewed-on: #1253
This commit was merged in pull request #1253.
This commit is contained in:
@@ -1008,24 +1008,26 @@ class BulkStickerPrinting extends Page implements HasForms
|
|||||||
|
|
||||||
$matchedMachineId = null;
|
$matchedMachineId = null;
|
||||||
|
|
||||||
for ($i = 1; $i <= 8; $i++) {
|
// for ($i = 1; $i <= 8; $i++) {
|
||||||
|
|
||||||
$machineColumn = "sticker{$i}_machine_id";
|
// $machineColumn = "sticker{$i}_machine_id";
|
||||||
|
|
||||||
if ((string) $stickerMappingMasterItem->{$machineColumn} == (string) $machineId) {
|
// if ((string) $stickerMappingMasterItem->{$machineColumn} == (string) $machineId) {
|
||||||
|
|
||||||
$matchedMachineId = $stickerMappingMasterItem->{$machineColumn};
|
// $matchedMachineId = $stickerMappingMasterItem->{$machineColumn};
|
||||||
|
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
$matchedMachineId = StickerMappingMaster::where('plant_id', $plantId)->where('item_id', $pOrderExist->item_id)->where('sticker_structure1_id', $structure->id)->where('sticker1_machine_id', $machineId)->first();
|
||||||
|
|
||||||
if (!$matchedMachineId) {
|
if (!$matchedMachineId) {
|
||||||
|
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->danger()
|
->danger()
|
||||||
->title('Machine Not Found')
|
->title('Machine Not Found')
|
||||||
->body("Machine '{$machineId}' is not mapped for Item Code '{$itemCode}' in the selected sticker mapping.")
|
->body("Machine '{$machineId}' is not mapped for Item Code '{$itemCode}' in sticker mapping master.")
|
||||||
->send();
|
->send();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -1113,6 +1115,7 @@ class BulkStickerPrinting extends Page implements HasForms
|
|||||||
'print_status' => 'Printed',
|
'print_status' => 'Printed',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Notification::make()
|
Notification::make()
|
||||||
|
|||||||
Reference in New Issue
Block a user