From 35bab66df51c8e06928421944454c0b4de34920e Mon Sep 17 00:00:00 2001 From: omair saleh Date: Thu, 28 Apr 2022 11:38:30 +0800 Subject: [PATCH] update transaction export --- .../Modules/Exports/Services/ExportsTransactions.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) 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 : '',