Skip to content

Commit

Permalink
fix: Reverse deposit transaction applied when Savings account is over…
Browse files Browse the repository at this point in the history
…draft
  • Loading branch information
Jose Alberto Hernandez committed Jul 29, 2024
1 parent 2103836 commit 8c9407a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ protected void recalculateDailyBalances(final Money openingAccountBalance, final
if (MathUtil.isEmpty(overdraftAmount) && runningBalance.isLessThanZero() && !transaction.isAmountOnHold()) {
overdraftAmount = runningBalance.negated();
}
if (!calculateInterest || transaction.getId() == null) {
if (!calculateInterest || transaction.getId() == null || transaction.getOverdraftAmount(this.currency).isZero()) {
transaction.setOverdraftAmount(overdraftAmount);
} else if (!MathUtil.isEqualTo(overdraftAmount, transaction.getOverdraftAmount(this.currency))) {
SavingsAccountTransaction accountTransaction = SavingsAccountTransaction.copyTransaction(transaction);
Expand Down

0 comments on commit 8c9407a

Please sign in to comment.