Exclude accounts from comparative trial balance with near-zero balances
This commit is contained in:
parent
858ba0254a
commit
f9d2ea7e90
@ -76,7 +76,7 @@ def trial():
|
|||||||
# Delete accounts with always zero balances
|
# Delete accounts with always zero balances
|
||||||
accounts = sorted(l.accounts.values(), key=lambda a: a.name)
|
accounts = sorted(l.accounts.values(), key=lambda a: a.name)
|
||||||
for account in accounts[:]:
|
for account in accounts[:]:
|
||||||
if all(t.get_balance(account) == 0 for t in trial_balances):
|
if all(t.get_balance(account).exchange(report_currency, True).near_zero for t in trial_balances):
|
||||||
accounts.remove(account)
|
accounts.remove(account)
|
||||||
|
|
||||||
return flask.render_template('trial_multiple.html', trial_balances=trial_balances, accounts=accounts, report_currency=report_currency, cash=cash)
|
return flask.render_template('trial_multiple.html', trial_balances=trial_balances, accounts=accounts, report_currency=report_currency, cash=cash)
|
||||||
|
Reference in New Issue
Block a user