solved issue for opening only asn invoice
This commit is contained in:
@@ -14,15 +14,15 @@ class AxnExporter extends Exporter
|
||||
|
||||
public static function getColumns(): array
|
||||
{
|
||||
static $rowNumber = 0;
|
||||
// static $rowNumber = 0;
|
||||
|
||||
return [
|
||||
ExportColumn::make('no')
|
||||
->label('NO')
|
||||
->state(function ($record) use (&$rowNumber) {
|
||||
// Increment and return the row number
|
||||
return ++$rowNumber;
|
||||
}),
|
||||
// ExportColumn::make('no')
|
||||
// ->label('NO')
|
||||
// ->state(function ($record) use (&$rowNumber) {
|
||||
// // Increment and return the row number
|
||||
// return ++$rowNumber;
|
||||
// }),
|
||||
// ExportColumn::make('plant.code')
|
||||
// ->label('PLANT CODE'),
|
||||
// ExportColumn::make('invoice_number')
|
||||
@@ -45,7 +45,11 @@ class AxnExporter extends Exporter
|
||||
ExportColumn::make('serial_number')
|
||||
->label('SERIAL NUMBER')
|
||||
->state(function ($record) {
|
||||
return substr($record->serial_number, 8);
|
||||
$sn = $record->serial_number;
|
||||
|
||||
$offset = 2 + 2 + 4;
|
||||
|
||||
return substr($sn, $offset);
|
||||
}),
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user