fix: Dimension filters in accounting reports

This commit is contained in:
Deepesh Garg 2020-12-04 11:28:26 +05:30
parent 12b45b3f2a
commit 7b2d518059

View File

@ -194,7 +194,11 @@ $.extend(erpnext.utils, {
add_dimensions: function(report_name, index) {
let filters = frappe.query_reports[report_name].filters;
erpnext.dimension_filters.forEach((dimension) => {
frappe.call({
method: "erpnext.accounts.doctype.accounting_dimension.accounting_dimension.get_dimensions",
callback: function(r) {
let accounting_dimensions = r.message[0];
accounting_dimensions.forEach((dimension) => {
let found = filters.some(el => el.fieldname === dimension['fieldname']);
if (!found) {
@ -206,6 +210,8 @@ $.extend(erpnext.utils, {
});
}
});
}
});
},
make_subscription: function(doctype, docname) {