Revert "FINERACT-2378: Failing integration test: org.apache.fineract.integrat…" (#5064)

This reverts commit 3b58f6af22.
This commit is contained in:
Víctor Romero
2025-09-29 17:51:27 -06:00
committed by GitHub
parent 3b58f6af22
commit 1082067a6e
3 changed files with 29 additions and 11 deletions
@@ -47,9 +47,14 @@ public class CompoundInterestHelper {
// total interest earned in previous periods but not yet recognised
BigDecimal compoundedInterest = BigDecimal.ZERO;
BigDecimal unCompoundedInterest = BigDecimal.ZERO;
LocalDate endDay = DateUtils.getBusinessLocalDate();
final CompoundInterestValues compoundInterestValues = new CompoundInterestValues(compoundedInterest, unCompoundedInterest);
for (final PostingPeriod postingPeriod : allPeriods) {
if (postingPeriod.dateOfPostingTransaction().getMonth() != endDay.getMonth()) {
compoundInterestValues.setCompoundedInterest(interestEarned.getAmount());
}
final BigDecimal interestEarnedThisPeriod = postingPeriod.calculateInterest(compoundInterestValues);
final Money moneyToBePostedForPeriod = Money.of(currency, interestEarnedThisPeriod);
@@ -63,6 +68,7 @@ public class CompoundInterestHelper {
|| (lockUntil != null && !DateUtils.isAfter(postingPeriod.dateOfPostingTransaction(), lockUntil)))) {
compoundInterestValues.setCompoundedInterest(BigDecimal.ZERO);
}
endDay = postingPeriod.dateOfPostingTransaction();
}
return interestEarned;