ranjith-dev #956

Merged
jothi merged 2 commits from ranjith-dev into master 2026-08-27 11:04:38 +00:00
Showing only changes of commit 8061953062 - Show all commits

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