feat: [finance] vendors 및 supplier-settings API 추가

- GET /api/v1/vendors: 거래처 간단 목록 (id, name) 반환
- GET /api/v1/tax-invoices/supplier-settings: 공급자 설정 조회
- PUT /api/v1/tax-invoices/supplier-settings: 공급자 설정 저장
This commit is contained in:
김보곤
2026-03-17 16:11:42 +09:00
parent 17a0d2f98d
commit d1c65f5465
4 changed files with 90 additions and 0 deletions

View File

@@ -113,6 +113,22 @@ public function index(array $params)
return $paginator;
}
/**
* 거래처 간단 목록 (id, name만 반환) - vendors 엔드포인트용
*/
public function vendors(array $params): array
{
$tenantId = $this->tenantId();
$perPage = (int) ($params['per_page'] ?? 9999);
return Client::where('tenant_id', $tenantId)
->where('is_active', true)
->orderBy('name')
->limit($perPage)
->get(['id', 'name'])
->toArray();
}
/** 단건 */
public function show(int $id)
{