Skip to content

Commit

Permalink
Merge pull request #1459 from fiterlatam/SU-550
Browse files Browse the repository at this point in the history
SU-550: Calculate accrued interest based on outstanding interest
  • Loading branch information
hagafrank authored Jan 4, 2025
2 parents 427aaaa + 1259e1c commit 677b2f5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4768,7 +4768,7 @@ public void persistDailyAccrual(final LocalDate transactionDate) {
.getAccruedInterestForInstallment(loanRepaymentScheduleInstallment.getInstallmentNumber());
long daysInPeriod = Math.toIntExact(ChronoUnit.DAYS.between(loanRepaymentScheduleInstallment.getFromDate(),
loanRepaymentScheduleInstallment.getDueDate()));
Money interestForInstallment = loanRepaymentScheduleInstallment.getInterestCharged(currency);
Money interestForInstallment = loanRepaymentScheduleInstallment.getInterestOutstanding(currency);
// Adjust interest on the last day of the period to make up the difference
if (transactionDate.equals(loanRepaymentScheduleInstallment.getDueDate().minusDays(1))) {
// if the amount is whole number when divided across the days in the period, then do same for
Expand Down

0 comments on commit 677b2f5

Please sign in to comment.