diff --git a/app/Services/BadDebtService.php b/app/Services/BadDebtService.php index abf2724..b4383e0 100644 --- a/app/Services/BadDebtService.php +++ b/app/Services/BadDebtService.php @@ -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'])) { diff --git a/app/Services/StatusBoardService.php b/app/Services/StatusBoardService.php index 837d109..48d3875 100644 --- a/app/Services/StatusBoardService.php +++ b/app/Services/StatusBoardService.php @@ -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();