solved issue for opening only asn invoice
Some checks failed
Gemini PR Review / Gemini PR Review (pull_request) Waiting to run
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Waiting to run
Laravel Larastan / larastan (pull_request) Waiting to run
Laravel Pint / pint (pull_request) Waiting to run
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled

This commit is contained in:
dhanabalan
2026-04-11 16:22:03 +05:30
parent eb33c57973
commit 3547f437f7
2 changed files with 20 additions and 16 deletions

View File

@@ -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);
}),
];
}

View File

@@ -1135,20 +1135,20 @@ class InvoiceValidationResource extends Resource
->visible(function () {
return Filament::auth()->user()->can('view import invoice');
}),
ExportAction::make()
ExportAction::make('invoice_export')
->label('Export Invoices')
->color('warning')
->exporter(InvoiceValidationExporter::class)
->visible(function () {
return Filament::auth()->user()->can('view export invoice');
}),
// ExportAction::make()
// ->label('Export Asn')
// ->color('warning')
// ->exporter(AxnExporter::class)
// ->visible(function () {
// return Filament::auth()->user()->can('view export asn invoice');
// }),
ExportAction::make('axn_export')
->label('Export Asn')
->color('warning')
->exporter(AxnExporter::class)
->visible(function () {
return Filament::auth()->user()->can('view export asn invoice');
}),
])
->filters([