How to get current fiscal_year, start_date and end_date in custom script

Hi Everyone,

Is there any way that I can get current fiscal_year (not disabled), start_date and end_date using custom script?

Regards
Ruchin Sharma

To get default user/global fiscal year, start_date and end_date, use:

frappe.defaults.get_user_default("fiscal_year") frappe.defaults.get_user_default("year_start_date")
frappe.defaults.get_user_default("year_end_date")

5 Likes

Dear Nabin,

Its not working.

Regards
Ruchin Sharma

Hi @nabinhait
I am using it for client side but it is not working.

Regards
Ruchin Sharma

It should work. Check https://github.com/frappe/erpnext/blob/develop/erpnext/accounts/report/trial_balance/trial_balance.js#L20

Can you please provide the code where you are using it?