Merge pull request 'solved issue for opening only asn invoice' (#520) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #520
This commit was merged in pull request #520.
This commit is contained in:
@@ -14,15 +14,15 @@ class AxnExporter extends Exporter
|
|||||||
|
|
||||||
public static function getColumns(): array
|
public static function getColumns(): array
|
||||||
{
|
{
|
||||||
static $rowNumber = 0;
|
// static $rowNumber = 0;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
ExportColumn::make('no')
|
// ExportColumn::make('no')
|
||||||
->label('NO')
|
// ->label('NO')
|
||||||
->state(function ($record) use (&$rowNumber) {
|
// ->state(function ($record) use (&$rowNumber) {
|
||||||
// Increment and return the row number
|
// // Increment and return the row number
|
||||||
return ++$rowNumber;
|
// return ++$rowNumber;
|
||||||
}),
|
// }),
|
||||||
// ExportColumn::make('plant.code')
|
// ExportColumn::make('plant.code')
|
||||||
// ->label('PLANT CODE'),
|
// ->label('PLANT CODE'),
|
||||||
// ExportColumn::make('invoice_number')
|
// ExportColumn::make('invoice_number')
|
||||||
@@ -45,7 +45,11 @@ class AxnExporter extends Exporter
|
|||||||
ExportColumn::make('serial_number')
|
ExportColumn::make('serial_number')
|
||||||
->label('SERIAL NUMBER')
|
->label('SERIAL NUMBER')
|
||||||
->state(function ($record) {
|
->state(function ($record) {
|
||||||
return substr($record->serial_number, 8);
|
$sn = $record->serial_number;
|
||||||
|
|
||||||
|
$offset = 2 + 2 + 4;
|
||||||
|
|
||||||
|
return substr($sn, $offset);
|
||||||
}),
|
}),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1135,20 +1135,20 @@ class InvoiceValidationResource extends Resource
|
|||||||
->visible(function () {
|
->visible(function () {
|
||||||
return Filament::auth()->user()->can('view import invoice');
|
return Filament::auth()->user()->can('view import invoice');
|
||||||
}),
|
}),
|
||||||
ExportAction::make()
|
ExportAction::make('invoice_export')
|
||||||
->label('Export Invoices')
|
->label('Export Invoices')
|
||||||
->color('warning')
|
->color('warning')
|
||||||
->exporter(InvoiceValidationExporter::class)
|
->exporter(InvoiceValidationExporter::class)
|
||||||
->visible(function () {
|
->visible(function () {
|
||||||
return Filament::auth()->user()->can('view export invoice');
|
return Filament::auth()->user()->can('view export invoice');
|
||||||
}),
|
}),
|
||||||
// ExportAction::make()
|
ExportAction::make('axn_export')
|
||||||
// ->label('Export Asn')
|
->label('Export Asn')
|
||||||
// ->color('warning')
|
->color('warning')
|
||||||
// ->exporter(AxnExporter::class)
|
->exporter(AxnExporter::class)
|
||||||
// ->visible(function () {
|
->visible(function () {
|
||||||
// return Filament::auth()->user()->can('view export asn invoice');
|
return Filament::auth()->user()->can('view export asn invoice');
|
||||||
// }),
|
}),
|
||||||
])
|
])
|
||||||
|
|
||||||
->filters([
|
->filters([
|
||||||
|
|||||||
Reference in New Issue
Block a user