Revised the template of the cash account for readibility in the accounting application

This commit is contained in:
依瑪貓 2020-07-16 20:47:40 +08:00
parent b589539af3
commit 861b1eeda2

View File

@ -161,9 +161,19 @@ First written: 2020/7/1
</div> </div>
</div> </div>
<div> <div>
{% if record.credit_amount is not None %}<span class="badge badge-success badge-pill">{{ record.credit_amount|intcomma:False }}</span>{% endif %} {% if record.credit_amount is not None %}
{% if record.debit_amount is not None %}<span class="badge badge-warning badge-pill">-{{ record.debit_amount|intcomma:False }}</span>{% endif %} <span class="badge badge-success badge-pill">
<span class="badge {% if record.balance < 0 %} badge-danger {% else %} badge-primary {% endif %} badge-pill">{{ record.balance|intcomma:False }}</span> {{ record.credit_amount|intcomma:False }}
</span>
{% endif %}
{% if record.debit_amount is not None %}
<span class="badge badge-warning badge-pill">
-{{ record.debit_amount|intcomma:False }}
</span>
{% endif %}
<span class="badge {% if record.balance < 0 %} badge-danger {% else %} badge-primary {% endif %} badge-pill">
{{ record.balance|intcomma:False }}
</span>
</div> </div>
</a> </a>
{% else %} {% else %}
@ -174,9 +184,19 @@ First written: 2020/7/1
<div>{{ record.summary|default:"" }}</div> <div>{{ record.summary|default:"" }}</div>
</div> </div>
<div> <div>
{% if record.credit_amount is not None %}<span class="badge badge-success badge-pill">{{ record.credit_amount|intcomma:False }}</span>{% endif %} {% if record.credit_amount is not None %}
{% if record.debit_amount is not None %}<span class="badge badge-warning badge-pill">-{{ record.debit_amount|intcomma:False }}</span>{% endif %} <span class="badge badge-success badge-pill">
<span class="badge {% if record.balance < 0 %} badge-danger {% else %} badge-primary {% endif %} badge-pill">{{ record.balance|intcomma:False }}</span> {{ record.credit_amount|intcomma:False }}
</span>
{% endif %}
{% if record.debit_amount is not None %}
<span class="badge badge-warning badge-pill">
-{{ record.debit_amount|intcomma:False }}
</span>
{% endif %}
<span class="badge {% if record.balance < 0 %} badge-danger {% else %} badge-primary {% endif %} badge-pill">
{{ record.balance|intcomma:False }}
</span>
</div> </div>
{% endif %} {% endif %}
</li> </li>