diff --git a/app/Classes/Modules/Exports/Services/ExportsCustomers.php b/app/Classes/Modules/Exports/Services/ExportsCustomers.php index 40db43fa..64508087 100644 --- a/app/Classes/Modules/Exports/Services/ExportsCustomers.php +++ b/app/Classes/Modules/Exports/Services/ExportsCustomers.php @@ -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' ]; } } \ No newline at end of file