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:
@@ -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);
|
||||
|
||||
// 거래처 필터
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user