fix: dimension filter query

This commit is contained in:
Deepesh Garg 2020-11-15 22:43:48 +05:30
parent 96e874bfda
commit 6e5748e2a3

View File

@ -116,6 +116,25 @@ $.extend(erpnext.queries, {
] ]
} }
},
get_filtered_dimensions: function(doc, child_fields, dimension, company) {
let account = '';
child_fields.forEach((field) => {
if (!account) {
account = doc[field];
}
});
return {
query: "erpnext.controllers.queries.get_filtered_dimensions",
filters: {
'dimension': dimension,
'account': account,
'company': company
}
}
} }
}); });