refactor:용어 변경 - 가입비 → 개발비
영업 관련 코드 및 문서 전체에서 "가입비"를 "개발비"로 변경 - 컨트롤러, 서비스, 모델 - 뷰 템플릿 (blade 파일) - 가이드북 문서 (마크다운) - 설정 파일 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -107,7 +107,7 @@ private function getDashboardData(Request $request): array
|
||||
$commissionRate = $totalCommission > 0 ? round(($paidCommission / $totalCommission) * 100, 1) : 0;
|
||||
|
||||
$stats = [
|
||||
'total_membership_fee' => $totalMembershipFee, // 총 가입비
|
||||
'total_membership_fee' => $totalMembershipFee, // 총 개발비
|
||||
'total_commission' => $totalCommission, // 총 수당
|
||||
'commission_rate' => $commissionRate, // 지급 완료 비율
|
||||
'total_contracts' => $totalContracts, // 전체 건수
|
||||
@@ -141,7 +141,7 @@ private function getDashboardData(Request $request): array
|
||||
[
|
||||
'name' => '협업지원금',
|
||||
'rate' => null, // 메뉴당 2,000원
|
||||
'amount' => null, // 가입비 완납 시 계산
|
||||
'amount' => null, // 개발비 완납 시 계산
|
||||
'color' => 'purple',
|
||||
],
|
||||
];
|
||||
@@ -157,12 +157,12 @@ private function getDashboardData(Request $request): array
|
||||
->where('hq_status', SalesTenantManagement::HQ_STATUS_HANDOVER)
|
||||
->get();
|
||||
|
||||
// 인계 완료된 계약의 가입비 합계
|
||||
// 인계 완료된 계약의 개발비 합계
|
||||
$handoverManagementIds = $handoverManagements->pluck('id')->toArray();
|
||||
$handoverTotalRegFee = SalesContractProduct::whereIn('management_id', $handoverManagementIds)
|
||||
->sum('registration_fee');
|
||||
|
||||
// 수당 계산: 가입비 × 50% × 20% = 가입비 × 10%
|
||||
// 수당 계산: 개발비 × 50% × 20% = 개발비 × 10%
|
||||
$handoverPartnerCommission = (int)($handoverTotalRegFee * 0.10);
|
||||
|
||||
// 내가 매니저로 지정된 인계 완료 건의 수당 계산
|
||||
@@ -185,7 +185,7 @@ private function getDashboardData(Request $request): array
|
||||
$commissionByRole[0]['amount'] = $partnerCommissionTotal;
|
||||
$commissionByRole[1]['amount'] = $managerCommissionTotal;
|
||||
|
||||
// 총 가입비 대비 수당 비율
|
||||
// 총 개발비 대비 수당 비율
|
||||
$totalCommissionRatio = $totalMembershipFee > 0 ? round(($totalCommission / $totalMembershipFee) * 100, 1) : 0;
|
||||
|
||||
// 1) 내가 등록한 가망고객에서 전환된 tenant_id (20% 수당)
|
||||
@@ -231,7 +231,7 @@ private function getDashboardData(Request $request): array
|
||||
$tenantStats = [
|
||||
'total_tenants' => count($convertedTenantIds) + $handoverProspectCount, // 관리 테넌트 + 인계완료
|
||||
'total_prospects' => $prospects->count(), // 진행중 가망고객
|
||||
'total_membership_revenue' => $totalMembershipFee, // 총 가입비 실적
|
||||
'total_membership_revenue' => $totalMembershipFee, // 총 개발비 실적
|
||||
'total_commission_accumulated' => $totalCommission, // 누적 수당
|
||||
'confirmed_commission' => $paidCommission, // 확정(지급완료) 수당
|
||||
];
|
||||
@@ -257,7 +257,7 @@ private function getDashboardData(Request $request): array
|
||||
->toArray();
|
||||
$devInProgressRegFee = SalesContractProduct::whereIn('management_id', $devInProgressManagementIds)
|
||||
->sum('registration_fee');
|
||||
$expectedFromDevInProgress = (int)($devInProgressRegFee * 0.10); // 가입비 × 10%
|
||||
$expectedFromDevInProgress = (int)($devInProgressRegFee * 0.10); // 개발비 × 10%
|
||||
|
||||
// 2) 인계 완료 중 지급 미완료 건
|
||||
$handoverUnpaidRegFee = SalesContractProduct::whereIn('management_id', $handoverManagementIds)
|
||||
@@ -614,11 +614,11 @@ private function calculatePartnerSummaryStats(array $partnerIds, int $currentUse
|
||||
// 하위 파트너들이 등록한 총 영업권(명함) 수
|
||||
$totalProspects = TenantProspect::whereIn('registered_by', $partnerIds)->count();
|
||||
|
||||
// 예상 수당 계산을 위해 먼저 가입비/구독료 정보 조회
|
||||
// 예상 수당 계산을 위해 먼저 개발비/구독료 정보 조회
|
||||
$prospectIds = TenantProspect::whereIn('registered_by', $partnerIds)->pluck('id')->toArray();
|
||||
$managementIds = SalesTenantManagement::whereIn('tenant_prospect_id', $prospectIds)->pluck('id')->toArray();
|
||||
|
||||
// 하위 파트너들의 계약 건수 (가입비가 설정된 건수)
|
||||
// 하위 파트너들의 계약 건수 (개발비가 설정된 건수)
|
||||
$contractedManagementCount = SalesContractProduct::whereIn('management_id', $managementIds)
|
||||
->where('registration_fee', '>', 0)
|
||||
->distinct('management_id')
|
||||
|
||||
Reference in New Issue
Block a user