Refactored alignments and updated type from SFG to NON-FG on resource / importer / exporter pages
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Has been cancelled
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Has been cancelled
Laravel Larastan / larastan (pull_request) Has been cancelled
Laravel Pint / pint (pull_request) Has been cancelled

This commit is contained in:
dhanabalan
2026-03-11 19:29:31 +05:30
parent ec8bfc8296
commit 658db00ac8
5 changed files with 84 additions and 97 deletions

View File

@@ -14,6 +14,7 @@ class StockDataMasterExporter extends Exporter
public static function getColumns(): array
{
static $rowNumber = 0;
return [
ExportColumn::make('no')
->label('NO')
@@ -29,7 +30,7 @@ class StockDataMasterExporter extends Exporter
->label('TYPE')
->formatStateUsing(fn ($state) => match ($state) {
'0' => 'FG',
'1' => 'SFG',
'1' => 'NON-FG',
default => '-',
}),
ExportColumn::make('location')
@@ -93,7 +94,7 @@ class StockDataMasterExporter extends Exporter
$scanned = $record->scanned_quantity ?? 0;
return $scanned + $duplicate + $notInStock;
}),
}),
ExportColumn::make('stock_difference')
->label('STOCK DIFFERENCE COUNT')
@@ -114,7 +115,7 @@ class StockDataMasterExporter extends Exporter
$difference = $physicalStock - $systemStock;
return max($difference, 0);
}),
}),
ExportColumn::make('created_at')
->label('CREATED AT'),
ExportColumn::make('updated_at')
@@ -131,10 +132,10 @@ class StockDataMasterExporter extends Exporter
public static function getCompletedNotificationBody(Export $export): string
{
$body = 'Your stock data master export has completed and ' . number_format($export->successful_rows) . ' ' . str('row')->plural($export->successful_rows) . ' exported.';
$body = 'Your stock data master export has completed and '.number_format($export->successful_rows).' '.str('row')->plural($export->successful_rows).' exported.';
if ($failedRowsCount = $export->getFailedRowsCount()) {
$body .= ' ' . number_format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to export.';
$body .= ' '.number_format($failedRowsCount).' '.str('row')->plural($failedRowsCount).' failed to export.';
}
return $body;