Added short descriptin in items importer #1590

Merged
jothi merged 1 commits from ranjith-dev into master 2026-12-02 09:51:23 +00:00

View File

@@ -42,6 +42,12 @@ class ItemImporter extends Importer
->example('Testing Model Description 1')
->label('Description')
->rules(['required']),
ImportColumn::make('short_description')
->requiredMapping()
->exampleHeader('Short Description')
->example('Testing Model')
->label('Short Description')
->rules(['required']),
ImportColumn::make('hourly_quantity')
->requiredMapping()
->exampleHeader('Hourly Quantity')
@@ -72,6 +78,7 @@ class ItemImporter extends Importer
Log::info('ResolveRecord triggered', $this->data);
$iCode = trim($this->data['code']);
$description = trim($this->data['description']);
$shortDescription = trim($this->data['short_description']);
$lineName = trim($this->data['line']);
if (Str::length($plantCod) < 4 || ! is_numeric($plantCod) || ! preg_match('/^[1-9]\d{3,}$/', $plantCod)) {
@@ -114,6 +121,7 @@ class ItemImporter extends Importer
[
'category' => trim($this->data['category']),
'description' => $description,
'short_description' => $shortDescription ?? null,
'hourly_quantity' => $this->data['hourly_quantity'],
'uom' => trim($this->data['uom']),
'line_id' => $lineId->id ?? null,