Applied the short_amount template filter to the totals in the transaction forms in the accounting application.

This commit is contained in:
依瑪貓 2020-08-22 09:18:38 +08:00
parent 7762f54870
commit b25d1875ef
3 changed files with 7 additions and 4 deletions

View File

@ -24,6 +24,7 @@ First written: 2020/7/23
{% load static %}
{% load i18n %}
{% load mia_core %}
{% load accounting %}
{% block settings %}
{% setvar "title" _("Cash Expense Transaction") %}
@ -92,7 +93,7 @@ First written: 2020/7/23
<li class="list-group-item">
<div class="d-flex justify-content-between align-items-center">
{{ _("Total")|force_escape }}
<span id="debit-total" class="amount">{{ form.debit_total }}</span>
<span id="debit-total" class="amount">{{ form.debit_total|short_amount }}</span>
</div>
</li>
</ul>

View File

@ -24,6 +24,7 @@ First written: 2020/7/23
{% load static %}
{% load i18n %}
{% load mia_core %}
{% load accounting %}
{% block settings %}
{% setvar "title" _("Cash Income Transaction") %}
@ -91,7 +92,7 @@ First written: 2020/7/23
<li class="list-group-item">
<div class="d-flex justify-content-between align-items-center">
{{ _("Total")|force_escape }}
<span id="credit-total" class="amount">{{ form.credit_total }}</span>
<span id="credit-total" class="amount">{{ form.credit_total|short_amount }}</span>
</div>
</li>
</ul>

View File

@ -24,6 +24,7 @@ First written: 2020/7/23
{% load static %}
{% load i18n %}
{% load mia_core %}
{% load accounting %}
{% block settings %}
{% setvar "title" _("Transfer Transaction") %}
@ -93,7 +94,7 @@ First written: 2020/7/23
<li class="list-group-item">
<div id="debit-total-row" class="d-flex justify-content-between align-items-center form-control {% if form.balance_error %} is-invalid {% endif %} balance-row">
{{ _("Total")|force_escape }}
<span id="debit-total" class="amount">{{ form.debit_total }}</span>
<span id="debit-total" class="amount">{{ form.debit_total|short_amount }}</span>
</div>
<div id="debit-total-error" class="invalid-feedback balance-error">{{ form.balance_error|default:"" }}</div>
</li>
@ -123,7 +124,7 @@ First written: 2020/7/23
<li class="list-group-item">
<div id="credit-total-row" class="d-flex justify-content-between align-items-center form-control {% if form.balance_error %} is-invalid {% endif %} balance-row">
{{ _("Total")|force_escape }}
<span id="credit-total" class="amount">{{ form.credit_total }}</span>
<span id="credit-total" class="amount">{{ form.credit_total|short_amount }}</span>
</div>
<div id="credit-total-error" class="invalid-feedback balance-error">{{ form.balance_error|default:"" }}</div>
</li>