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 erpnext/trial_balance.js at develop · frappe/erpnext · GitHub

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