- {% for line_item_form in debit_forms %}
- {% with currency_index = currency_index,
- debit_credit = "debit",
- line_item_index = loop.index,
- only_one_line_item_form = debit_forms|length == 1,
- form = line_item_form.form %}
- {% include "accounting/journal-entry/include/form-line-item.html" %}
- {% endwith %}
- {% endfor %}
-
-
-
-
{{ A_("Total") }}
-
{{ debit_total }}
-
-
-
-
-
-
-
{% if debit_errors %}{{ debit_errors[0] }}{% endif %}
-
+ {% with currency_index = currency_index,
+ debit_credit = "debit",
+ line_item_forms = debit_forms,
+ header = A_("Content"),
+ debit_credit_total = debit_total,
+ debit_credit_errors = debit_errors %}
+ {% include "accounting/journal-entry/include/form-debit-credit.html" %}
+ {% endwith %}
{% endblock %}
diff --git a/src/accounting/templates/accounting/journal-entry/include/form-debit-credit.html b/src/accounting/templates/accounting/journal-entry/include/form-debit-credit.html
new file mode 100644
index 0000000..53d77f4
--- /dev/null
+++ b/src/accounting/templates/accounting/journal-entry/include/form-debit-credit.html
@@ -0,0 +1,49 @@
+{#
+The Mia! Accounting Flask Project
+form-debit-credit.html: The debit or credit line items in the journal entry form
+
+ Copyright (c) 2023 imacat.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+Author: imacat@mail.imacat.idv.tw (imacat)
+First written: 2023/3/21
+#}
+
+
+
+
+ {% for line_item_form in line_item_forms %}
+ {% with currency_index = currency_index,
+ line_item_index = loop.index,
+ only_one_line_item_form = line_item_forms|length == 1,
+ form = line_item_form.form %}
+ {% include "accounting/journal-entry/include/form-line-item.html" %}
+ {% endwith %}
+ {% endfor %}
+
+
+
+
{{ A_("Total") }}
+
{{ debit_credit_total }}
+
+
+
+
+
+
+
{% if debit_credit_errors %}{{ debit_credit_errors[0] }}{% endif %}