Revised the template of the cash summary for long lines in the accounting application.
This commit is contained in:
parent
d47010e51a
commit
229e01a3d9
@ -69,11 +69,15 @@ First written: 2020/7/15
|
|||||||
<div class="dropdown-menu subject-picker">
|
<div class="dropdown-menu subject-picker">
|
||||||
<div class="dropdown-header">{% trans "Shortcuts" context "Accounting|Subject|" as text %}{{ text|force_escape }}</div>
|
<div class="dropdown-header">{% trans "Shortcuts" context "Accounting|Subject|" as text %}{{ text|force_escape }}</div>
|
||||||
{% for subject in shortcut_subjects %}
|
{% for subject in shortcut_subjects %}
|
||||||
<a class="dropdown-item {% if subject.code == current_subject.code %} active {% endif %}>" href="{% url "accounting:cash-summary" subject.code %}">{{ subject.title|title }}</a>
|
<a class="dropdown-item {% if subject.code == current_subject.code %} active {% endif %}>" href="{% url "accounting:cash-summary" subject.code %}">
|
||||||
|
{{ subject.title|title }}
|
||||||
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<div class="dropdown-header">{% trans "All" context "Accounting|Subject|" as text %}{{ text|force_escape }}</div>
|
<div class="dropdown-header">{% trans "All" context "Accounting|Subject|" as text %}{{ text|force_escape }}</div>
|
||||||
{% for subject in all_sibjects %}
|
{% for subject in all_sibjects %}
|
||||||
<a class="dropdown-item {% if subject.code == current_subject.code %} active {% endif %}>" href="{% url "accounting:cash-summary" subject.code %}">{{ subject.title|title }}</a>
|
<a class="dropdown-item {% if subject.code == current_subject.code %} active {% endif %}>" href="{% url "accounting:cash-summary" subject.code %}">
|
||||||
|
{{ subject.code }} {{ subject.title|title }}
|
||||||
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -123,20 +127,36 @@ First written: 2020/7/15
|
|||||||
<a class="list-group-item-action d-flex justify-content-between align-items-center" href="{% url "accounting:cash" current_subject.code record.month|date:"Y-m" %}">
|
<a class="list-group-item-action d-flex justify-content-between align-items-center" href="{% url "accounting:cash" current_subject.code record.month|date:"Y-m" %}">
|
||||||
{{ record.label }}
|
{{ record.label }}
|
||||||
<div>
|
<div>
|
||||||
<span class="badge badge-success badge-pill">{{ record.credit_amount|accounting_amount }}</span>
|
<span class="badge badge-success badge-pill">
|
||||||
<span class="badge badge-warning badge-pill">{{ record.debit_amount|accounting_amount }}</span>
|
{{ record.credit_amount|accounting_amount }}
|
||||||
<span class="badge {% if record.balance < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill">{{ record.balance|intcomma:False }}</span>
|
</span>
|
||||||
<span class="badge {% if record.cumulative_balance < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill">{{ record.cumulative_balance|intcomma:False }}</span>
|
<span class="badge badge-warning badge-pill">
|
||||||
|
{{ record.debit_amount|accounting_amount }}
|
||||||
|
</span>
|
||||||
|
<span class="badge {% if record.balance < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill">
|
||||||
|
{{ record.balance|intcomma:False }}
|
||||||
|
</span>
|
||||||
|
<span class="badge {% if record.cumulative_balance < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill">
|
||||||
|
{{ record.cumulative_balance|intcomma:False }}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="d-flex justify-content-between align-items-center">
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
{{ record.label }}
|
{{ record.label }}
|
||||||
<div>
|
<div>
|
||||||
<span class="badge badge-success badge-pill">{{ record.credit_amount|accounting_amount }}</span>
|
<span class="badge badge-success badge-pill">
|
||||||
<span class="badge badge-warning badge-pill">{{ record.debit_amount|accounting_amount }}</span>
|
{{ record.credit_amount|accounting_amount }}
|
||||||
<span class="badge {% if record.balance < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill">{{ record.balance|intcomma:False }}</span>
|
</span>
|
||||||
<span class="badge {% if record.cumulative_balance < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill">{{ record.cumulative_balance|intcomma:False }}</span>
|
<span class="badge badge-warning badge-pill">
|
||||||
|
{{ record.debit_amount|accounting_amount }}
|
||||||
|
</span>
|
||||||
|
<span class="badge {% if record.balance < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill">
|
||||||
|
{{ record.balance|intcomma:False }}
|
||||||
|
</span>
|
||||||
|
<span class="badge {% if record.cumulative_balance < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill">
|
||||||
|
{{ record.cumulative_balance|intcomma:False }}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user