diff --git a/erpnext/accounts/doctype/account/account.js b/erpnext/accounts/doctype/account/account.js index f26d1f82797..e9fc37992a6 100644 --- a/erpnext/accounts/doctype/account/account.js +++ b/erpnext/accounts/doctype/account/account.js @@ -94,8 +94,8 @@ frappe.ui.form.on("Account", { function () { frappe.route_options = { account: frm.doc.name, - from_date: frappe.sys_defaults.year_start_date, - to_date: frappe.sys_defaults.year_end_date, + from_date: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], + to_date: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], company: frm.doc.company, }; frappe.set_route("query-report", "General Ledger"); diff --git a/erpnext/accounts/doctype/account/account_tree.js b/erpnext/accounts/doctype/account/account_tree.js index e0bfa6e902a..3b939aa3920 100644 --- a/erpnext/accounts/doctype/account/account_tree.js +++ b/erpnext/accounts/doctype/account/account_tree.js @@ -279,8 +279,8 @@ frappe.treeview_settings["Account"] = { click: function (node, btn) { frappe.route_options = { account: node.label, - from_date: frappe.sys_defaults.year_start_date, - to_date: frappe.sys_defaults.year_end_date, + from_date: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], + to_date: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], company: frappe.treeview_settings["Account"].treeview.page.fields_dict.company.get_value(), }; diff --git a/erpnext/stock/report/batch_item_expiry_status/batch_item_expiry_status.js b/erpnext/stock/report/batch_item_expiry_status/batch_item_expiry_status.js index a15b69b112a..5ec424f4c24 100644 --- a/erpnext/stock/report/batch_item_expiry_status/batch_item_expiry_status.js +++ b/erpnext/stock/report/batch_item_expiry_status/batch_item_expiry_status.js @@ -8,7 +8,7 @@ frappe.query_reports["Batch Item Expiry Status"] = { label: __("From Date"), fieldtype: "Date", width: "80", - default: frappe.sys_defaults.year_start_date, + default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], reqd: 1, }, { diff --git a/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.js b/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.js index 401ebe43028..f48e0101a0f 100644 --- a/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.js +++ b/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.js @@ -16,7 +16,7 @@ frappe.query_reports["Batch-Wise Balance History"] = { label: __("From Date"), fieldtype: "Date", width: "80", - default: frappe.sys_defaults.year_start_date, + default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], reqd: 1, }, { diff --git a/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js b/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js index 3b12dab939a..8d46b14a177 100644 --- a/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js +++ b/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js @@ -7,7 +7,7 @@ frappe.query_reports["Itemwise Recommended Reorder Level"] = { fieldname: "from_date", label: __("From Date"), fieldtype: "Date", - default: frappe.sys_defaults.year_start_date, + default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], }, { fieldname: "to_date",