Revised the line item sub-form to store the information whether it needs offsetting as a class instead of a dataset attribute, and store it in the account code input instead of the whole element, for simplicity and readability.

This commit is contained in:
2023-04-01 00:29:04 +08:00
parent 04fbb725d2
commit 14e79df571
2 changed files with 3 additions and 3 deletions

View File

@ -982,7 +982,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, "isNeedOffset" in this.#element.dataset);
return this.#accountCode.value === null? null: new JournalEntryAccount(this.#accountCode.value, this.#accountCode.dataset.text, this.#accountCode.classList.contains("accounting-is-need-offset"));
}
/**