294Fiscal Years
Accounting years and their monthly periods. Periods can be closed one by one.
Try it
Periods
Created by FiscalYearService.afterSave(); close a period to stop postings into it| # | Period | From | To | Status | |
|---|---|---|---|---|---|
| 1 | P01 Oct 2026 | 2026-10-01 | 2026-10-31 | OPEN | |
| 2 | P02 Nov 2026 | 2026-11-01 | 2026-11-30 | OPEN | |
| 3 | P03 Dec 2026 | 2026-12-01 | 2026-12-31 | OPEN | |
| 4 | P04 Jan 2027 | 2027-01-01 | 2027-01-31 | OPEN | |
| 5 | P05 Feb 2027 | 2027-02-01 | 2027-02-28 | OPEN | |
| 6 | P06 Mar 2027 | 2027-03-01 | 2027-03-31 | OPEN | |
| 7 | P07 Apr 2027 | 2027-04-01 | 2027-04-30 | OPEN | |
| 8 | P08 May 2027 | 2027-05-01 | 2027-05-31 | OPEN | |
| 9 | P09 Jun 2027 | 2027-06-01 | 2027-06-30 | OPEN | |
| 10 | P10 Jul 2027 | 2027-07-01 | 2027-07-31 | OPEN | |
| 11 | P11 Aug 2027 | 2027-08-01 | 2027-08-31 | OPEN | |
| 12 | P12 Sep 2027 | 2027-09-01 | 2027-09-30 | OPEN |
Which fiscal year is a date in?
FY2027
P02 Nov 2026 Β· OPEN
Thai government style: a fiscal year runs 1 Oct - 30 Sep, so 26 Oct 2026 is in FY2027.
| # | Code | Name | Start | End | Status | Current year | Status | |
|---|---|---|---|---|---|---|---|---|
| 2 | FY2027 | Fiscal year 2027 | 2026-10-01 | 2027-09-30 | OPEN | β | Active | βοΈ |
| 1 | FY2026 | Fiscal year 2026 | 2025-10-01 | 2026-09-30 | CLOSED | Active | βοΈ |
Showing 1β2 of 2
π Learn: how this master is built table fiscal_year
Key points
- afterSave hook runs in the same transaction: the year and its 12 periods commit together.
- V2__seed_data.sql builds the periods with a recursive CTE - compare it with FiscalYearService.afterSave().
Code
- Entity
domain/FiscalYear.java- Repository
repo/FiscalYearRepository.java- Definition
MasterRegistry: "fiscal-years"- Page / form
web/MasterController.java- Try-it panel
templates/tools/fiscal-periods.html- REST API
GET /api/fiscal-years/at?date=2026-10-26
SQL to try in SSMS (database MasterDataLabDB)
SELECT fy.code, p.period_no, p.name, p.start_date, p.end_date, p.status FROM fiscal_period p JOIN fiscal_year fy ON fy.id = p.fiscal_year_id WHERE CAST(GETDATE() AS DATE) BETWEEN p.start_date AND p.end_date;