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

This commit is contained in:
JohnAlva
2025-10-01 15:32:13 +02:00
committed by Adam Saghy
parent d782e65fc2
commit 963f8550b8
3 changed files with 27 additions and 41 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;