diff --git a/app/Classes/Modules/Exports/Services/ExportsSalesInvoiceReport.php b/app/Classes/Modules/Exports/Services/ExportsSalesInvoiceReport.php index 0be6f1d3..289f86f2 100644 --- a/app/Classes/Modules/Exports/Services/ExportsSalesInvoiceReport.php +++ b/app/Classes/Modules/Exports/Services/ExportsSalesInvoiceReport.php @@ -14,6 +14,7 @@ use Maatwebsite\Excel\Concerns\WithMapping; use App\Classes\Modules\Bookings\Services\CalculatesBookingRefundAmount; use App\Classes\Modules\Bookings\Services\CalculatesBookingRefundServiceCharge; use Carbon\Carbon; +use Illuminate\Support\Facades\Log; class ExportsSalesInvoiceReport implements FromQuery, WithHeadings, WithHeadingRow, WithMapping, ShouldAutoSize { @@ -88,7 +89,7 @@ class ExportsSalesInvoiceReport implements FromQuery, WithHeadings, WithHeadingR $currencyId = 0; $purchaseOrder = $booking->transactions->where('type', TransactionType::PURCHASE_ORDER)->first(); - $company = $booking->company->first(); + $company = $booking->company; $lastPaymentTransaction = $booking->transactions