From 20e198298458e22d6e4dbe551b336fe2ea56400d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Sun, 2 Apr 2023 22:29:27 +0800 Subject: [PATCH] Renamed the "accounting-is-need-offset" class to "accounting-account-is-need-offset" in the line item sub-form of the journal entry form, for consistency. --- src/accounting/static/js/journal-entry-form.js | 6 +++--- .../accounting/journal-entry/include/form-line-item.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/accounting/static/js/journal-entry-form.js b/src/accounting/static/js/journal-entry-form.js index b9cf1cb..7aa7da3 100644 --- a/src/accounting/static/js/journal-entry-form.js +++ b/src/accounting/static/js/journal-entry-form.js @@ -1029,7 +1029,7 @@ class LineItemSubForm { * @return {JournalEntryAccount|null} the account */ get account() { - return this.#accountCode.value === null? null: new JournalEntryAccount(this.#accountCode.value, this.#accountCode.dataset.text, this.#accountCode.classList.contains("accounting-is-need-offset")); + return this.#accountCode.value === null? null: new JournalEntryAccount(this.#accountCode.value, this.#accountCode.dataset.text, this.#accountCode.classList.contains("accounting-account-is-need-offset")); } /** @@ -1108,9 +1108,9 @@ class LineItemSubForm { this.#accountCode.value = editor.account.code; this.#accountCode.dataset.text = editor.account.text; if (editor.account.isNeedOffset) { - this.#accountCode.classList.add("accounting-is-need-offset"); + this.#accountCode.classList.add("accounting-account-is-need-offset"); } else { - this.#accountCode.classList.remove("accounting-is-need-offset"); + this.#accountCode.classList.remove("accounting-account-is-need-offset"); } this.#accountText.innerText = editor.account.text; this.#description.value = editor.description === null? "": editor.description; diff --git a/src/accounting/templates/accounting/journal-entry/include/form-line-item.html b/src/accounting/templates/accounting/journal-entry/include/form-line-item.html index 22372f6..8eea2b2 100644 --- a/src/accounting/templates/accounting/journal-entry/include/form-line-item.html +++ b/src/accounting/templates/accounting/journal-entry/include/form-line-item.html @@ -26,7 +26,7 @@ First written: 2023/2/25 {% endif %} - +