From 59820f65caa46b407e6b771e5e1381a54e204846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Mon, 20 Jul 2020 23:40:12 +0800 Subject: [PATCH] Revised the template of the income statement and removed the case when there is no data, because there is always data in the accounting application. --- .../accounting/income-statement.html | 250 +++++++++--------- 1 file changed, 123 insertions(+), 127 deletions(-) diff --git a/accounting/templates/accounting/income-statement.html b/accounting/templates/accounting/income-statement.html index 43f27d5..4b15cc0 100644 --- a/accounting/templates/accounting/income-statement.html +++ b/accounting/templates/accounting/income-statement.html @@ -74,152 +74,148 @@ First written: 2020/7/19 {% include "mia_core/include/period-chooser.html" %} -{% if item_list %} - {# The table for large screens #} -
-
-

{{ title }}

-
+{# The table for large screens #} +
+
+

{{ title }}

+
-
-
- - - - - - +
+
+
{% trans "Amount" context "Accounting|" as text %}{{ text|force_escape }}
+ + + + + + + + + {% for section in item_list %} + + + + + - - - {% for section in item_list %} - - - - - - - {% if section.groups %} - {% for group in section.groups %} - - + {% if section.groups %} + {% for group in section.groups %} + + + + + + + {% for item in group.details %} + + + - - - - {% for item in group.details %} - - - - - - - {% endfor %} - - - - - + {% endfor %} - {% else %} - + - {% endif %} - {% if section.cumulative_total is not None %} - - - - - - - {% endif %} - {% if section.has_next %} - - {% endif %} - {% endfor %} - -
{% trans "Amount" context "Accounting|" as text %}{{ text|force_escape }}
{{ section.title|title|escape }}
{{ section.title|title|escape }}
{{ group.title|title|escape }}
{{ group.title|title|escape }}
{{ item.title|title|escape }}
{{ item.balance|accounting_amount }}
{{ item.title|title|escape }}
{{ item.balance|accounting_amount }} - - - {% trans "View" context "Accounting|" as text %}{{ text|force_escape }} - -
{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}
{{ group.total|accounting_amount }} + + + {% trans "View" context "Accounting|" as text %}{{ text|force_escape }} + +
{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}
-{{ group.total|accounting_amount }}
{{ section.cumulative_total.title|title|escape }}
{{ section.cumulative_total.total|accounting_amount }}
-
-
-
- - {# The list for small screens #} -
-
-

{{ title }}

-
- -
-
-
    - {% for section in item_list %} -
  • - {{ section.title|title|escape }} -
  • - {% if section.groups %} - {% for group in section.groups %} -
  • - {{ group.title|title|escape }} -
  • - {% for item in group.details %} -
  • - - {{ item.title|title|escape }} -
    - - {{ item.balance|accounting_amount }} - -
    -
    -
  • - {% endfor %} -
  • - {% trans "Total" context "Accounting|" as text %}{{ text|force_escape }} -
    - - {{ group.total|accounting_amount }} - -
    -
  • {% endfor %} {% else %} + +
    {% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}
    + + - + + + {% endif %} + {% if section.cumulative_total is not None %} + +
    {{ section.cumulative_total.title|title|escape }}
    + + {{ section.cumulative_total.total|accounting_amount }} + + + {% endif %} + {% if section.has_next %} + + {% endif %} + {% endfor %} + + +
+
+
+ +{# The list for small screens #} +
+
+

{{ title }}

+
+ +
+
+
    + {% for section in item_list %} +
  • + {{ section.title|title|escape }} +
  • + {% if section.groups %} + {% for group in section.groups %} +
  • + {{ group.title|title|escape }} +
  • + {% for item in group.details %} +
  • + + {{ item.title|title|escape }} +
    + + {{ item.balance|accounting_amount }} + +
    +
    +
  • + {% endfor %}
  • {% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}
    - - -
    -
  • - {% endif %} - {% if section.cumulative_total is not None %} -
  • - {{ section.cumulative_total.title|title|escape }} -
    - - {{ section.cumulative_total.total|accounting_amount }} + + {{ group.total|accounting_amount }}
  • - {% endif %} - {% if section.has_next %} -
  • - {% endif %} - {% endfor %} -
-
+ {% endfor %} + {% else %} +
  • + {% trans "Total" context "Accounting|" as text %}{{ text|force_escape }} +
    + - +
    +
  • + {% endif %} + {% if section.cumulative_total is not None %} +
  • + {{ section.cumulative_total.title|title|escape }} +
    + + {{ section.cumulative_total.total|accounting_amount }} + +
    +
  • + {% endif %} + {% if section.has_next %} +
  • + {% endif %} + {% endfor %} +
    -{% else %} -

    {{ _("There is currently no data.")|force_escape }}

    -{% endif %} +
    {% endblock %}