diff --git a/resources/views/finance/settlement/partials/commission/table.blade.php b/resources/views/finance/settlement/partials/commission/table.blade.php index 752a1833..fcdc804f 100644 --- a/resources/views/finance/settlement/partials/commission/table.blade.php +++ b/resources/views/finance/settlement/partials/commission/table.blade.php @@ -1,32 +1,22 @@ -{{-- 수당 정산 테이블 --}} +{{-- 수당 정산 테이블 (2행 레이아웃) --}}
| 테넌트 | -구분 | -입금구분 | -입금액 | -입금일 | +입금 | 영업파트너 | -파트너수당 | 매니저 | -매니저수당 | 유치파트너 | -유치수당 | -지급예정일 | -수당지급일 | -매니저지급일 | -협업지원금 | 상태 | 액션 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| + + {{-- Row 1: 메인 정보 --}} + | |||||||||||||||||||||||||
| @if (in_array($commission->status, ['pending', 'approved'])) + class="commission-checkbox rounded border-gray-300 text-emerald-600 focus:ring-emerald-500 mt-1"> @endif | -+ + {{-- 테넌트: 업체명 + [구분][입금구분][개발상태] 뱃지 --}} + |
{{ $commission->management?->tenant?->company_name ?? $commission->management?->tenantProspect?->company_name ?? '-' }}
- @if ($commission->management?->hq_status)
- @php
- $hqColors = [
- 'pending' => 'bg-gray-100 text-gray-600',
- 'review' => 'bg-yellow-100 text-yellow-700',
- 'planning' => 'bg-blue-100 text-blue-700',
- 'coding' => 'bg-indigo-100 text-indigo-700',
- 'dev_test' => 'bg-purple-100 text-purple-700',
- 'dev_done' => 'bg-teal-100 text-teal-700',
- 'int_test' => 'bg-cyan-100 text-cyan-700',
- 'handover' => 'bg-green-100 text-green-700',
- ];
- @endphp
-
- {{ $commission->management->hq_status_label }}
-
- @endif
+
+ {{ $isGroup ? '단체' : '개인' }}
+ {{ $commission->payment_type_label }}
+ @if ($commission->management?->hq_status)
+ {{ $commission->management->hq_status_label }}
+ @endif
+
|
- - - {{ $isGroup ? '단체' : '개인' }} - - | -- - {{ $commission->payment_type_label }} - - | -+ + {{-- 입금: 금액(볼드) + 날짜(작은글씨) --}} + |
@if ($displayPayment > 0)
- {{ number_format($displayPayment) }}
+ {{ number_format($displayPayment) }}
@else
- -
+ -
@endif
+ {{ $commission->payment_date->format('Y-m-d') }}
|
- - {{ $commission->payment_date->format('Y-m-d') }} + + {{-- 영업파트너: 이름(비율%) + 수당금액 --}} + |
+ {{ $partnerName }} ({{ $pRate }}%)
+
+ @if ($displayPartnerComm > 0)
+ {{ number_format($displayPartnerComm) }}
+ @else
+ -
+ @endif
+
|
-
- @php
- $partnerName = $commission->partner?->user?->name
- ?? $commission->management?->salesPartner?->user?->name
- ?? $commission->management?->tenantProspect?->registeredBy?->name
- ?? '-';
- @endphp
- {{ $partnerName }}
- {{ $pRate }}%
+
+ {{-- 매니저: 이름(구독1월) + 수당금액 --}}
+ |
+ {{ $commission->manager?->name ?? $commission->management?->manager?->name ?? '-' }} (구독1월)
+
+ @if ($displayManagerComm > 0)
+ {{ number_format($displayManagerComm) }}
+ @else
+ -
+ @endif
+
|
- - @if ($displayPartnerComm > 0) - {{ number_format($displayPartnerComm) }} - @else - - - @endif - | -
- {{ $commission->manager?->name ?? $commission->management?->manager?->name ?? '-' }}
- 구독1월
- |
- - @if ($displayManagerComm > 0) - {{ number_format($displayManagerComm) }} - @else - - - @endif - | -- @php - // 유치파트너 = 영업파트너의 상위자 (user→parent) - $referrerName = $commission->referrerPartner?->user?->name; - if (!$referrerName) { - // 영업파트너 user를 찾아서 parent 확인 - $partnerUser = $commission->partner?->user - ?? $commission->management?->salesPartner?->user - ?? $commission->management?->tenantProspect?->registeredBy; - $referrerName = $partnerUser?->parent?->name; - } - @endphp + + {{-- 유치파트너: 이름(비율%) + 수당금액 --}} + |
@if ($referrerName)
- {{ $referrerName }}
- {{ $isGroup ? '유치 3%' : '상위 5%' }}
+ {{ $referrerName }} ({{ $rRate }}%)
+
+ @if ($displayReferrerComm > 0)
+ {{ number_format($displayReferrerComm) }}
+ @else
+ -
+ @endif
+
@else
-
@endif
|
- - @if ($displayReferrerComm > 0) - {{ number_format($displayReferrerComm) }} - @else - - - @endif - | -- {{ $commission->scheduled_payment_date->format('Y-m-d') }} - | - {{-- 수당지급일 (deposit→first_partner_paid_at, balance→second_partner_paid_at) --}} - @php - $paidField = $commission->payment_type === 'deposit' ? 'first_partner_paid_at' : 'second_partner_paid_at'; - $paidValue = $commission->$paidField?->format('Y-m-d'); - @endphp -- - | - {{-- 매니저지급일 --}} -- @if($isGroup) - - - @else - - @endif - | - {{-- 협업지원금 --}} -- @if(!$isGroup) - - @else - - - @endif - | -- @php - $statusColors = [ - 'pending' => 'bg-yellow-100 text-yellow-800', - 'approved' => 'bg-blue-100 text-blue-800', - 'paid' => 'bg-green-100 text-green-800', - 'cancelled' => 'bg-red-100 text-red-800', - ]; - @endphp + + {{-- 상태 --}} + | {{ $commission->status_label }} | -+ + {{-- 액션 (rowspan=2) --}} + |
|
|
|
+
+ {{-- 지급예정일 --}}
+
+
+ 지급예정일:
+ {{ $commission->scheduled_payment_date->format('Y-m-d') }}
+
+ {{-- 수당지급일 --}}
+
+ 수당지급일:
+
+
+ {{-- 매니저지급일 --}}
+
+ 매니저지급일:
+ @if($isGroup)
+ -
+ @else
+
+ @endif
+
+ {{-- 협업지원금 --}}
+
+ 협업지원금:
+ @if(!$isGroup)
+
+ @else
+ -
+ @endif
+
+ |
+ {{-- 상태 빈칸 --}} + | ||||||||||||||||||||||||
| + | 등록된 정산 내역이 없습니다. | ||||||||||||||||||||||||