From ca259ccb1800b879737cabbc73cda72f73bbb1ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9C=A0=EB=B3=91=EC=B2=A0?= Date: Mon, 9 Mar 2026 16:43:12 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20[=EC=95=85=EC=84=B1=EC=B1=84=EA=B6=8C]?= =?UTF-8?q?=20JOIN=20=EC=BF=BC=EB=A6=AC=20=EB=82=98=EB=A8=B8=EC=A7=80=20?= =?UTF-8?q?=EC=BB=AC=EB=9F=BC=20=ED=85=8C=EC=9D=B4=EB=B8=94=20prefix=20?= =?UTF-8?q?=EB=B3=B4=EC=99=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - is_active, status 컬럼에도 bad_debts. prefix 추가 - BadDebtService, StatusBoardService 동일 수정 Co-Authored-By: Claude Opus 4.6 --- app/Services/BadDebtService.php | 2 +- app/Services/StatusBoardService.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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();