Added the accounting_amount template filter and applied it in the cash account.

This commit is contained in:
依瑪貓
2020-07-14 10:48:10 +08:00
parent 9cab1c2194
commit 46b20ab500
3 changed files with 45 additions and 3 deletions

View File

@ -22,6 +22,7 @@ First written: 2020/7/1
{% endcomment %}
{% load i18n %}
{% load humanize %}
{% load accounting %}
{% block settings %}
{% blocktrans asvar title with subject=subject.title_zhtw period=period.description context "Accounting|" %}Cash Account for {{ subject }} in {{ period }}{% endblocktrans %}
@ -106,9 +107,9 @@ First written: 2020/7/1
{{ text|force_escape }}
</span>
{% endif %}</td>
<td class="amount">{% if record.credit_amount is not None %}{{ record.credit_amount|intcomma:False }}{% endif %}</td>
<td class="amount">{% if record.debit_amount is not None %}{{ record.debit_amount|intcomma:False }}{% endif %}</td>
<td class="amount">{{ record.balance|intcomma:False }}</td>
<td class="amount">{{ record.credit_amount|accounting_amount }}</td>
<td class="amount">{{ record.debit_amount|accounting_amount }}</td>
<td class="amount">{{ record.balance|accounting_amount }}</td>
<td class="actions">
{% if record.sn is not None %}
<a href="{{ record.transaction.get_absolute_url }}" class="btn btn-info" role="button">