Merge pull request 'added logic of inspection lot number in panel gr master importer' (#906) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 27s

Reviewed-on: #906
This commit was merged in pull request #906.
This commit is contained in:
2026-08-18 11:22:37 +00:00

View File

@@ -51,6 +51,12 @@ class PanelGrMasterImporter extends Importer
->example('154564564') ->example('154564564')
->label('Supplier Number') ->label('Supplier Number')
->rules(['required']), ->rules(['required']),
ImportColumn::make('inspection_lot_number')
->requiredMapping()
->exampleHeader('Inspection Lot Number')
->example('154564564')
->label('Inspection Lot Number')
->rules(['required']),
ImportColumn::make('quantity') ImportColumn::make('quantity')
->requiredMapping() ->requiredMapping()
->exampleHeader('Quantity') ->exampleHeader('Quantity')
@@ -86,14 +92,21 @@ class PanelGrMasterImporter extends Importer
$warnMsg[] = 'Document Number cannot be empty.'; $warnMsg[] = 'Document Number cannot be empty.';
} }
if (Str::length($this->data['invoice_number']) < 7 || ! ctype_alnum($this->data['invoice_number'])) { // if (Str::length($this->data['invoice_number']) < 7 || ! ctype_alnum($this->data['invoice_number'])) {
$warnMsg[] = 'Invalid invoice number found'; // $warnMsg[] = 'Invalid invoice number found';
} // }
if (empty($this->data['supplier_number'])) { if (empty($this->data['supplier_number'])) {
$warnMsg[] = 'Supplier Number cannot be empty.'; $warnMsg[] = 'Supplier Number cannot be empty.';
} }
if (empty($this->data['inspection_lot_number'])) {
$warnMsg[] = 'Inspection Lot Number cannot be empty.';
}
if (!is_numeric($this->data['inspection_lot_number'])) {
$warnMsg[] = 'Inspection Lot Number must be a valid number.';
}
if (empty($this->data['quantity'])) { if (empty($this->data['quantity'])) {
$warnMsg[] = 'Quantity cannot be empty.'; $warnMsg[] = 'Quantity cannot be empty.';
} }
@@ -121,6 +134,7 @@ class PanelGrMasterImporter extends Importer
'document_number' => $this->data['document_number'], 'document_number' => $this->data['document_number'],
'invoice_number' => $this->data['invoice_number'], 'invoice_number' => $this->data['invoice_number'],
'supplier_number' => $this->data['supplier_number'] ?? null, 'supplier_number' => $this->data['supplier_number'] ?? null,
'inspection_lot_number' => $this->data['inspection_lot_number'] ?? null,
], ],
[ [
'quantity' => $this->data['quantity'] ?? null, 'quantity' => $this->data['quantity'] ?? null,