fix: [악성채권] JOIN 쿼리 나머지 컬럼 테이블 prefix 보완
- is_active, status 컬럼에도 bad_debts. prefix 추가 - BadDebtService, StatusBoardService 동일 수정 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -87,7 +87,7 @@ public function summary(array $params = []): array
|
||||
// is_active=true인 악성채권만 통계
|
||||
$query = BadDebt::query()
|
||||
->where('bad_debts.tenant_id', $tenantId)
|
||||
->where('is_active', true);
|
||||
->where('bad_debts.is_active', true);
|
||||
|
||||
// 거래처 필터
|
||||
if (! empty($params['client_id'])) {
|
||||
|
||||
@@ -69,8 +69,8 @@ private function getBadDebtStatus(int $tenantId): array
|
||||
{
|
||||
$query = BadDebt::query()
|
||||
->where('bad_debts.tenant_id', $tenantId)
|
||||
->where('status', BadDebt::STATUS_COLLECTING)
|
||||
->where('is_active', true);
|
||||
->where('bad_debts.status', BadDebt::STATUS_COLLECTING)
|
||||
->where('bad_debts.is_active', true);
|
||||
|
||||
$count = (clone $query)->count();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user