From 9111eecff24698d43a5ae96b3957ab44c485d268 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Wed, 18 Nov 2026 12:20:24 +0530 Subject: [PATCH] Corrected bug in process order report page --- app/Filament/Widgets/ProcessOrderChart.php | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/app/Filament/Widgets/ProcessOrderChart.php b/app/Filament/Widgets/ProcessOrderChart.php index 8906bd53..9148b080 100644 --- a/app/Filament/Widgets/ProcessOrderChart.php +++ b/app/Filament/Widgets/ProcessOrderChart.php @@ -180,31 +180,15 @@ class ProcessOrderChart extends ChartWidget ") ->first(); - // $totalOrderQuantity = DB::table('process_orders') - // ->where('plant_id', $selectedPlant) - // ->where('line_id', $selectedLine) - // ->whereIn('process_order', function ($query) use ($selectedPlant, $selectedLine) { - // $query->select('process_order') - // ->from('characteristic_values') - // ->where('plant_id', $selectedPlant) - // ->where('line_id', $selectedLine) - // ->distinct(); - // }) - // ->where('created_at', '>=', $startDate) - // ->where('created_at', '<', $endDate) - // ->sum('order_quantity'); - return [ 'datasets' => [ [ 'label' => 'Quantity', 'data' => [ - // (int) ($totalOrderQuantity ?? 0), (int) ($records->ok_count ?? 0), (int) ($records->not_ok_count ?? 0), ], 'backgroundColor' => [ - // '#3B82F6', '#16A34A', '#DC2626', ], @@ -278,8 +262,8 @@ class ProcessOrderChart extends ChartWidget return [ 'today' => 'Today', 'yesterday' => 'Yesterday', - 'week' => 'This Week', - 'month' => 'This Month', + 'this_week' => 'This Week', + 'this_month' => 'This Month', ]; } }