fix:영업 대시보드 역할별 수당 금액 불일치 수정
역할별 수당 상세 모달에서 판매자 수당과 예상 수당 합계가 일치하지 않던 문제를 수정했습니다. - 기존: 판매자 수당이 SalesCommission 테이블 기준으로 계산 - 변경: 예상 수당(개발 진행 중 + 인계 완료 미지급) 기준으로 표시 - 1차/2차 수당 합계와 역할별 수당 합계가 일치하도록 수정 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -181,7 +181,8 @@ private function getDashboardData(Request $request): array
|
||||
$totalMembershipFee += $handoverTotalRegFee;
|
||||
$totalCommission = $partnerCommissionTotal + $managerCommissionTotal;
|
||||
|
||||
// 역할별 수당 업데이트
|
||||
// 역할별 수당 업데이트 (실제 지급된 수당 기준)
|
||||
// 참고: 예상 수당은 나중에 $totalExpectedCommission으로 별도 계산됨
|
||||
$commissionByRole[0]['amount'] = $partnerCommissionTotal;
|
||||
$commissionByRole[1]['amount'] = $managerCommissionTotal;
|
||||
|
||||
@@ -294,6 +295,10 @@ private function getDashboardData(Request $request): array
|
||||
$paidCommission
|
||||
);
|
||||
|
||||
// 역할별 수당을 예상 수당 기준으로 재설정 (1차+2차 수당과 일치하도록)
|
||||
// 판매자 예상 수당 = 개발비 × 10% (개발 진행 중 + 인계 완료 미지급)
|
||||
$commissionByRole[0]['amount'] = $totalExpectedCommission;
|
||||
|
||||
// 전환된 테넌트만 조회 (최신순, 페이지네이션)
|
||||
$tenants = Tenant::whereIn('id', $convertedTenantIds)
|
||||
->orderBy('created_at', 'desc')
|
||||
|
||||
Reference in New Issue
Block a user