From 4d594dfaaa89c0b434e2400590d97ff7a9a628f0 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Tue, 6 Oct 2026 17:03:51 +0530 Subject: [PATCH] removed line as mandatory in item importer --- app/Filament/Imports/ItemImporter.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Filament/Imports/ItemImporter.php b/app/Filament/Imports/ItemImporter.php index 53b0b4bf..99fd00c1 100644 --- a/app/Filament/Imports/ItemImporter.php +++ b/app/Filament/Imports/ItemImporter.php @@ -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)) {