mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-17 02:26:33 +00:00
fix: fiscal year error on new setup and continuous request (#47431)
fix: fiscal year error on new setup
This commit is contained in:
@@ -432,8 +432,9 @@ $.extend(erpnext.utils, {
|
||||
if (!frappe.boot.setup_complete) {
|
||||
return;
|
||||
}
|
||||
const today = frappe.datetime.get_today();
|
||||
if (!date) {
|
||||
date = frappe.datetime.get_today();
|
||||
date = today;
|
||||
}
|
||||
|
||||
let fiscal_year = "";
|
||||
@@ -444,7 +445,7 @@ $.extend(erpnext.utils, {
|
||||
) {
|
||||
if (with_dates) fiscal_year = frappe.boot.current_fiscal_year;
|
||||
else fiscal_year = frappe.boot.current_fiscal_year[0];
|
||||
} else {
|
||||
} else if (today != date) {
|
||||
frappe.call({
|
||||
method: "erpnext.accounts.utils.get_fiscal_year",
|
||||
type: "GET", // make it cacheable
|
||||
|
||||
Reference in New Issue
Block a user