Moved the form-record-transfer.html and form-record-non-transfer.html templates from accounting/transactions to accounting/include in the accounting application.

This commit is contained in:
依瑪貓 2020-08-06 22:05:15 +08:00
parent 4a63a01e11
commit 9d49815462
6 changed files with 6 additions and 6 deletions

View File

@ -65,7 +65,7 @@ First written: 2020/7/23
<ul id="debit-records" class="list-group">
{% for record in item.debit_records %}
{% with record_type="debit" no=forloop.counter order=forloop.counter %}
{% include "accounting/transactions/form-record-non-transfer.html" %}
{% include "accounting/include/form-record-non-transfer.html" %}
{% endwith %}
{% endfor %}
</ul>

View File

@ -65,7 +65,7 @@ First written: 2020/7/23
<ul id="credit-records" class="list-group">
{% for record in item.credit_records %}
{% with record_type="credit" no=forloop.counter order=forloop.counter %}
{% include "accounting/transactions/form-record-non-transfer.html" %}
{% include "accounting/include/form-record-non-transfer.html" %}
{% endwith %}
{% endfor %}
</ul>

View File

@ -67,7 +67,7 @@ First written: 2020/7/23
<ul id="debit-records" class="list-group">
{% for record in item.debit_records %}
{% with record_type="debit" no=forloop.counter order=forloop.counter %}
{% include "accounting/transactions/form-record-transfer.html" %}
{% include "accounting/include/form-record-transfer.html" %}
{% endwith %}
{% endfor %}
</ul>
@ -93,7 +93,7 @@ First written: 2020/7/23
<ul id="credit-records" class="list-group">
{% for record in item.credit_records %}
{% with record_type="credit" no=forloop.counter order=forloop.counter %}
{% include "accounting/transactions/form-record-transfer.html" %}
{% include "accounting/transactions/../../include/form-record-transfer.html" %}
{% endwith %}
{% endfor %}
</ul>

View File

@ -863,11 +863,11 @@ def txn_edit(request, txn_type, txn=None):
"order": ""}
if txn_type == "transfer":
new_record_template = json.dumps(render_to_string(
"accounting/transactions/form-record-transfer.html",
"accounting/include/form-record-transfer.html",
new_record_context))
else:
new_record_template = json.dumps(render_to_string(
"accounting/transactions/form-record-non-transfer.html",
"accounting/include/form-record-non-transfer.html",
new_record_context))
return render(request, F"accounting/transactions/{txn_type}/form.html", {
"item": form,