From 7441a93a10efa4b13b0878dbe3753235a4597118 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 28 Sep 2016 14:57:57 +0530 Subject: [PATCH] [Fix] sub-heading is missing in the excel sheet of the cash flow --- erpnext/accounts/report/cash_flow/cash_flow.py | 6 +++--- .../profit_and_loss_statement/profit_and_loss_statement.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/report/cash_flow/cash_flow.py b/erpnext/accounts/report/cash_flow/cash_flow.py index 3407526516..35d501aef9 100644 --- a/erpnext/accounts/report/cash_flow/cash_flow.py +++ b/erpnext/accounts/report/cash_flow/cash_flow.py @@ -59,7 +59,6 @@ def execute(filters=None): company_currency = frappe.db.get_value("Company", filters.company, "default_currency") for cash_flow_account in cash_flow_accounts: - section_data = [] data.append({ "account_name": cash_flow_account['section_header'], @@ -82,7 +81,8 @@ def execute(filters=None): account_data = get_account_type_based_data(filters.company, account['account_type'], period_list, filters.accumulated_values) account_data.update({ - "account_name": account['label'], + "account_name": account['label'], + "account": account['label'], "indent": 1, "parent_account": cash_flow_account['section_header'], "currency": company_currency @@ -129,7 +129,7 @@ def get_account_type_based_data(company, account_type, period_list, accumulated_ def add_total_row_account(out, data, label, period_list, currency): total_row = { "account_name": "'" + _("{0}").format(label) + "'", - "account": None, + "account": "'" + _("{0}").format(label) + "'", "currency": currency } for row in data: diff --git a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py index 62d6e69623..f9e43dbf0c 100644 --- a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py +++ b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py @@ -34,7 +34,7 @@ def get_net_profit_loss(income, expense, period_list, company): total = 0 net_profit_loss = { "account_name": "'" + _("Net Profit / Loss") + "'", - "account": None, + "account": "'" + _("Net Profit / Loss") + "'", "warn_if_negative": True, "currency": frappe.db.get_value("Company", company, "default_currency") }