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); }