FINERACT-1981: Fix multi-disbursements on same day issue

This commit is contained in:
Adam Saghy
2024-03-25 14:43:48 +01:00
parent 014144f614
commit 5f558c59c8
2 changed files with 78 additions and 1 deletions
@@ -282,8 +282,10 @@ public abstract class AbstractProgressiveLoanScheduleGenerator implements LoanSc
periods.add(downPaymentPeriod);
}
} else {
Money disbursedAmount = loanScheduleParams.getDisburseDetailMap().getOrDefault(disbursementData.disbursementDate(),
Money.zero(loanApplicationTerms.getCurrency()));
loanScheduleParams.getDisburseDetailMap().put(disbursementData.disbursementDate(),
Money.of(loanApplicationTerms.getCurrency(), disbursementData.getPrincipal()));
disbursedAmount.add(Money.of(loanApplicationTerms.getCurrency(), disbursementData.getPrincipal())));
}
}