added logic of inspection lot number in panel gr master importer #906
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user