From 1e782e9e49845f1449346b0e197309c6282122c1 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Tue, 10 May 2022 15:48:48 +0800 Subject: [PATCH] fix transaction export --- .../Modules/Exports/Services/ExportsTransactions.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Classes/Modules/Exports/Services/ExportsTransactions.php b/app/Classes/Modules/Exports/Services/ExportsTransactions.php index 2d3c270a..581d6152 100644 --- a/app/Classes/Modules/Exports/Services/ExportsTransactions.php +++ b/app/Classes/Modules/Exports/Services/ExportsTransactions.php @@ -62,8 +62,7 @@ class ExportsTransactions implements FromQuery, WithHeadingRow, WithMapping $booking = $transaction->owner; - $company = $booking->company; - + $company = ''; if(!($booking instanceof Booking)){ $booking = $transaction->owner->owner; @@ -77,6 +76,9 @@ class ExportsTransactions implements FromQuery, WithHeadingRow, WithMapping } else { $company = $booking->company; } + + } else { + $company = $booking->company; } if((!($company instanceof Company) || !($booking instanceof Booking)) && $booking !== null ) dd($company, $booking);