From 9e7216d545430af3e8526770f2276944480e5fe2 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Tue, 10 May 2022 14:50:37 +0800 Subject: [PATCH] fix transaction export --- .../Modules/Exports/Services/ExportsTransactions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Classes/Modules/Exports/Services/ExportsTransactions.php b/app/Classes/Modules/Exports/Services/ExportsTransactions.php index b79cef5d..c7a569ca 100644 --- a/app/Classes/Modules/Exports/Services/ExportsTransactions.php +++ b/app/Classes/Modules/Exports/Services/ExportsTransactions.php @@ -62,8 +62,8 @@ class ExportsTransactions implements FromQuery, WithHeadingRow, WithMapping $booking = $transaction->owner; - $company = $booking->owner; - dump($booking, $company); + $company = $booking->company; + if(!($booking instanceof Booking)){ $booking = $transaction->owner->owner; @@ -72,7 +72,7 @@ class ExportsTransactions implements FromQuery, WithHeadingRow, WithMapping $company = $booking; $booking = null; } else { - $company = $booking->owner; + $company = $booking->company; } }