Revised the loading of the summary helper so that only the required helpers are loaded, but not both the debit and credit helpers.

This commit is contained in:
2023-02-28 21:35:02 +08:00
parent b34955f2fb
commit 474e844ed9
5 changed files with 13 additions and 6 deletions

View File

@ -46,5 +46,8 @@ First written: 2023/2/25
{% endblock %}
{% block account_selector_modals %}
{% with summary_helper = form.summary_helper.debit %}
{% include "accounting/transaction/include/summary-helper-modal.html" %}
{% endwith %}
{% include "accounting/transaction/include/debit-account-modal.html" %}
{% endblock %}

View File

@ -86,9 +86,6 @@ First written: 2023/2/26
</form>
{% include "accounting/transaction/include/entry-form-modal.html" %}
{% for summary_helper in form.summary_helper.types %}
{% include "accounting/transaction/include/summary-helper-modal.html" %}
{% endfor %}
{% block account_selector_modals %}{% endblock %}
{% endblock %}

View File

@ -46,5 +46,8 @@ First written: 2023/2/25
{% endblock %}
{% block account_selector_modals %}
{% with summary_helper = form.summary_helper.credit %}
{% include "accounting/transaction/include/summary-helper-modal.html" %}
{% endwith %}
{% include "accounting/transaction/include/credit-account-modal.html" %}
{% endblock %}

View File

@ -50,6 +50,12 @@ First written: 2023/2/25
{% endblock %}
{% block account_selector_modals %}
{% with summary_helper = form.summary_helper.debit %}
{% include "accounting/transaction/include/summary-helper-modal.html" %}
{% endwith %}
{% with summary_helper = form.summary_helper.credit %}
{% include "accounting/transaction/include/summary-helper-modal.html" %}
{% endwith %}
{% include "accounting/transaction/include/debit-account-modal.html" %}
{% include "accounting/transaction/include/credit-account-modal.html" %}
{% endblock %}