From 1799cd8d9d19d3f2a5e22b62c09edcfa48f8c41f Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Thu, 29 Oct 2026 11:44:35 +0530 Subject: [PATCH] changed logic in item overview --- app/Filament/Widgets/ItemOverview.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/app/Filament/Widgets/ItemOverview.php b/app/Filament/Widgets/ItemOverview.php index 7682d5b7..a091c13d 100644 --- a/app/Filament/Widgets/ItemOverview.php +++ b/app/Filament/Widgets/ItemOverview.php @@ -159,14 +159,7 @@ class ItemOverview extends ChartWidget ->whereMonth('created_at', $startDate->month) ->sum('plan_quantity'); - $weeksCount = count($orderedData); - - // Split the total monthly plan equally across all weeks - $weeklyPlan = $weeksCount > 0 - ? round($monthlyPlanQuantity / $weeksCount, 2) - : 0; - - $hourlyPlan = round($weeklyPlan / 22.5, 2); + $hourlyPlan = round($monthlyPlanQuantity / 22.5, 2); // Same hourly plan value for every hour $planData = array_fill(0, 24, $hourlyPlan); -- 2.49.1