fix: [hr] 잔여연차 탭에서 영업팀+제외 사원 필터링 적용

This commit is contained in:
김보곤
2026-03-05 17:08:41 +09:00
parent add05c6546
commit b74c8f8930

View File

@@ -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 일괄 조회