From 99288cad3a8da21d59703834523bad83102d234b Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Tue, 29 Sep 2026 10:46:36 +0530 Subject: [PATCH] changed logic in producion report for night query --- app/Console/Commands/SendProductionReport.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/SendProductionReport.php b/app/Console/Commands/SendProductionReport.php index 07aba92..33863d0 100644 --- a/app/Console/Commands/SendProductionReport.php +++ b/app/Console/Commands/SendProductionReport.php @@ -267,14 +267,14 @@ class SendProductionReport extends Command ->where('line_id', $line->id) ->whereBetween('created_at', [ $startDate->copy()->setTime(19, 30, 0), - $endDate->copy()->addDay()->setTime(8, 0, 0), + $endDate->copy()->setTime(8, 0, 0), ]) ->count(); } $dayShiftEfficiency = $dayShiftPlanQuan > 0 ? ($dayproductionQuantity / $dayShiftPlanQuan) * 100 : 0; - $nightShiftEfficiency = $dayShiftPlanQuan > 0 ? ($nightproductionQuantity / $nightShiftPlanQuan) * 100 : 0; + $nightShiftEfficiency = $nightShiftPlanQuan > 0 ? ($nightproductionQuantity / $nightShiftPlanQuan) * 100 : 0; $efficiency = round($efficiency, 2);