From 74279d6dda17f1e8fb4510dab333d216118632f7 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Tue, 10 May 2022 11:27:33 +0800 Subject: [PATCH] fix transaction export --- .../Modules/Exports/Services/ExportsTransactions.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/Classes/Modules/Exports/Services/ExportsTransactions.php b/app/Classes/Modules/Exports/Services/ExportsTransactions.php index 910fb79b..869114fb 100644 --- a/app/Classes/Modules/Exports/Services/ExportsTransactions.php +++ b/app/Classes/Modules/Exports/Services/ExportsTransactions.php @@ -25,7 +25,7 @@ class ExportsTransactions implements FromQuery, WithHeadingRow, WithMapping */ public function query() { - return Transaction::where('type', TransactionType::BILL); + return Transaction::query(); } /** @@ -60,7 +60,12 @@ class ExportsTransactions implements FromQuery, WithHeadingRow, WithMapping 6 => 'EXPIRED' ]; + $booking = $transaction->owner->owner; + if($transaction->owner !== Booking::class){ + dump($transaction); + } + return [ $booking ? $booking->company->reference : '', $booking ? $booking->marking : '',