From b74c8f8930ce0febb94a50c470cfa65bcdbd77de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Thu, 5 Mar 2026 17:08:41 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20[hr]=20=EC=9E=94=EC=97=AC=EC=97=B0?= =?UTF-8?q?=EC=B0=A8=20=ED=83=AD=EC=97=90=EC=84=9C=20=EC=98=81=EC=97=85?= =?UTF-8?q?=ED=8C=80+=EC=A0=9C=EC=99=B8=20=EC=82=AC=EC=9B=90=20=ED=95=84?= =?UTF-8?q?=ED=84=B0=EB=A7=81=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/HR/LeaveService.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/Services/HR/LeaveService.php b/app/Services/HR/LeaveService.php index f20e0563..ab4f1181 100644 --- a/app/Services/HR/LeaveService.php +++ b/app/Services/HR/LeaveService.php @@ -500,6 +500,15 @@ public function getBalanceSummary(?int $year = null, ?string $sort = null, ?stri ->with(['user:id,name', 'department:id,name']) ->forTenant($tenantId) ->whereIn('employee_status', $statusFilter) + ->where(function ($q) { + $q->whereDoesntHave('department', function ($dq) { + $dq->where('name', 'like', '%영업팀%'); + })->orWhereNull('department_id'); + }) + ->where(function ($q) { + $q->whereNull('json_extra->is_excluded') + ->orWhere('json_extra->is_excluded', false); + }) ->get(); // (3) 기존 balance 일괄 조회