Merge pull request 'Changed logic in panel box validation' (#1309) 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: #1309
This commit was merged in pull request #1309.
This commit is contained in:
@@ -448,18 +448,35 @@ class PanelBoxInspectionStock extends Page
|
||||
$serialExists = PanelBoxValidation::where('plant_id', $plantId)->where('serial_number', $serialNumber)->where('panel_box_supplier', $supplier)->first();
|
||||
|
||||
if ($serialExists) {
|
||||
Notification::make()
|
||||
->title('Already Scanned In Testing')
|
||||
->body("Serial number already scanned '$serialNumber' with supplier number '$supplier'.<br>Please scan this serial number in Invoice Validation.")
|
||||
->success()
|
||||
->send();
|
||||
$this->dispatch('play-error-sound');
|
||||
$this->form->fill([
|
||||
'plant_id' => $plantId,
|
||||
'line_id' => $lineId,
|
||||
'item_id' => null,
|
||||
]);
|
||||
return;
|
||||
|
||||
if($serialExists->inspection_lot_number != '' && $serialExists->production_order != ''){
|
||||
Notification::make()
|
||||
->title('Already Scanned In Testing')
|
||||
->body("Serial number already scanned '$serialNumber' with supplier number '$supplier'.<br>Please scan this serial number in Invoice Validation.")
|
||||
->success()
|
||||
->send();
|
||||
$this->dispatch('play-error-sound');
|
||||
$this->form->fill([
|
||||
'plant_id' => $plantId,
|
||||
'line_id' => $lineId,
|
||||
'item_id' => null,
|
||||
]);
|
||||
return;
|
||||
}
|
||||
else{
|
||||
Notification::make()
|
||||
->title('Duplicate Serial Number')
|
||||
->body("Duplicate Serial number '$serialNumber' with supplier number '$supplier'.")
|
||||
->success()
|
||||
->send();
|
||||
$this->form->fill([
|
||||
'plant_id' => $plantId,
|
||||
'line_id' => $lineId,
|
||||
'item_id' => null,
|
||||
]);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$item = Item::where('code', $itemCode)->where('plant_id', $plantId)->first();
|
||||
|
||||
Reference in New Issue
Block a user