removed required of ware house number in plant importer
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 13s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Laravel Pint / pint (pull_request) Successful in 6m33s
Laravel Larastan / larastan (pull_request) Failing after 7m57s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 13s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Laravel Pint / pint (pull_request) Successful in 6m33s
Laravel Larastan / larastan (pull_request) Failing after 7m57s
This commit is contained in:
@@ -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([
|
||||
|
||||
Reference in New Issue
Block a user