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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user