How do I setup a non standard fiscal year?


I’m quite new to ERPNext (did my first two PRs today for RHEL compat on github/bench), and would like to use ERPNext for my company.

When I created my company, we’ve decided that the first fiscal year would go from creation date to 31st December 2023 (which is legal for a first fiscal year).

When setting up ERPNext (v13), a fiscal year is created from current date to current date +1 year.
I cannot modify this, nor can I create another fiscal year that goes from 26th Apr 2022 to 31st Dec 2023, since ERPNext would complain that a fiscal year cannot be longer than one year.

Since I do need a first “long” fiscal year to match my company, is there a way to have my first fiscal year longer than 1 year ?
Maybe by doing an SQL request ? Would that be sufficient ?

Something like the following perhaps ?
UPDATE 'tabFisacal Year' set year_start_date = '2022-04-26', year_end_date = '2023-12-31' WHERE name = '2022-2023'

Would that work ?

Thanks for your help.
Best regards.

Could anyone perhaps give me an advice ?

Hi there,

Your sql query should work, and you could even do it directly from your site using the System Console page. The question is whether there are any processes elsewhere in ERPNext that assume a 12-month year. It’s a tricky one to answer.

The main importance of fiscal year is for creating period closing vouchers, and I strongly suspect that having a term >1y wouldn’t be a problem here. The next issue would be reports. I’m not sure if any of them assume a 12mo structure, but if they do you might see some weird data.

Another potential issue that jumps out at me is income tax in payroll, but that shouldn’t be an issue if you define normal yearly payroll periods. The payroll module uses fiscal year as a default if no payroll period is defined, but the whole point of that design is to allow your fiscal year and your employee’s income tax year to be out of sync.

This isn’t a crystal clear answer, I realize, and I wish I could give a more definitive answer. If it were me, I’d give it a shot and test around a bit. The things to check would be period closing vouchers and the reports you need.

Thank you @peterg

I ended up adapting the fiscal year via console:

bench console

from erpnext.accounts.doctype.fiscal_year.fiscal_year import FiscalYear
doc = frappe.get_doc("Fiscal Year", "2022-2023")
doc.year_end_date = "2023-12-31"
FiscalYear.validate = lambda x: ""

I’ll see if I happen to get trouble with reports.

1 Like

Hi @deajan
How did updating the fiscal year on the console go? I’ve also updated directly on the database and not seeing errors for now. Just wondering if its the right way to update.