Added the short_amount template filter and revised the accounting_amount template filter, removing the trailing decimal digits in the accounting application.
This commit is contained in:
@ -22,7 +22,6 @@ First written: 2020/7/1
|
||||
{% endcomment %}
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
{% load humanize %}
|
||||
{% load mia_core %}
|
||||
{% load accounting %}
|
||||
|
||||
@ -160,16 +159,16 @@ First written: 2020/7/1
|
||||
<div>
|
||||
{% if record.credit_amount is not None %}
|
||||
<span class="badge badge-success badge-pill">
|
||||
{{ record.credit_amount|intcomma:False }}
|
||||
{{ record.credit_amount|short_amount }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if record.debit_amount is not None %}
|
||||
<span class="badge badge-warning badge-pill">
|
||||
-{{ record.debit_amount|intcomma:False }}
|
||||
-{{ record.debit_amount|short_amount }}
|
||||
</span>
|
||||
{% endif %}
|
||||
<span class="badge {% if record.balance < 0 %} badge-danger {% else %} badge-primary {% endif %} badge-pill">
|
||||
{{ record.balance|intcomma:False }}
|
||||
{{ record.balance|short_amount }}
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
@ -183,16 +182,16 @@ First written: 2020/7/1
|
||||
<div>
|
||||
{% if record.credit_amount is not None %}
|
||||
<span class="badge badge-success badge-pill">
|
||||
{{ record.credit_amount|intcomma:False }}
|
||||
{{ record.credit_amount|short_amount }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if record.debit_amount is not None %}
|
||||
<span class="badge badge-warning badge-pill">
|
||||
-{{ record.debit_amount|intcomma:False }}
|
||||
-{{ record.debit_amount|short_amount }}
|
||||
</span>
|
||||
{% endif %}
|
||||
<span class="badge {% if record.balance < 0 %} badge-danger {% else %} badge-primary {% endif %} badge-pill">
|
||||
{{ record.balance|intcomma:False }}
|
||||
{{ record.balance|short_amount }}
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user