fix: Default year start and end dates in reports

This commit is contained in:
Deepesh Garg
2023-07-24 11:58:16 +05:30
parent 781e57f5bf
commit 3c92686f0a
31 changed files with 53 additions and 50 deletions

View File

@@ -400,7 +400,7 @@ $.extend(erpnext.utils, {
});
},
get_fiscal_year: function(date) {
get_fiscal_year: function(date, with_dates) {
if(!date) {
date = frappe.datetime.get_today();
}
@@ -414,7 +414,10 @@ $.extend(erpnext.utils, {
async: false,
callback: function(r) {
if (r.message) {
fiscal_year = r.message[0];
if (with_dates)
fiscal_year = r.message;
else
fiscal_year = r.message[0];
}
}
});