Added gernr column on importer and exporter file #976

Merged
jothi merged 1 commits from ranjith-dev into master 2026-09-04 08:58:59 +00:00
2 changed files with 17 additions and 9 deletions

View File

@@ -36,6 +36,10 @@ class RequestCharacteristicExporter extends Exporter
->label('ITEM CODE'), ->label('ITEM CODE'),
ExportColumn::make('aufnr') ExportColumn::make('aufnr')
->label('JOB NUMBER'), ->label('JOB NUMBER'),
ExportColumn::make('gernr')
->label('SERIAL NUMBER'),
ExportColumn::make('model_type')
->label('MODEL TYPE'),
ExportColumn::make('characteristicApproverMaster.approver_type') ExportColumn::make('characteristicApproverMaster.approver_type')
->label('APPROVER TYPE'), ->label('APPROVER TYPE'),
ExportColumn::make('characteristicApproverMaster.characteristic_field') ExportColumn::make('characteristicApproverMaster.characteristic_field')

View File

@@ -40,9 +40,17 @@ class RequestCharacteristicImporter extends Importer
->relationship() ->relationship()
->rules(['required']), ->rules(['required']),
ImportColumn::make('aufnr') ImportColumn::make('aufnr')
->label('AUFNR') ->label('JOB NUMBER')
->exampleHeader('AUFNR') ->exampleHeader('JOB NUMBER')
->example('1234567'), ->example('1234567'),
ImportColumn::make('gernr')
->label('SERIAL NUMBER')
->exampleHeader('SERIAL NUMBER')
->example('1234567890123'),
ImportColumn::make('model_type')
->label('MODEL TYPE')
->exampleHeader('MODEL TYPE')
->example('PUMP'),
ImportColumn::make('characteristic_name') ImportColumn::make('characteristic_name')
->label('CHARACTERISTIC NAME') ->label('CHARACTERISTIC NAME')
->exampleHeader('CHARACTERISTIC NAME') ->exampleHeader('CHARACTERISTIC NAME')
@@ -111,10 +119,6 @@ class RequestCharacteristicImporter extends Importer
->label('UPDATED BY') ->label('UPDATED BY')
->exampleHeader('UPDATED BY') ->exampleHeader('UPDATED BY')
->example('RAW01234'), ->example('RAW01234'),
ImportColumn::make('model_type')
->label('MODEL TYPE')
->exampleHeader('MODEL TYPE')
->example('PUMP'),
]; ];
} }
@@ -125,15 +129,15 @@ class RequestCharacteristicImporter extends Importer
// 'email' => $this->data['email'], // 'email' => $this->data['email'],
// ]); // ]);
return new RequestCharacteristic(); return new RequestCharacteristic;
} }
public static function getCompletedNotificationBody(Import $import): string public static function getCompletedNotificationBody(Import $import): string
{ {
$body = 'Your request characteristic import has completed and ' . number_format($import->successful_rows) . ' ' . str('row')->plural($import->successful_rows) . ' imported.'; $body = 'Your request characteristic import has completed and '.number_format($import->successful_rows).' '.str('row')->plural($import->successful_rows).' imported.';
if ($failedRowsCount = $import->getFailedRowsCount()) { if ($failedRowsCount = $import->getFailedRowsCount()) {
$body .= ' ' . number_format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to import.'; $body .= ' '.number_format($failedRowsCount).' '.str('row')->plural($failedRowsCount).' failed to import.';
} }
return $body; return $body;