fix:구독관리 탭 조회조건 변경 (contracted→hq_status=handover)
인계(handover) 완료된 업체 = 구독 업체로 간주. 기존 contracted() 스코프 + subscription_fee 조건 대신 hq_status='handover' 조건으로 변경. 불필요한 상태 필터 제거. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -269,13 +269,12 @@ public function customerTab(Request $request): View
|
||||
*/
|
||||
public function subscriptionTab(Request $request): View
|
||||
{
|
||||
// subscription_fee > 0인 계약상품이 있는 관리건 조회
|
||||
// 인계(handover) 완료된 업체 = 구독 업체
|
||||
$query = SalesTenantManagement::with([
|
||||
'tenant', 'tenantProspect', 'salesPartner.user',
|
||||
'manager', 'contractProducts.product', 'contractProducts.category',
|
||||
])
|
||||
->contracted()
|
||||
->whereHas('contractProducts', fn($q) => $q->where('subscription_fee', '>', 0));
|
||||
->where('hq_status', 'handover');
|
||||
|
||||
// 검색 필터
|
||||
if ($search = $request->input('search')) {
|
||||
@@ -285,13 +284,6 @@ public function subscriptionTab(Request $request): View
|
||||
});
|
||||
}
|
||||
|
||||
// 상태 필터
|
||||
if ($status = $request->input('status')) {
|
||||
if ($status !== 'all') {
|
||||
$query->where('status', $status);
|
||||
}
|
||||
}
|
||||
|
||||
$managements = $query->orderBy('contracted_at', 'desc')->get();
|
||||
|
||||
// 통계 계산
|
||||
|
||||
Reference in New Issue
Block a user