feat: [finance] 손익계산서 월별 조회 API + 리팩토링
- GET /api/v1/income-statement/monthly?year=2026&unit=won 추가 - buildSections 공통 로직 분리 - getAccountCodes, getFiscalYear 헬퍼 분리
This commit is contained in:
@@ -28,4 +28,19 @@ public function index(Request $request)
|
||||
return $this->service->data($request->only(['start_date', 'end_date', 'unit']));
|
||||
}, __('message.fetched'));
|
||||
}
|
||||
|
||||
/**
|
||||
* 손익계산서 월별 조회
|
||||
*/
|
||||
public function monthly(Request $request)
|
||||
{
|
||||
$request->validate([
|
||||
'year' => 'required|integer|min:2020|max:2100',
|
||||
'unit' => 'nullable|in:won,thousand,million',
|
||||
]);
|
||||
|
||||
return ApiResponse::handle(function () use ($request) {
|
||||
return $this->service->monthly($request->only(['year', 'unit']));
|
||||
}, __('message.fetched'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user