FINERACT-1981: fix pay-off for TILL_REST_FREQUENCY_DATE

This commit is contained in:
Kristof Jozsa
2024-09-18 09:33:00 +02:00
committed by Adam Saghy
parent e0071715d2
commit c511385946
3 changed files with 33 additions and 9 deletions
@@ -512,6 +512,7 @@ public class LoanRepaymentScheduleInstallment extends AbstractAuditableWithUTCDa
Money penaltyPortionOfTransaction = Money.zero(currency);
if (transactionAmountRemaining.isZero()) {
// checkIfRepaymentPeriodObligationsAreMet(transactionDate, currency);
return penaltyPortionOfTransaction;
}
@@ -538,6 +539,7 @@ public class LoanRepaymentScheduleInstallment extends AbstractAuditableWithUTCDa
final MonetaryCurrency currency = transactionAmountRemaining.getCurrency();
Money feePortionOfTransaction = Money.zero(currency);
if (transactionAmountRemaining.isZero()) {
// checkIfRepaymentPeriodObligationsAreMet(transactionDate, currency);
return feePortionOfTransaction;
}
final Money feeChargesDue = getFeeChargesOutstanding(currency);
@@ -563,6 +565,7 @@ public class LoanRepaymentScheduleInstallment extends AbstractAuditableWithUTCDa
final MonetaryCurrency currency = transactionAmountRemaining.getCurrency();
Money interestPortionOfTransaction = Money.zero(currency);
if (transactionAmountRemaining.isZero()) {
// checkIfRepaymentPeriodObligationsAreMet(transactionDate, currency);
return interestPortionOfTransaction;
}
final Money interestDue = getInterestOutstanding(currency);
@@ -588,6 +591,7 @@ public class LoanRepaymentScheduleInstallment extends AbstractAuditableWithUTCDa
final MonetaryCurrency currency = transactionAmount.getCurrency();
Money principalPortionOfTransaction = Money.zero(currency);
if (transactionAmount.isZero()) {
checkIfRepaymentPeriodObligationsAreMet(transactionDate, currency);
return principalPortionOfTransaction;
}
final Money principalDue = getPrincipalOutstanding(currency);