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