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; } }