Revised the logic to save the account in the save method of the LineItemSubForm class, since when saving from the line item editor, the account is never null.

This commit is contained in:
依瑪貓 2023-04-01 00:19:32 +08:00
parent a1d6844e52
commit 04fbb725d2

View File

@ -1058,9 +1058,9 @@ class LineItemSubForm {
this.#originalLineItemText.classList.remove("d-none");
this.#originalLineItemText.innerText = A_("Offset %(item)s", {item: editor.originalLineItemText});
}
this.#accountCode.value = editor.account === null? "": editor.account.code;
this.#accountCode.dataset.text = editor.account === null? "": editor.account.text;
this.#accountText.innerText = editor.account === null? "": editor.account.text;
this.#accountCode.value = editor.account.code;
this.#accountCode.dataset.text = editor.account.text;
this.#accountText.innerText = editor.account.text;
this.#description.value = editor.description === null? "": editor.description;
this.#descriptionText.innerText = editor.description === null? "": editor.description;
this.#amount.value = editor.amount;