diff --git a/app/Classes/Modules/Exports/Services/ExportsTransactions.php b/app/Classes/Modules/Exports/Services/ExportsTransactions.php index f6b85b52..910fb79b 100644 --- a/app/Classes/Modules/Exports/Services/ExportsTransactions.php +++ b/app/Classes/Modules/Exports/Services/ExportsTransactions.php @@ -60,17 +60,7 @@ class ExportsTransactions implements FromQuery, WithHeadingRow, WithMapping 6 => 'EXPIRED' ]; - $booking = null; - - if($transaction->owner_type === Booking::class){ - $booking = $transaction->owner; - } - - if($transaction->type === TransactionType::BILL){ - $booking = $transaction->owner->owner; - } - - + $booking = $transaction->owner->owner; return [ $booking ? $booking->company->reference : '', $booking ? $booking->marking : '',