feat: [stock,client,status-board] 날짜 필터 및 조건 보완

- StockController/StockService: 입출고 이력 기반 날짜 범위 필터 추가
- ClientService: 등록일 기간 필터(start_date/end_date) 추가
- StatusBoardService: 부실채권 현황에 is_active 조건 추가 (목록 페이지 일치)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
유병철
2026-03-03 21:53:30 +09:00
parent ad27090bfc
commit 42443349dc
4 changed files with 27 additions and 0 deletions

View File

@@ -22,6 +22,8 @@ public function index(array $params)
$q = trim((string) ($params['q'] ?? ''));
$onlyActive = $params['only_active'] ?? null;
$clientType = $params['client_type'] ?? null;
$startDate = $params['start_date'] ?? null;
$endDate = $params['end_date'] ?? null;
$query = Client::query()->where('tenant_id', $tenantId);
@@ -43,6 +45,14 @@ public function index(array $params)
$query->whereIn('client_type', $types);
}
// 등록일 기간 필터
if ($startDate) {
$query->whereDate('created_at', '>=', $startDate);
}
if ($endDate) {
$query->whereDate('created_at', '<=', $endDate);
}
$query->orderBy('client_code')->orderBy('id');
$paginator = $query->paginate($size, ['*'], 'page', $page);