removed required of ware house number in plant importer #1063

Merged
jothi merged 1 commits from ranjith-dev into master 2026-09-21 10:10:09 +00:00

View File

@@ -79,12 +79,12 @@ class PlantImporter extends Importer
} elseif (Str::length($name) < 5) {
$warnMsg[] = 'Name should contain at least 5 characters!';
}
if ($wareHouseNo == null || $wareHouseNo == '' || ! $wareHouseNo) {
// $warnMsg[] = "Warehouse number can't be empty!";
} elseif (! is_numeric($wareHouseNo)) {
$warnMsg[] = 'Warehouse number should contain only numeric values!';
} elseif (Str::length($wareHouseNo) == 3) {
$warnMsg[] = 'Warehouse number must contain 3 digits only!';
if ($wareHouseNo != null && $wareHouseNo != '' && $wareHouseNo) {
if (! is_numeric($wareHouseNo)) {
$warnMsg[] = 'Warehouse number should contain only numeric values!';
} elseif (Str::length($wareHouseNo) != 3) {
$warnMsg[] = 'Warehouse number must contain 3 digits only!';
}
}
if ($addr == null || $addr == '' || ! $addr) {
$warnMsg[] = "Address can't be empty!";
@@ -127,12 +127,12 @@ class PlantImporter extends Importer
return Plant::updateOrCreate([
'code' => $code,
'name' => $name,
],
[
'warehouse_number' => $wareHouseNo,
'address' => $addr,
'company_id' => $compId,
'name' => $name,
]
);
// return Plant::firstOrNew([