fix: [악성채권] tenant_id 컬럼 ambiguous 에러 수정

- JOIN 쿼리에서 bad_debts.tenant_id로 테이블 명시
- BadDebtService, StatusBoardService 동일 수정

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
유병철
2026-03-09 16:38:17 +09:00
parent 56c60ec3df
commit 3929c5fd1e
2 changed files with 2 additions and 2 deletions

View File

@@ -86,7 +86,7 @@ public function summary(array $params = []): array
// is_active=true인 악성채권만 통계
$query = BadDebt::query()
->where('tenant_id', $tenantId)
->where('bad_debts.tenant_id', $tenantId)
->where('is_active', true);
// 거래처 필터

View File

@@ -68,7 +68,7 @@ private function getOrdersStatus(int $tenantId, Carbon $today): array
private function getBadDebtStatus(int $tenantId): array
{
$query = BadDebt::query()
->where('tenant_id', $tenantId)
->where('bad_debts.tenant_id', $tenantId)
->where('status', BadDebt::STATUS_COLLECTING)
->where('is_active', true);