totals etc should not be clickable
This commit is contained in:
parent
de7b87ee3a
commit
4c924bb76c
@ -29,7 +29,7 @@ def execute(filters=None):
|
||||
def get_provisional_profit_loss(asset, liability, equity, period_list):
|
||||
if asset and (liability or equity):
|
||||
provisional_profit_loss = {
|
||||
"account_name": _("'Provisional Profit / Loss (Credit)'"),
|
||||
"account_name": "'" + _("Provisional Profit / Loss (Credit)") + "'",
|
||||
"account": None,
|
||||
"warn_if_negative": True
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ def prepare_data(accounts, balance_must_be, period_list):
|
||||
|
||||
def add_total_row(out, balance_must_be, period_list):
|
||||
row = {
|
||||
"account_name": _("'Total ({0})'").format(balance_must_be),
|
||||
"account_name": "'" + _("Total ({0})").format(balance_must_be) + "'",
|
||||
"account": None
|
||||
}
|
||||
for period in period_list:
|
||||
|
@ -108,30 +108,30 @@ def get_data_with_opening_closing(filters, account_details, gl_entries):
|
||||
|
||||
# Opening for filtered account
|
||||
if filters.get("account"):
|
||||
data += [get_balance_row("Opening", opening), {}]
|
||||
data += [get_balance_row(_("Opening"), opening), {}]
|
||||
|
||||
for acc, acc_dict in gle_map.items():
|
||||
if acc_dict.entries:
|
||||
# Opening for individual ledger, if grouped by account
|
||||
if filters.get("group_by_account"):
|
||||
data.append(get_balance_row("Opening", acc_dict.opening))
|
||||
data.append(get_balance_row(_("Opening"), acc_dict.opening))
|
||||
|
||||
data += acc_dict.entries
|
||||
|
||||
# Totals and closing for individual ledger, if grouped by account
|
||||
if filters.get("group_by_account"):
|
||||
data += [{"account": "'Totals'", "debit": acc_dict.total_debit,
|
||||
data += [{"account": "'" + _("Totals") + "'", "debit": acc_dict.total_debit,
|
||||
"credit": acc_dict.total_credit},
|
||||
get_balance_row("Closing (Opening + Totals)",
|
||||
get_balance_row(_("Closing (Opening + Totals)"),
|
||||
(acc_dict.opening + acc_dict.total_debit - acc_dict.total_credit)), {}]
|
||||
|
||||
# Total debit and credit between from and to date
|
||||
if total_debit or total_credit:
|
||||
data.append({"account": "'Totals'", "debit": total_debit, "credit": total_credit})
|
||||
data.append({"account": "'" + _("Totals") + "'", "debit": total_debit, "credit": total_credit})
|
||||
|
||||
# Closing for filtered account
|
||||
if filters.get("account"):
|
||||
data.append(get_balance_row("Closing (Opening + Totals)",
|
||||
data.append(get_balance_row(_("Closing (Opening + Totals)"),
|
||||
(opening + total_debit - total_credit)))
|
||||
|
||||
return data
|
||||
|
@ -27,7 +27,7 @@ def execute(filters=None):
|
||||
def get_net_profit_loss(income, expense, period_list):
|
||||
if income and expense:
|
||||
net_profit_loss = {
|
||||
"account_name": _("'Net Profit / Loss'"),
|
||||
"account_name": "'" + _("Net Profit / Loss") + "'",
|
||||
"account": None,
|
||||
"warn_if_negative": True
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user