1
0
forked from poc/pds

Merge pull request 'Changed monthly plan logic in target plan' (#1139) from ranjith-dev into master

Reviewed-on: poc/pds#1139
This commit is contained in:
2026-09-30 09:34:07 +00:00

View File

@@ -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){