FINERACT-2378: Failing integration test: org.apache.fineract.integrationtests.SchedulerJobsTestResults#testInterestTransferForSavings (#5059)

This commit is contained in:
Juan Pablo Alvarez Hernandez
2025-09-29 17:50:40 -06:00
committed by GitHub
parent c694b4a106
commit 3b58f6af22
3 changed files with 11 additions and 29 deletions
@@ -47,14 +47,9 @@ 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);
@@ -68,7 +63,6 @@ public class CompoundInterestHelper {
|| (lockUntil != null && !DateUtils.isAfter(postingPeriod.dateOfPostingTransaction(), lockUntil)))) {
compoundInterestValues.setCompoundedInterest(BigDecimal.ZERO);
}
endDay = postingPeriod.dateOfPostingTransaction();
}
return interestEarned;