removed rework logic in panel box validation
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
This commit is contained in:
@@ -810,21 +810,21 @@ class PanelBoxValidationResource extends Resource
|
||||
|
||||
$serialExists = PanelBoxValidation::where('serial_number', $serialNumber)->where('plant_id', $plantId)->first();
|
||||
|
||||
if ($serialExists) {
|
||||
$set('serial_exists', true);
|
||||
} else {
|
||||
$set('serial_exists', false);
|
||||
}
|
||||
|
||||
// if ($serialExists && ! $get('id')) {
|
||||
// $set('validationError', 'Serial number already exists in panel box validation.');
|
||||
// $set('sticker_master_id', null);
|
||||
// $set('uom', null);
|
||||
// $set('serial_number', null);
|
||||
|
||||
// return;
|
||||
// if ($serialExists) {
|
||||
// $set('serial_exists', true);
|
||||
// } else {
|
||||
// $set('serial_exists', false);
|
||||
// }
|
||||
|
||||
if ($serialExists && ! $get('id')) {
|
||||
$set('validationError', 'Serial number already exists in panel box validation.');
|
||||
$set('sticker_master_id', null);
|
||||
$set('uom', null);
|
||||
$set('serial_number', null);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$set('validationError', null);
|
||||
|
||||
foreach ($serialFields as $column) {
|
||||
|
||||
Reference in New Issue
Block a user