Merge pull request #6482 from rohitwaghchaure/cash_flow_fix

[Fix] sub-heading is missing in the excel sheet of the cash flow
This commit is contained in:
Nabin Hait 2016-09-28 16:57:03 +05:30 committed by GitHub
commit eba0d83541
2 changed files with 4 additions and 4 deletions

View File

@ -59,7 +59,6 @@ def execute(filters=None):
company_currency = frappe.db.get_value("Company", filters.company, "default_currency") company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
for cash_flow_account in cash_flow_accounts: for cash_flow_account in cash_flow_accounts:
section_data = [] section_data = []
data.append({ data.append({
"account_name": cash_flow_account['section_header'], "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_data = get_account_type_based_data(filters.company,
account['account_type'], period_list, filters.accumulated_values) account['account_type'], period_list, filters.accumulated_values)
account_data.update({ account_data.update({
"account_name": account['label'], "account_name": account['label'],
"account": account['label'],
"indent": 1, "indent": 1,
"parent_account": cash_flow_account['section_header'], "parent_account": cash_flow_account['section_header'],
"currency": company_currency "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): def add_total_row_account(out, data, label, period_list, currency):
total_row = { total_row = {
"account_name": "'" + _("{0}").format(label) + "'", "account_name": "'" + _("{0}").format(label) + "'",
"account": None, "account": "'" + _("{0}").format(label) + "'",
"currency": currency "currency": currency
} }
for row in data: for row in data:

View File

@ -34,7 +34,7 @@ def get_net_profit_loss(income, expense, period_list, company):
total = 0 total = 0
net_profit_loss = { net_profit_loss = {
"account_name": "'" + _("Net Profit / Loss") + "'", "account_name": "'" + _("Net Profit / Loss") + "'",
"account": None, "account": "'" + _("Net Profit / Loss") + "'",
"warn_if_negative": True, "warn_if_negative": True,
"currency": frappe.db.get_value("Company", company, "default_currency") "currency": frappe.db.get_value("Company", company, "default_currency")
} }