From c66d57d4906ccc6eaa908052f135fbb1f8bf0e97 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 26 Nov 2024 15:33:04 +0530 Subject: [PATCH] fix: broken export on statements --- erpnext/accounts/report/financial_statements.py | 2 +- erpnext/public/js/financial_statements.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index 2b8f93d6996..44b74463336 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -619,7 +619,7 @@ def get_cost_centers_with_children(cost_centers): def get_columns(periodicity, period_list, accumulated_values=1, company=None, cash_flow=False): columns = [ { - "fieldname": "stub", + "fieldname": "account", "label": _("Account") if not cash_flow else _("Section"), "fieldtype": "Link", "options": "Account", diff --git a/erpnext/public/js/financial_statements.js b/erpnext/public/js/financial_statements.js index 5ad879f639a..1d323ccd46e 100644 --- a/erpnext/public/js/financial_statements.js +++ b/erpnext/public/js/financial_statements.js @@ -33,7 +33,7 @@ erpnext.financial_statements = { return value; } else if (frappe.query_report.get_filter_value("selected_view") == "Margin" && data) { - if (column.fieldname == "stub" && data.account_name == __("Income")) { + if (column.fieldname == "account" && data.account_name == __("Income")) { //Taking the total income from each column (for all the financial years) as the base (100%) this.baseData = row; } @@ -52,7 +52,7 @@ erpnext.financial_statements = { } } - if (data && column.fieldname == "stub") { + if (data && column.fieldname == "account") { // first column value = data.section_name || data.account_name || value;