Changed monthly plan logic in target plan #1139
@@ -631,11 +631,13 @@ class ProductionTargetPlan extends Component
|
|||||||
|
|
||||||
$this->records = $records;
|
$this->records = $records;
|
||||||
|
|
||||||
$this->monthlyRecords = ProductionPlan::where('plant_id', $plantId)
|
// $this->monthlyRecords = ProductionPlan::where('plant_id', $plantId)
|
||||||
->where('line_id', $lineId)
|
// ->where('line_id', $lineId)
|
||||||
->whereYear('created_at', $year)
|
// ->whereYear('created_at', $year)
|
||||||
->whereMonth('created_at', $month)
|
// ->whereMonth('created_at', $month)
|
||||||
->sum('plan_quantity');
|
// ->sum('plan_quantity');
|
||||||
|
|
||||||
|
$this->monthlyRecords = $plans->sum('plan_quantity');
|
||||||
}
|
}
|
||||||
|
|
||||||
// public function loadMonthlyPlan($year, $month, $plantId, $lineId){
|
// public function loadMonthlyPlan($year, $month, $plantId, $lineId){
|
||||||
|
|||||||
Reference in New Issue
Block a user