From 2bb93d97438893f06e28b78b4ea64239ba2dd84e Mon Sep 17 00:00:00 2001 From: omair saleh Date: Tue, 10 May 2022 18:59:53 +0800 Subject: [PATCH] fix transaction export --- app/Classes/Modules/Exports/Services/ExportsTransactions.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/Classes/Modules/Exports/Services/ExportsTransactions.php b/app/Classes/Modules/Exports/Services/ExportsTransactions.php index d5b45be7..adef7293 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::whereIn('type', [TransactionType::PAYMENT, TransactionType::BILL]); + return Transaction::whereMonth('created_at', 4)->whereIn('type', [TransactionType::PAYMENT, TransactionType::BILL]); } /** @@ -68,8 +68,6 @@ class ExportsTransactions implements FromQuery, WithHeadingRow, WithMapping $company = $booking->company; - if(!$company instanceof Company) dd($company); - return [ $company->reference, $booking ? $booking->marking : '',