Merge pull request 'Changed logic in product chjaracteristic master exporter' (#235) 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: #235
This commit was merged in pull request #235.
This commit is contained in:
@@ -14,6 +14,7 @@ class ProductCharacteristicsMasterExporter 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')
|
||||||
@@ -21,28 +22,32 @@ class ProductCharacteristicsMasterExporter extends Exporter
|
|||||||
// Increment and return the row number
|
// Increment and return the row number
|
||||||
return ++$rowNumber;
|
return ++$rowNumber;
|
||||||
}),
|
}),
|
||||||
ExportColumn::make('plant.name')
|
ExportColumn::make('plant.code')
|
||||||
->label('PLANT'),
|
->label('PLANT CODE'),
|
||||||
ExportColumn::make('item.code')
|
ExportColumn::make('item.code')
|
||||||
->label('ITEM CODE'),
|
->label('ITEM CODE'),
|
||||||
|
ExportColumn::make('item.description')
|
||||||
|
->label('ITEM DESCRIPTION'),
|
||||||
ExportColumn::make('line.name')
|
ExportColumn::make('line.name')
|
||||||
->label('LINE NAME'), //machine.workGroupMaster.name
|
->label('LINE NAME'), // machine.workGroupMaster.name
|
||||||
ExportColumn::make('machine.workGroupMaster.name')
|
ExportColumn::make('machine.workGroupMaster.name')
|
||||||
->label('WORK GROUP MASTER'),
|
->label('GROUP WORK CENTER'),
|
||||||
ExportColumn::make('machine.work_center')
|
ExportColumn::make('machine.work_center')
|
||||||
->label('WORK CENTER'),
|
->label('WORK CENTER'),
|
||||||
ExportColumn::make('characteristics_type')
|
ExportColumn::make('characteristics_type')
|
||||||
->label('CHARACTERISTICS TYPE'),
|
->label('CHARACTERISTICS TYPE'),
|
||||||
ExportColumn::make('name')
|
ExportColumn::make('name')
|
||||||
->label('NAME'),
|
->label('CHARACTERISTICS NAME'),
|
||||||
|
ExportColumn::make('category')
|
||||||
|
->label('CATEGORY'),
|
||||||
ExportColumn::make('inspection_type')
|
ExportColumn::make('inspection_type')
|
||||||
->label('INSPECTION TYPE'),
|
->label('INSPECTION TYPE'),
|
||||||
ExportColumn::make('upper')
|
|
||||||
->label('UPPER'),
|
|
||||||
ExportColumn::make('lower')
|
ExportColumn::make('lower')
|
||||||
->label('LOWER'),
|
->label('LOWER'),
|
||||||
ExportColumn::make('middle')
|
ExportColumn::make('middle')
|
||||||
->label('MIDDLE'),
|
->label('MIDDLE'),
|
||||||
|
ExportColumn::make('upper')
|
||||||
|
->label('UPPER'),
|
||||||
ExportColumn::make('created_at')
|
ExportColumn::make('created_at')
|
||||||
->label('CREATED AT'),
|
->label('CREATED AT'),
|
||||||
ExportColumn::make('updated_at')
|
ExportColumn::make('updated_at')
|
||||||
@@ -59,10 +64,10 @@ class ProductCharacteristicsMasterExporter extends Exporter
|
|||||||
|
|
||||||
public static function getCompletedNotificationBody(Export $export): string
|
public static function getCompletedNotificationBody(Export $export): string
|
||||||
{
|
{
|
||||||
$body = 'Your product characteristics master export has completed and ' . number_format($export->successful_rows) . ' ' . str('row')->plural($export->successful_rows) . ' exported.';
|
$body = 'Your product characteristics master export has completed and '.number_format($export->successful_rows).' '.str('row')->plural($export->successful_rows).' exported.';
|
||||||
|
|
||||||
if ($failedRowsCount = $export->getFailedRowsCount()) {
|
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;
|
return $body;
|
||||||
|
|||||||
Reference in New Issue
Block a user