FINERACT-2378: Failing integration test: org.apache.fineract.integrationtests.SchedulerJobsTestResults#testInterestTransferForSavings (#5059)
This commit is contained in:
-6
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user