From 651f527c86a9bbc1e57e0e64d04fcf66423ce57b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Sat, 8 Aug 2020 14:05:29 +0800 Subject: [PATCH] Renamed the template variables in the transaction views and forms and sorting form to be more meaningful in the accounting application. --- .../accounting/transactions/expense/form.html | 18 ++++---- .../accounting/transactions/expense/view.html | 40 ++++++++--------- .../accounting/transactions/income/form.html | 18 ++++---- .../accounting/transactions/income/view.html | 40 ++++++++--------- .../accounting/transactions/sort.html | 32 +++++++------- .../transactions/transfer/form.html | 30 ++++++------- .../transactions/transfer/view.html | 44 +++++++++---------- accounting/views.py | 6 +-- 8 files changed, 114 insertions(+), 114 deletions(-) diff --git a/accounting/templates/accounting/transactions/expense/form.html b/accounting/templates/accounting/transactions/expense/form.html index c460a03..7d0b1dd 100644 --- a/accounting/templates/accounting/transactions/expense/form.html +++ b/accounting/templates/accounting/transactions/expense/form.html @@ -38,7 +38,7 @@ First written: 2020/7/23 {% include "accounting/include/summary-helper.html" %} -{% for message in item.non_field_errors %} +{% for message in txn.non_field_errors %}
{{ _("Error:")|force_escape }} {{ message }} @@ -46,7 +46,7 @@ First written: 2020/7/23 {% endfor %}
- + {{ _("Back")|force_escape }} @@ -55,22 +55,22 @@ First written: 2020/7/23 -
+ {% csrf_token %}
- -
{% if should_validate %}{{ item.date.errors.0|default:"" }}{% endif %}
+ +
{% if should_validate %}{{ txn.date.errors.0|default:"" }}{% endif %}
    - {% for record in item.debit_records %} + {% for record in txn.debit_records %} {% with record_type="debit" no=forloop.counter order=forloop.counter %} {% include "accounting/include/form-record-non-transfer.html" %} {% endwith %} @@ -85,7 +85,7 @@ First written: 2020/7/23
  • {{ _("Total")|force_escape }} - {{ item.debit_total }} + {{ txn.debit_total }}
@@ -97,8 +97,8 @@ First written: 2020/7/23
- -
{% if should_validate %}{{ item.notes.errors.0|default:"" }}{% endif %}
+ +
{% if should_validate %}{{ txn.notes.errors.0|default:"" }}{% endif %}
diff --git a/accounting/templates/accounting/transactions/expense/view.html b/accounting/templates/accounting/transactions/expense/view.html index 7c9a357..9a662e4 100644 --- a/accounting/templates/accounting/transactions/expense/view.html +++ b/accounting/templates/accounting/transactions/expense/view.html @@ -32,7 +32,7 @@ First written: 2020/7/23 {% block content %} -{% if item.has_order_hole %} +{% if txn.has_order_hole %}
{{ _("Error:") }} {{ _("The transactions on this day are not well-ordered. Please reorder them.")|force_escape }} @@ -40,7 +40,7 @@ First written: 2020/7/23 {% endif %} - + {% csrf_token %}