diff --git a/erpnext/accounts/report/balance_sheet/balance_sheet.js b/erpnext/accounts/report/balance_sheet/balance_sheet.js index 0863c68009a..d3a0006e6f7 100644 --- a/erpnext/accounts/report/balance_sheet/balance_sheet.js +++ b/erpnext/accounts/report/balance_sheet/balance_sheet.js @@ -30,3 +30,5 @@ frappe.query_reports["Balance Sheet"]["filters"].push({ fieldtype: "Check", default: 1, }); + +frappe.query_reports["Balance Sheet"]["export_hidden_cols"] = true; diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index 23f1d48392f..ba6c9887e11 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -295,6 +295,8 @@ def prepare_data(accounts, balance_must_be, period_list, company_currency, accum "account_name": ( f"{_(d.account_number)} - {_(d.account_name)}" if d.account_number else _(d.account_name) ), + "acc_name": d.account_name, + "acc_number": d.account_number, } ) for period in period_list: @@ -650,6 +652,25 @@ def get_columns(periodicity, period_list, accumulated_values=1, company=None, ca "width": 300, } ] + if not cash_flow: + columns.extend( + [ + { + "fieldname": "acc_name", + "label": _("Account Name"), + "fieldtype": "Data", + "width": 250, + "hidden": 1, + }, + { + "fieldname": "acc_number", + "label": _("Account Number"), + "fieldtype": "Data", + "width": 120, + "hidden": 1, + }, + ] + ) if company: columns.append( { diff --git a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.js b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.js index 98c6656ca3f..832aebe0f10 100644 --- a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.js +++ b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.js @@ -31,3 +31,5 @@ frappe.query_reports["Profit and Loss Statement"]["filters"].push({ fieldtype: "Check", default: 1, }); + +frappe.query_reports["Profit and Loss Statement"]["export_hidden_cols"] = true;