diff --git a/app/Services/BadDebtService.php b/app/Services/BadDebtService.php index 063155c..abf2724 100644 --- a/app/Services/BadDebtService.php +++ b/app/Services/BadDebtService.php @@ -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); // 거래처 필터 diff --git a/app/Services/StatusBoardService.php b/app/Services/StatusBoardService.php index 4a26290..837d109 100644 --- a/app/Services/StatusBoardService.php +++ b/app/Services/StatusBoardService.php @@ -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);