removed rework logic in panel box
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled

This commit is contained in:
dhanabalan
2026-08-28 10:38:33 +05:30
parent 0c189f695c
commit 393ea6a4bd

View File

@@ -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) {