Merge pull request #40931 from cogk/fix-dont-call-get_fiscal_year-before-setup-is-done
fix: Don't call get_fiscal_year if setup is not done yet
diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js
index 4127218..8478e20 100755
--- a/erpnext/public/js/utils.js
+++ b/erpnext/public/js/utils.js
@@ -452,6 +452,9 @@
},
get_fiscal_year: function (date, with_dates = false, boolean = false) {
+ if (!frappe.boot.setup_complete) {
+ return;
+ }
if (!date) {
date = frappe.datetime.get_today();
}