diff --git a/erpnext/accounts/report/profitability_analysis/profitability_analysis.js b/erpnext/accounts/report/profitability_analysis/profitability_analysis.js index 4412212d2e..b45fe6fe5d 100644 --- a/erpnext/accounts/report/profitability_analysis/profitability_analysis.js +++ b/erpnext/accounts/report/profitability_analysis/profitability_analysis.js @@ -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",