1
0
forked from poc/pds

Merge pull request 'Changed logic in item overview page' (#1337) from ranjith-dev into master

Reviewed-on: poc/pds#1337
This commit is contained in:
2026-10-29 05:33:19 +00:00

View File

@@ -186,10 +186,8 @@ class ItemOverview extends ChartWidget
$weeklyPlanQuantity = \DB::table('production_plans') $weeklyPlanQuantity = \DB::table('production_plans')
->where('plant_id', $selectedPlant) ->where('plant_id', $selectedPlant)
->where('line_id', $selectedLine) ->where('line_id', $selectedLine)
->whereBetween('created_at', [ ->whereYear('created_at', $startDate->year)
$startDate, ->whereMonth('created_at', $startDate->month)
$endDate
])
->sum('plan_quantity'); ->sum('plan_quantity');
$daysCount = count($orderedData); $daysCount = count($orderedData);