fix:단체 파트너 수당 계산 요율 수정 (15%→30%, 10%→20%)

기존: 개발비 × 50% × 요율로 미리 반감 후 또 50% 분할 → 이중 반감 오류
수정: 개발비 × 요율(개인 20%, 단체 30%)로 계산, 1차/2차 분할은 별도 처리

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
김보곤
2026-02-19 08:25:22 +09:00
parent b4581299e2
commit 743c0250bb

View File

@@ -179,8 +179,8 @@ private function getDashboardData(Request $request): array
$handoverTotalRegFee = SalesContractProduct::whereIn('management_id', $handoverManagementIds)
->sum('registration_fee');
// 수당 계산: 개발비 × 50% × 요율% (개인 20% → 10%, 단체 30% → 15%)
$handoverPartnerRate = $isGroupPartner ? 0.15 : 0.10;
// 수당 계산: 개발비 × 요율% (개인 20%, 단체 30%) - 1차/2차 분할은 calculateExpectedCommissionSummary에서 처리
$handoverPartnerRate = $isGroupPartner ? 0.30 : 0.20;
$handoverPartnerCommission = (int)($handoverTotalRegFee * $handoverPartnerRate);
// 내가 매니저로 지정된 인계 완료 건의 수당 계산
@@ -278,7 +278,7 @@ private function getDashboardData(Request $request): array
->toArray();
$devInProgressRegFee = SalesContractProduct::whereIn('management_id', $devInProgressManagementIds)
->sum('registration_fee');
$expectedFromDevInProgress = (int)($devInProgressRegFee * $handoverPartnerRate); // 개발비 × 요율 (개인 10%, 단체 15%)
$expectedFromDevInProgress = (int)($devInProgressRegFee * $handoverPartnerRate); // 개발비 × 요율 (개인 20%, 단체 30%)
// 2) 인계 완료 중 지급 미완료 건
$handoverUnpaidRegFee = SalesContractProduct::whereIn('management_id', $handoverManagementIds)