From 797748b16dd06f8345d5ffeafabe77c0d1937be6 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Mon, 4 Jul 2022 10:54:10 +0800 Subject: [PATCH] fix customer export --- app/Classes/Modules/Exports/Services/ExportsCustomers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Classes/Modules/Exports/Services/ExportsCustomers.php b/app/Classes/Modules/Exports/Services/ExportsCustomers.php index 79535c21..d4d00042 100644 --- a/app/Classes/Modules/Exports/Services/ExportsCustomers.php +++ b/app/Classes/Modules/Exports/Services/ExportsCustomers.php @@ -59,7 +59,7 @@ class ExportsCustomers implements FromQuery, WithHeadings, WithHeadingRow, WithM $company->contacts()->first() ? $company->contacts()->first()->phone : '', $company->type === CompanyType::COMPANY_BUSINESS ? 'Company' : 'individual', count($company->bookings), - $company->bookings()->orderByDesc('id')->first(), + $company->bookings()->orderByDesc('id')->first()->created_at, $company->bookings()->sum('fix_amount'), \PhpOffice\PhpSpreadsheet\Shared\Date::dateTimeToExcel($company->created_at), count($company->segments()->where('segment_id', '=', 5)->get()) ? 'Exchange 1.0' : 'Exchange 2.0'