Revised so that when the account selector finds the codes from the form, the journal entry editor is used to find the form instead of messing-up with the TransactionForm class and its static method that was a shortcut to the private instance method of the same name.

This commit is contained in:
2023-03-13 23:18:52 +08:00
parent 2d771f04be
commit bf2f96621d
3 changed files with 11 additions and 12 deletions

View File

@ -184,7 +184,7 @@ class TransactionForm {
* @param entryType {string} the entry type, either "debit" or "credit"
* @return {string[]} the account codes used in the form
*/
#getAccountCodesUsed(entryType) {
getAccountCodesUsed(entryType) {
let inUse = [];
for (const currency of this.#currencies) {
inUse = inUse.concat(currency.getAccountCodesUsed(entryType));
@ -280,16 +280,6 @@ class TransactionForm {
static initialize() {
this.#form = new TransactionForm()
}
/**
* Returns the account codes used in the form.
*
* @param entryType {string} the entry type, either "debit" or "credit"
* @return {string[]} the account codes used in the form
*/
static getAccountCodesUsed(entryType) {
return this.#form.#getAccountCodesUsed(entryType);
}
}
/**