Revised the account selector to find the account codes from the form through the TransactionForm class, but not finding the codes by itself.
This commit is contained in:
@ -150,14 +150,10 @@ class AccountSelector {
|
||||
* @return {string[]} the account codes that are used in the form
|
||||
*/
|
||||
#getCodesUsedInForm() {
|
||||
const accountCodes = Array.from(document.getElementsByClassName("accounting-" + this.#prefix + "-account-code"));
|
||||
const inUse = [];
|
||||
const inUse = TransactionForm.getAccountCodesUsed(this.#entryType);
|
||||
if (this.#entryEditor.getAccountCode() !== null) {
|
||||
inUse.push(this.#entryEditor.getAccountCode());
|
||||
}
|
||||
for (const accountCode of accountCodes) {
|
||||
inUse.push(accountCode.value);
|
||||
}
|
||||
return inUse
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user