From 3929c5fd1e34a0dad0f6b556e30f8b3fae72a7a9 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:38:17 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20[=EC=95=85=EC=84=B1=EC=B1=84=EA=B6=8C]?= =?UTF-8?q?=20tenant=5Fid=20=EC=BB=AC=EB=9F=BC=20ambiguous=20=EC=97=90?= =?UTF-8?q?=EB=9F=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - JOIN 쿼리에서 bad_debts.tenant_id로 테이블 명시 - BadDebtService, StatusBoardService 동일 수정 Co-Authored-By: Claude Opus 4.6 --- app/Services/BadDebtService.php | 2 +- app/Services/StatusBoardService.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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);