From 80a016be282274e7ceeed544b4d5dde8d57ffdce Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Sat, 12 Oct 2024 16:13:21 +0800 Subject: [PATCH] Laravel Vapor - New UI for admin to download reports (sync code from Shipping Portal) --- .../Exports/Services/ExportsAnalyticBookingTransactions.php | 2 +- app/Classes/Modules/Exports/Services/ExportsTransactions.php | 2 +- resources/views/pages/downloads/index.blade.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Classes/Modules/Exports/Services/ExportsAnalyticBookingTransactions.php b/app/Classes/Modules/Exports/Services/ExportsAnalyticBookingTransactions.php index f30b2a35..c268d08c 100644 --- a/app/Classes/Modules/Exports/Services/ExportsAnalyticBookingTransactions.php +++ b/app/Classes/Modules/Exports/Services/ExportsAnalyticBookingTransactions.php @@ -52,7 +52,7 @@ class ExportsAnalyticBookingTransactions implements FromQuery, WithHeadings, Wit */ public function query() { - return Booking::query()->whereBetween('created_at', [Carbon::now()->subMonths(3), Carbon::now()]); //Limit, 'expensive' query; + return Booking::query()->whereBetween('created_at', [Carbon::now()->subMonths(2), Carbon::now()]); //Limit, 'expensive' query; } /** diff --git a/app/Classes/Modules/Exports/Services/ExportsTransactions.php b/app/Classes/Modules/Exports/Services/ExportsTransactions.php index a6072e38..30a99200 100644 --- a/app/Classes/Modules/Exports/Services/ExportsTransactions.php +++ b/app/Classes/Modules/Exports/Services/ExportsTransactions.php @@ -29,7 +29,7 @@ class ExportsTransactions implements FromQuery, WithHeadingRow, WithMapping, Sho { return Transaction::whereIn('type', [TransactionType::PAYMENT, TransactionType::BILL]) ->where('owner_type', '!=',Wallet::class) - ->whereBetween('created_at', [Carbon::now()->subMonths(3), Carbon::now()]); //Limit, 'expensive' query; + ->whereBetween('created_at', [Carbon::now()->subMonths(2), Carbon::now()]); //Limit, 'expensive' query; } /** diff --git a/resources/views/pages/downloads/index.blade.php b/resources/views/pages/downloads/index.blade.php index 47c338dd..2e54efaa 100644 --- a/resources/views/pages/downloads/index.blade.php +++ b/resources/views/pages/downloads/index.blade.php @@ -25,7 +25,7 @@
transactions.csv -

(last 3 months)

+

(last 2 months)

Download @@ -40,7 +40,7 @@
bookingData.csv -

(last 3 months)

+

(last 2 months)

Download