Export total labels

This commit is contained in:
Ricardo Johann 2017-03-28 01:49:11 -03:00 committed by Nabin Hait
parent 0dd00eb418
commit 3d1434afe7
4 changed files with 15 additions and 8 deletions

View File

@ -26,7 +26,7 @@ def execute(filters=None):
if opening_balance and round(opening_balance,2) !=0:
unclosed ={
"account_name": "'" + _("Unclosed Fiscal Years Profit / Loss (Credit)") + "'",
"account": None,
"account": "'" + _("Unclosed Fiscal Years Profit / Loss (Credit)") + "'",
"warn_if_negative": True,
"currency": frappe.db.get_value("Company", filters.company, "default_currency")
}
@ -57,7 +57,7 @@ def get_provisional_profit_loss(asset, liability, equity, period_list, company):
currency = frappe.db.get_value("Company", company, "default_currency")
total_row = {
"account_name": "'" + _("Total (Credit)") + "'",
"account": None,
"account": "'" + _("Total (Credit)") + "'",
"warn_if_negative": True,
"currency": currency
}
@ -85,7 +85,7 @@ def get_provisional_profit_loss(asset, liability, equity, period_list, company):
if has_value:
provisional_profit_loss.update({
"account_name": "'" + _("Provisional Profit / Loss (Credit)") + "'",
"account": None,
"account": "'" + _("Provisional Profit / Loss (Credit)") + "'",
"warn_if_negative": True,
"currency": currency
})

View File

@ -216,7 +216,7 @@ def filter_out_zero_value_rows(data, parent_children_map, show_zero_values=False
def add_total_row(out, root_type, balance_must_be, period_list, company_currency):
total_row = {
"account_name": "'" + _("Total {0} ({1})").format(root_type, balance_must_be) + "'",
"account": None,
"account": "'" + _("Total {0} ({1})").format(root_type, balance_must_be) + "'",
"currency": company_currency
}

View File

@ -60,7 +60,11 @@ def calculate_values(accounts, gl_entries_by_account, filters):
"warn_if_negative": True,
"income": 0.0,
"expense": 0.0,
"gross_profit_loss": 0.0
"gross_profit_loss": 0.0,
"account": "'" + _("Total") + "'",
"parent_account": None,
"indent": 0,
"has_value": True
}
for d in accounts:

View File

@ -130,11 +130,14 @@ def calculate_values(accounts, gl_entries_by_account, opening_balances, filters)
}
total_row = {
"account": None,
"account_name": _("Total"),
"account": "'" + _("Total") + "'",
"account_name": "'" + _("Total") + "'",
"warn_if_negative": True,
"debit": 0.0,
"credit": 0.0
"credit": 0.0,
"parent_account": None,
"indent": 0,
"has_value": True
}
for d in accounts: