mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-09-01 02:43:58 +00:00
add column for old or new customers in the customer excel export
This commit is contained in:
@@ -24,6 +24,7 @@ class ExportsCustomers implements FromQuery, WithHeadingRow, WithMapping
|
||||
'Number of bookings',
|
||||
'Bookings total',
|
||||
'Registration Date',
|
||||
'System Registration'
|
||||
];
|
||||
}
|
||||
|
||||
@@ -48,7 +49,10 @@ class ExportsCustomers implements FromQuery, WithHeadingRow, WithMapping
|
||||
$company->type === CompanyType::COMPANY_BUSINESS ? 'Company' : 'individual',
|
||||
count($company->bookings),
|
||||
$company->bookings()->sum('fix_amount'),
|
||||
\PhpOffice\PhpSpreadsheet\Shared\Date::dateTimeToExcel($company->created_at)
|
||||
\PhpOffice\PhpSpreadsheet\Shared\Date::dateTimeToExcel($company->created_at),
|
||||
count($company->whereHas('segments', function($query){
|
||||
$query->where('id', '=', 5);
|
||||
})->get()) ? 'Exchange 1.0' : 'Exchange 2.0'
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user