Changed logic in production target plan
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 13s
Laravel Pint / pint (pull_request) Successful in 4m12s
Laravel Larastan / larastan (pull_request) Failing after 5m40s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 13s
Laravel Pint / pint (pull_request) Successful in 4m12s
Laravel Larastan / larastan (pull_request) Failing after 5m40s
This commit is contained in:
@@ -626,16 +626,22 @@ class ProductionTargetPlan extends Component
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->records = $records;
|
$this->records = $records;
|
||||||
}
|
|
||||||
|
|
||||||
public function loadMonthlyPlan($year, $month, $plantId, $lineId){
|
$this->monthlyRecords = ProductionPlan::where('plant_id', $plantId)
|
||||||
return 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');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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()
|
public function exportProductionData()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,12 +35,7 @@
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="border px-4 py-2 whitespace-nowrap font-semibold">
|
<td class="border px-4 py-2 whitespace-nowrap font-semibold">
|
||||||
{{ $this->loadMonthlyPlan(
|
{{ $monthlyRecords ?? 0 }}
|
||||||
$year,
|
|
||||||
$month,
|
|
||||||
$record['plant_id'],
|
|
||||||
$record['line_id']
|
|
||||||
) }}
|
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user