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:
parent
4a63a01e11
commit
9d49815462
@ -65,7 +65,7 @@ First written: 2020/7/23
|
|||||||
<ul id="debit-records" class="list-group">
|
<ul id="debit-records" class="list-group">
|
||||||
{% for record in item.debit_records %}
|
{% for record in item.debit_records %}
|
||||||
{% with record_type="debit" no=forloop.counter order=forloop.counter %}
|
{% 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 %}
|
{% endwith %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -65,7 +65,7 @@ First written: 2020/7/23
|
|||||||
<ul id="credit-records" class="list-group">
|
<ul id="credit-records" class="list-group">
|
||||||
{% for record in item.credit_records %}
|
{% for record in item.credit_records %}
|
||||||
{% with record_type="credit" no=forloop.counter order=forloop.counter %}
|
{% 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 %}
|
{% endwith %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -67,7 +67,7 @@ First written: 2020/7/23
|
|||||||
<ul id="debit-records" class="list-group">
|
<ul id="debit-records" class="list-group">
|
||||||
{% for record in item.debit_records %}
|
{% for record in item.debit_records %}
|
||||||
{% with record_type="debit" no=forloop.counter order=forloop.counter %}
|
{% 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 %}
|
{% endwith %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
@ -93,7 +93,7 @@ First written: 2020/7/23
|
|||||||
<ul id="credit-records" class="list-group">
|
<ul id="credit-records" class="list-group">
|
||||||
{% for record in item.credit_records %}
|
{% for record in item.credit_records %}
|
||||||
{% with record_type="credit" no=forloop.counter order=forloop.counter %}
|
{% 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 %}
|
{% endwith %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -863,11 +863,11 @@ def txn_edit(request, txn_type, txn=None):
|
|||||||
"order": ""}
|
"order": ""}
|
||||||
if txn_type == "transfer":
|
if txn_type == "transfer":
|
||||||
new_record_template = json.dumps(render_to_string(
|
new_record_template = json.dumps(render_to_string(
|
||||||
"accounting/transactions/form-record-transfer.html",
|
"accounting/include/form-record-transfer.html",
|
||||||
new_record_context))
|
new_record_context))
|
||||||
else:
|
else:
|
||||||
new_record_template = json.dumps(render_to_string(
|
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))
|
new_record_context))
|
||||||
return render(request, F"accounting/transactions/{txn_type}/form.html", {
|
return render(request, F"accounting/transactions/{txn_type}/form.html", {
|
||||||
"item": form,
|
"item": form,
|
||||||
|
Loading…
Reference in New Issue
Block a user