From 0faca495401647a584ecb091cc0d31d582c4173f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Sat, 1 Apr 2023 00:34:29 +0800 Subject: [PATCH] Revised the save method of the JavaScript LineItemSubForm class to update whether it needs offsetting, too. --- src/accounting/static/js/journal-entry-form.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/accounting/static/js/journal-entry-form.js b/src/accounting/static/js/journal-entry-form.js index 1792c4a..f3544fd 100644 --- a/src/accounting/static/js/journal-entry-form.js +++ b/src/accounting/static/js/journal-entry-form.js @@ -1060,6 +1060,11 @@ 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"); + } else { + this.#accountCode.classList.remove("accounting-is-need-offset"); + } this.#accountText.innerText = editor.account.text; this.#description.value = editor.description === null? "": editor.description; this.#descriptionText.innerText = editor.description === null? "": editor.description;