Renamed the template form-record-transfer to record_form-transfer, and form-record-non-transfer to record_form-non-transfer in the accounting application.

This commit is contained in:
依瑪貓 2020-08-09 12:25:14 +08:00
parent 19c1e8b586
commit b84c9306cb
6 changed files with 6 additions and 6 deletions

View File

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

View File

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

View File

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

View File

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