From b4461fad345a08e0c132783c2b29733615f365d1 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Wed, 30 Sep 2026 15:03:52 +0530 Subject: [PATCH] Changed monthly plan logic in target plan --- app/Livewire/ProductionTargetPlan.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/Livewire/ProductionTargetPlan.php b/app/Livewire/ProductionTargetPlan.php index b03a5c3c..37275bed 100644 --- a/app/Livewire/ProductionTargetPlan.php +++ b/app/Livewire/ProductionTargetPlan.php @@ -631,11 +631,13 @@ class ProductionTargetPlan extends Component $this->records = $records; - $this->monthlyRecords = ProductionPlan::where('plant_id', $plantId) - ->where('line_id', $lineId) - ->whereYear('created_at', $year) - ->whereMonth('created_at', $month) - ->sum('plan_quantity'); + // $this->monthlyRecords = ProductionPlan::where('plant_id', $plantId) + // ->where('line_id', $lineId) + // ->whereYear('created_at', $year) + // ->whereMonth('created_at', $month) + // ->sum('plan_quantity'); + + $this->monthlyRecords = $plans->sum('plan_quantity'); } // public function loadMonthlyPlan($year, $month, $plantId, $lineId){ -- 2.49.1