Added the TransactionForm instance to the constructor of the JournalEntryEditor instance, so that the journal entry editor holds an instance of the transaction form, too. It does not need to find the transaction form all the way from the side property that may not be available. Retired the redundant getTransactionForm method from the JournalEntryEditor class.

This commit is contained in:
2023-03-18 17:52:37 +08:00
parent 67e2b06d37
commit 38c394c0af
4 changed files with 14 additions and 15 deletions

View File

@ -146,7 +146,7 @@ class AccountSelector {
* @return {string[]} the account codes that are used in the form
*/
#getCodesUsedInForm() {
const inUse = this.#entryEditor.getTransactionForm().getAccountCodesUsed(this.#entryType);
const inUse = this.#entryEditor.form.getAccountCodesUsed(this.#entryType);
if (this.#entryEditor.accountCode !== null) {
inUse.push(this.#entryEditor.accountCode);
}