Revert "FINERACT-2378: Failing integration test: org.apache.fineract.integrat…" (#5064)
This reverts commit 3b58f6af22.
This commit is contained in:
+6
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user