removed line as mandatory in item 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 18s
Laravel Pint / pint (pull_request) Successful in 4m34s
Laravel Larastan / larastan (pull_request) Failing after 5m3s

This commit is contained in:
dhanabalan
2026-10-06 17:03:51 +05:30
parent 4c93bc2bd5
commit 4d594dfaaa

View File

@@ -84,10 +84,12 @@ class ItemImporter extends Importer
}
}
$lineId = Line::where('plant_id',$plant->id)->where('name', $lineName)->first();
if(!empty($lineName)){
$lineId = Line::where('plant_id',$plant->id)->where('name', $lineName)->first();
if (! $lineId) {
$warnMsg[] = 'Line name not found'; // '" . $plantCod . "'
if (! $lineId) {
$warnMsg[] = 'Line name not found'; // '" . $plantCod . "'
}
}
if (Str::length($iCode) < 6 || ! ctype_alnum($iCode)) {