From cad15cdec25d630dc14819647f745d8936c8f908 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 1 Jan 2024 14:46:15 +0530 Subject: [PATCH] fix: undefined error in Budget Variance and Profitability report 'Budget' and 'Budget Account' doesn't have support for dynamic dimension. It only supports hard-coded ones - Project and Cost Center (cherry picked from commit 92bc962f60adb3967a2ef378511822d53ff2f4a8) # Conflicts: # erpnext/accounts/report/profitability_analysis/profitability_analysis.js --- .../budget_variance_report/budget_variance_report.js | 4 ---- .../profitability_analysis/profitability_analysis.js | 10 ++++++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/report/budget_variance_report/budget_variance_report.js b/erpnext/accounts/report/budget_variance_report/budget_variance_report.js index 5955c2e0fc9..2c00bd738ce 100644 --- a/erpnext/accounts/report/budget_variance_report/budget_variance_report.js +++ b/erpnext/accounts/report/budget_variance_report/budget_variance_report.js @@ -88,7 +88,3 @@ frappe.query_reports["Budget Variance Report"] = { return value; } } - -erpnext.dimension_filters.forEach((dimension) => { - frappe.query_reports["Budget Variance Report"].filters[4].options.push(dimension["document_type"]); -}); diff --git a/erpnext/accounts/report/profitability_analysis/profitability_analysis.js b/erpnext/accounts/report/profitability_analysis/profitability_analysis.js index c4054a977a8..7a430077022 100644 --- a/erpnext/accounts/report/profitability_analysis/profitability_analysis.js +++ b/erpnext/accounts/report/profitability_analysis/profitability_analysis.js @@ -119,8 +119,18 @@ frappe.require("assets/erpnext/js/financial_statements.js", function() { "initial_depth": 3 } +<<<<<<< HEAD erpnext.dimension_filters.forEach((dimension) => { frappe.query_reports["Profitability Analysis"].filters[1].options.push(dimension["document_type"]); }); }); +======= + frappe.set_route("query-report", "Profit and Loss Statement"); + }, + "tree": true, + "name_field": "account", + "parent_field": "parent_account", + "initial_depth": 3 +} +>>>>>>> 92bc962f60 (fix: undefined error in Budget Variance and Profitability report)