evised the income statement.

This commit is contained in:
2020-07-20 22:23:19 +08:00
parent 361b8c9881
commit 434b109a75
2 changed files with 41 additions and 29 deletions

View File

@ -87,7 +87,7 @@ First written: 2020/7/1
<thead>
<tr>
<th scope="col"></th>
<th class="amount" colspan="2" scope="col">{% trans "Amount" context "Period|" as text %}{{ text|force_escape }}</th>
<th class="amount" colspan="2" scope="col">{% trans "Amount" context "Accounting|" as text %}{{ text|force_escape }}</th>
<th scope="col"></th>
</tr>
</thead>
@ -99,33 +99,42 @@ First written: 2020/7/1
<td class="amount"></td>
<td class="actions"></td>
</tr>
{% for group in section.groups %}
<tr class="second-level-header">
<td><div class="second-level-header">{{ group.title|title|escape }}</div></td>
<td class="amount"></td>
<td class="amount"></td>
<td class="actions"></td>
</tr>
{% for item in group.details %}
<tr>
<td><div class="subject">{{ item.title|title|escape }}</div></td>
<td class="amount {% if item.balance < 0 %} text-danger {% endif %}">{{ item.balance|accounting_amount }}</td>
{% if section.groups %}
{% for group in section.groups %}
<tr class="second-level-header">
<td><div class="second-level-header">{{ group.title|title|escape }}</div></td>
<td class="amount"></td>
<td class="actions">
<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>
</td>
<td class="amount"></td>
<td class="actions"></td>
</tr>
{% for item in group.details %}
<tr>
<td><div class="subject">{{ item.title|title|escape }}</div></td>
<td class="amount {% if item.balance < 0 %} text-danger {% endif %}">{{ item.balance|accounting_amount }}</td>
<td class="amount"></td>
<td class="actions">
<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>
</td>
</tr>
{% endfor %}
<tr class="total">
<td><div>{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}</div></td>
<td class="amount"></td>
<td class="amount {% if group.total < 0 %} text-danger {% endif %}">{{ group.total|accounting_amount }}</td>
<td class="actions"></td>
</tr>
{% endfor %}
{% else %}
<tr class="total">
<td><div>{% trans "Total" context "Period|" as text %}{{ text|force_escape }}</div></td>
<td><div>{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}</div></td>
<td class="amount"></td>
<td class="amount {% if group.total < 0 %} text-danger {% endif %}">{{ group.total|accounting_amount }}</td>
<td class="amount">-</td>
<td class="actions"></td>
</tr>
{% endfor %}
{% endif %}
{% if section.cumulative_total is not None %}
<tr class="cum-total">
<td><div>{{ section.cumulative_total.title|title|escape }}</div></td>
@ -134,6 +143,9 @@ First written: 2020/7/1
<td class="actions"></td>
</tr>
{% endif %}
{% if section.has_next %}
<tr><td colspan="4"></td></tr>
{% endif %}
{% endfor %}
</tbody>
</table>