From d94af0f24d4b73ff2415c32ed984036e3a9fe7c8 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Mon, 12 Oct 2026 16:38:41 +0530 Subject: [PATCH] Changed start date and end date for production report --- app/Console/Commands/SendProductionReport.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/Console/Commands/SendProductionReport.php b/app/Console/Commands/SendProductionReport.php index 49bc744b..bd01d47f 100644 --- a/app/Console/Commands/SendProductionReport.php +++ b/app/Console/Commands/SendProductionReport.php @@ -57,10 +57,15 @@ class SendProductionReport extends Command // $startDate = now()->setTime(8, 0, 0); // $endDate = now()->copy()->addDay()->setTime(8, 0, 0); + // if (strtolower($scheduleType) == 'daily') { + // $startDate = now()->subDay()->setTime(8, 0, 0); + // $endDate = now()->setTime(8, 0, 0); + // } if (strtolower($scheduleType) == 'daily') { - $startDate = now()->subDay()->setTime(8, 0, 0); - $endDate = now()->setTime(8, 0, 0); - } else { + $startDate = now()->subDays(2)->setTime(8, 0, 0); + $endDate = now()->subDay()->setTime(8, 0, 0); + } + else { $startDate = now()->setTime(8, 0, 0); $endDate = now()->copy()->addDay()->setTime(8, 0, 0); }