Show Dr/Cr on comparative trial balance instead of positive/negative

This commit is contained in:
RunasSudo 2020-03-30 20:02:36 +11:00
parent 2eff00b5db
commit 858ba0254a
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -34,7 +34,7 @@
<td>{{ account.name }}</td> <td>{{ account.name }}</td>
{% for trial_balance in trial_balances %} {% for trial_balance in trial_balances %}
{% set balance = trial_balance.get_balance(account).exchange(report_currency, True) %} {% set balance = trial_balance.get_balance(account).exchange(report_currency, True) %}
<td>{% if not balance.near_zero %}<a href="/transactions?{{ {'date': trial_balance.date.strftime('%Y-%m-%d'), 'pstart': trial_balance.pstart.strftime('%Y-%m-%d'), 'account': account.name, 'cash': 'on' if cash else ''}|urlencode }}">{{ balance|a }}</a>{% endif %}</td> <td>{% if not balance.near_zero %}<a href="/transactions?{{ {'date': trial_balance.date.strftime('%Y-%m-%d'), 'pstart': trial_balance.pstart.strftime('%Y-%m-%d'), 'account': account.name, 'cash': 'on' if cash else ''}|urlencode }}">{{ balance|abs|b }} {% if balance >= 0 %}Dr{% else %}Cr{% endif %}</a>{% endif %}</td>
{% endfor %} {% endfor %}
</tr> </tr>
{% endfor %} {% endfor %}