Renamed records to item_list, and record to item in the report templates in the accounting application.

This commit is contained in:
2020-07-19 20:27:00 +08:00
parent 65afcd08d3
commit a62d5df9a3
7 changed files with 191 additions and 191 deletions

View File

@ -74,7 +74,7 @@ First written: 2020/7/1
{% include "mia_core/include/period-chooser.html" %}
{% if records %}
{% if item_list %}
{% include "mia_core/include/pagination.html" %}
{# The table for large screens #}
@ -95,13 +95,13 @@ First written: 2020/7/1
</tr>
</thead>
<tbody>
{% for record in records %}
{% for item in item_list %}
<tr>
<td>{{ record.title }}</td>
<td class="amount">{{ record.debit|accounting_amount }}</td>
<td class="amount">{{ record.credit|accounting_amount }}</td>
<td>{{ item.title }}</td>
<td class="amount">{{ item.debit|accounting_amount }}</td>
<td class="amount">{{ item.credit|accounting_amount }}</td>
<td class="actions">
<a href="{% url "accounting:ledger" record.code period.spec %}" class="btn btn-info" role="button">
<a href="{% url "accounting:ledger" item.code period.spec %}" class="btn btn-info" role="button">
<i class="fas fa-eye"></i>
<span class="d-none d-lg-inline">{% trans "View" context "Accounting|" as text %}{{ text|force_escape }}</span>
</a>
@ -112,8 +112,8 @@ First written: 2020/7/1
<tfoot>
<tr>
<td>{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}</td>
<td class="amount">{{ record_sum.debit|accounting_amount }}</td>
<td class="amount">{{ record_sum.credit|accounting_amount }}</td>
<td class="amount">{{ total_item.debit|accounting_amount }}</td>
<td class="amount">{{ total_item.credit|accounting_amount }}</td>
<td></td>
</tr>
</tfoot>
@ -131,19 +131,19 @@ First written: 2020/7/1
<div class="row">
<div class="col-sm-12">
<ul class="list-group d-lg-none trial-balance-list">
{% for record in records %}
{% for item in item_list %}
<li class="list-group-item">
<a class="list-group-item-action d-flex justify-content-between align-items-center" href="{% url "accounting:ledger" record.code period.spec %}">
{{ record.title }}
<a class="list-group-item-action d-flex justify-content-between align-items-center" href="{% url "accounting:ledger" item.code period.spec %}">
{{ item.title }}
<div>
{% if record.debit is not None %}
{% if item.debit is not None %}
<span class="badge badge-success badge-pill">
{{ record.debit|intcomma:False }}
{{ item.debit|intcomma:False }}
</span>
{% endif %}
{% if record.credit is not None %}
{% if item.credit is not None %}
<span class="badge badge-warning badge-pill">
{{ record.credit|intcomma:False }}
{{ item.credit|intcomma:False }}
</span>
{% endif %}
</div>
@ -154,10 +154,10 @@ First written: 2020/7/1
{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}
<div>
<span class="badge badge-success badge-pill">
{{ record_sum.debit|intcomma:False }}
{{ total_item.debit|intcomma:False }}
</span>
<span class="badge badge-warning badge-pill">
{{ record_sum.credit|intcomma:False }}
{{ total_item.credit|intcomma:False }}
</span>
</div>
</li>