Merge pull request 'Changed logic in bulk sticker prinitng' (#1265) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 25s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 25s
Reviewed-on: #1265
This commit was merged in pull request #1265.
This commit is contained in:
@@ -1079,9 +1079,13 @@ class BulkStickerPrinting extends Page implements HasForms
|
||||
|
||||
for ($i = 1; $i <= 8; $i++) {
|
||||
|
||||
$machineColumn = "sticker{$i}_machine_id";
|
||||
$structureColumn = "sticker_structure{$i}_id";
|
||||
|
||||
if ((string) $stickerMappingMasterItem->{$machineColumn} == (string) $machineId) {
|
||||
if (
|
||||
(string) $stickerMappingMasterItem->{$structureColumn}
|
||||
== (string) $structure->id
|
||||
) {
|
||||
$machineColumn = "sticker{$i}_machine_id";
|
||||
|
||||
$matchedMachineId = $stickerMappingMasterItem->{$machineColumn};
|
||||
|
||||
@@ -1089,6 +1093,19 @@ class BulkStickerPrinting extends Page implements HasForms
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
$matchedMachineId == null ||
|
||||
(string) $matchedMachineId != (string) $machineId
|
||||
) {
|
||||
Notification::make()
|
||||
->danger()
|
||||
->title('Machine Mapping Mismatch')
|
||||
->body("Selected machine '{$machineId}' does not match the machine mapped to the selected sticker.")
|
||||
->send();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ((string) $matchedMachineId != (string) $machineId) {
|
||||
Notification::make()
|
||||
->danger()
|
||||
|
||||
Reference in New Issue
Block a user