Changed logic in production target plan
This commit is contained in:
@@ -626,16 +626,22 @@ class ProductionTargetPlan extends Component
|
||||
}
|
||||
|
||||
$this->records = $records;
|
||||
}
|
||||
|
||||
public function loadMonthlyPlan($year, $month, $plantId, $lineId){
|
||||
return ProductionPlan::where('plant_id', $plantId)
|
||||
$this->monthlyRecords = ProductionPlan::where('plant_id', $plantId)
|
||||
->where('line_id', $lineId)
|
||||
->whereYear('created_at', $year)
|
||||
->whereMonth('created_at', $month)
|
||||
->sum('plan_quantity');
|
||||
}
|
||||
|
||||
// public function loadMonthlyPlan($year, $month, $plantId, $lineId){
|
||||
// $this->monthlyRecords = ProductionPlan::where('plant_id', $plantId)
|
||||
// ->where('line_id', $lineId)
|
||||
// ->whereYear('created_at', $year)
|
||||
// ->whereMonth('created_at', $month)
|
||||
// ->sum('plan_quantity');
|
||||
// }
|
||||
|
||||
|
||||
public function exportProductionData()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user