Fixed so that saving the journal entry from the journal entry editor triggers updating the total of the debit or credit side, which in turn triggers validating the balance if it is on a transfer form. This fixed the problem that deleting a journal entry updates total but not re-validating the balance.
This commit is contained in:
parent
3a12472d4b
commit
2d771f04be
@ -144,8 +144,6 @@ class JournalEntryEditor {
|
|||||||
this.#entry = this.#side.addJournalEntry();
|
this.#entry = this.#side.addJournalEntry();
|
||||||
}
|
}
|
||||||
this.#entry.save(this.#account.dataset.code, this.#account.dataset.text, this.#summary.dataset.value, this.#amount.value);
|
this.#entry.save(this.#account.dataset.code, this.#account.dataset.text, this.#summary.dataset.value, this.#amount.value);
|
||||||
this.#side.updateTotal();
|
|
||||||
this.#side.currency.validateBalance();
|
|
||||||
bootstrap.Modal.getInstance(this.#modal).hide();
|
bootstrap.Modal.getInstance(this.#modal).hide();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -599,6 +599,7 @@ class DebitCreditSideSubForm {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.#total.innerText = formatDecimal(this.getTotal());
|
this.#total.innerText = formatDecimal(this.getTotal());
|
||||||
|
this.currency.validateBalance();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -830,6 +831,7 @@ class JournalEntrySubForm {
|
|||||||
this.amount.value = amount;
|
this.amount.value = amount;
|
||||||
this.#amountText.innerText = formatDecimal(new Decimal(amount));
|
this.#amountText.innerText = formatDecimal(new Decimal(amount));
|
||||||
this.validate();
|
this.validate();
|
||||||
|
this.side.updateTotal();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user