feat: [finance] 손익계산서 월별 조회 API + 리팩토링

- GET /api/v1/income-statement/monthly?year=2026&unit=won 추가
- buildSections 공통 로직 분리
- getAccountCodes, getFiscalYear 헬퍼 분리
This commit is contained in:
김보곤
2026-03-19 12:49:04 +09:00
parent 848711583a
commit dcf97b468d
3 changed files with 96 additions and 32 deletions

View File

@@ -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'));
}
}