Export total labels
This commit is contained in:
parent
0dd00eb418
commit
3d1434afe7
@ -26,7 +26,7 @@ def execute(filters=None):
|
|||||||
if opening_balance and round(opening_balance,2) !=0:
|
if opening_balance and round(opening_balance,2) !=0:
|
||||||
unclosed ={
|
unclosed ={
|
||||||
"account_name": "'" + _("Unclosed Fiscal Years Profit / Loss (Credit)") + "'",
|
"account_name": "'" + _("Unclosed Fiscal Years Profit / Loss (Credit)") + "'",
|
||||||
"account": None,
|
"account": "'" + _("Unclosed Fiscal Years Profit / Loss (Credit)") + "'",
|
||||||
"warn_if_negative": True,
|
"warn_if_negative": True,
|
||||||
"currency": frappe.db.get_value("Company", filters.company, "default_currency")
|
"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")
|
currency = frappe.db.get_value("Company", company, "default_currency")
|
||||||
total_row = {
|
total_row = {
|
||||||
"account_name": "'" + _("Total (Credit)") + "'",
|
"account_name": "'" + _("Total (Credit)") + "'",
|
||||||
"account": None,
|
"account": "'" + _("Total (Credit)") + "'",
|
||||||
"warn_if_negative": True,
|
"warn_if_negative": True,
|
||||||
"currency": currency
|
"currency": currency
|
||||||
}
|
}
|
||||||
@ -85,7 +85,7 @@ def get_provisional_profit_loss(asset, liability, equity, period_list, company):
|
|||||||
if has_value:
|
if has_value:
|
||||||
provisional_profit_loss.update({
|
provisional_profit_loss.update({
|
||||||
"account_name": "'" + _("Provisional Profit / Loss (Credit)") + "'",
|
"account_name": "'" + _("Provisional Profit / Loss (Credit)") + "'",
|
||||||
"account": None,
|
"account": "'" + _("Provisional Profit / Loss (Credit)") + "'",
|
||||||
"warn_if_negative": True,
|
"warn_if_negative": True,
|
||||||
"currency": currency
|
"currency": currency
|
||||||
})
|
})
|
||||||
|
@ -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):
|
def add_total_row(out, root_type, balance_must_be, period_list, company_currency):
|
||||||
total_row = {
|
total_row = {
|
||||||
"account_name": "'" + _("Total {0} ({1})").format(root_type, balance_must_be) + "'",
|
"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
|
"currency": company_currency
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,11 @@ def calculate_values(accounts, gl_entries_by_account, filters):
|
|||||||
"warn_if_negative": True,
|
"warn_if_negative": True,
|
||||||
"income": 0.0,
|
"income": 0.0,
|
||||||
"expense": 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:
|
for d in accounts:
|
||||||
|
@ -130,11 +130,14 @@ def calculate_values(accounts, gl_entries_by_account, opening_balances, filters)
|
|||||||
}
|
}
|
||||||
|
|
||||||
total_row = {
|
total_row = {
|
||||||
"account": None,
|
"account": "'" + _("Total") + "'",
|
||||||
"account_name": _("Total"),
|
"account_name": "'" + _("Total") + "'",
|
||||||
"warn_if_negative": True,
|
"warn_if_negative": True,
|
||||||
"debit": 0.0,
|
"debit": 0.0,
|
||||||
"credit": 0.0
|
"credit": 0.0,
|
||||||
|
"parent_account": None,
|
||||||
|
"indent": 0,
|
||||||
|
"has_value": True
|
||||||
}
|
}
|
||||||
|
|
||||||
for d in accounts:
|
for d in accounts:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user