Revised the save method of the JavaScript LineItemSubForm class to update whether it needs offsetting, too.

This commit is contained in:
依瑪貓 2023-04-01 00:34:29 +08:00
parent 14e79df571
commit 0faca49540

View File

@ -1060,6 +1060,11 @@ class LineItemSubForm {
} }
this.#accountCode.value = editor.account.code; this.#accountCode.value = editor.account.code;
this.#accountCode.dataset.text = editor.account.text; 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.#accountText.innerText = editor.account.text;
this.#description.value = editor.description === null? "": editor.description; this.#description.value = editor.description === null? "": editor.description;
this.#descriptionText.innerText = editor.description === null? "": editor.description; this.#descriptionText.innerText = editor.description === null? "": editor.description;