| 中分類 | 項目 | @foreach($months as $monthIndex => $monthData) @php($headerYear = $monthData['year'])
@if($monthIndex == 0 || ($monthIndex > 0 && $months[$monthIndex-1]['year'] != $monthData['year']))
{{ $headerYear }}年
@endif
{{ $monthData['month'] }}月
|
@endforeach
年間合計 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 中分類 | 項目 | @foreach($months as $monthIndex => $monthData) @php($headerYear = $monthData['year'])
@if($monthIndex == 0 || ($monthIndex > 0 && $months[$monthIndex-1]['year'] != $monthData['year']))
{{ $headerYear }}年
@endif
{{ $monthData['month'] }}月
|
@endforeach
年間合計 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
{{ $category['parent_category_name'] }}
|
|||||||||||||
| {{ $category['category_name'] }} | 売上目標 | @foreach($months as $monthData) @php($monthValue = $category['sales_targets'][$monthData['month']] ?? 0) @php($currentDate = new DateTime()) @php($actualYear = $monthData['year']) @php($targetDate = new DateTime($actualYear . '-' . str_pad($monthData['month'], 2, '0', STR_PAD_LEFT) . '-01')) @php($isPastMonth = $targetDate < $currentDate)
@if($permissions && $permissions->canUpdate)
@if($isPastMonth)
|
@endforeach
{{ number_format(array_sum($category['sales_targets'])) }} | ||||||||||
| 粗利目標 | @foreach($months as $monthData) @php($profitValue = $category['profit_targets'][$monthData['month']] ?? 0) @php($currentDate = new DateTime()) @php($actualYear = $monthData['year']) @php($targetDate = new DateTime($actualYear . '-' . str_pad($monthData['month'], 2, '0', STR_PAD_LEFT) . '-01')) @php($isPastMonth = $targetDate < $currentDate)
@if($permissions && $permissions->canUpdate)
@if($isPastMonth)
|
@endforeach
{{ number_format(array_sum($category['profit_targets'])) }} | |||||||||||