diff --git a/app/Livewire/ProductionTargetPlan.php b/app/Livewire/ProductionTargetPlan.php index 9feb4a99..56c62746 100644 --- a/app/Livewire/ProductionTargetPlan.php +++ b/app/Livewire/ProductionTargetPlan.php @@ -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() { diff --git a/resources/views/livewire/production-target-plan.blade.php b/resources/views/livewire/production-target-plan.blade.php index 0d928d84..586ecc79 100644 --- a/resources/views/livewire/production-target-plan.blade.php +++ b/resources/views/livewire/production-target-plan.blade.php @@ -35,12 +35,7 @@