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