Revised the form of the transactions to supply the account code instead of the account primary key in the accounting application.

This commit is contained in:
依瑪貓 2020-07-30 07:37:27 +08:00
parent 2252e4cb98
commit 6e08093464
3 changed files with 4 additions and 4 deletions

View File

@ -71,7 +71,7 @@ First written: 2020/7/23
{% str_format "debit-{}-account" forloop.counter as field %}
<select id="{{ field }}" class="form-control record-account debit-account {% if errors|dict:field %} is-invalid {% endif %}" name="{{ field }}">
{% if x.account is not None %}
<option value="{{ x.account.pk }}" selected="selected">{{ x.account.code }} {{ x.account.title }}</option>
<option value="{{ x.account.code }}" selected="selected">{{ x.account.code }} {{ x.account.title }}</option>
{% else %}
<option value=""></option>
{% endif %}

View File

@ -71,7 +71,7 @@ First written: 2020/7/23
{% str_format "credit-{}-account" forloop.counter as field %}
<select id="{{ field }}" class="form-control record-account credit-account {% if errors|dict:field %} is-invalid {% endif %}" name="{{ field }}">
{% if x.account is not None %}
<option value="{{ x.account.pk }}" selected="selected">{{ x.account.code }} {{ x.account.title }}</option>
<option value="{{ x.account.code }}" selected="selected">{{ x.account.code }} {{ x.account.title }}</option>
{% else %}
<option value=""></option>
{% endif %}

View File

@ -77,7 +77,7 @@ First written: 2020/7/23
{% str_format "debit-{}-account" forloop.counter as field %}
<select id="{{ field }}" class="form-control record-account debit-account {% if errors|dict:field %} is-invalid {% endif %}" name="{{ field }}">
{% if x.account is not None %}
<option value="{{ x.account.pk }}" selected="selected">{{ x.account.code }} {{ x.account.title }}</option>
<option value="{{ x.account.code }}" selected="selected">{{ x.account.code }} {{ x.account.title }}</option>
{% else %}
<option value=""></option>
{% endif %}
@ -144,7 +144,7 @@ First written: 2020/7/23
{% str_format "credit-{}-account" forloop.counter as field %}
<select id="{{ field }}" class="form-control record-account credit-account {% if errors|dict:field %} is-invalid {% endif %}" name="{{ field }}">
{% if x.account is not None %}
<option value="{{ x.account.pk }}" selected="selected">{{ x.account.code }} {{ x.account.title }}</option>
<option value="{{ x.account.code }}" selected="selected">{{ x.account.code }} {{ x.account.title }}</option>
{% else %}
<option value=""></option>
{% endif %}