Skip to content

Commit

Permalink
fix: clear accounting dimension value when based on field changes
Browse files Browse the repository at this point in the history
(cherry picked from commit 21c993a)
  • Loading branch information
GursheenK authored and mergify[bot] committed Jul 25, 2023
1 parent ba95df2 commit 1fe6d4e
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@ frappe.require("assets/erpnext/js/financial_statements.js", function() {
"fieldtype": "Select",
"options": ["Cost Center", "Project", "Accounting Dimension"],
"default": "Cost Center",
"reqd": 1
"reqd": 1,
"on_change": function(query_report){
let based_on = query_report.get_values().based_on;
if(based_on!='Accounting Dimension'){
frappe.query_report.set_filter_value({
accounting_dimension: ''
});
}
}
},
{
"fieldname": "accounting_dimension",
Expand Down

0 comments on commit 1fe6d4e

Please sign in to comment.