FINERACT-1748: Loan prepayment issue after advance payment
This commit is contained in:
committed by
Arnold Gálovics
parent
47c9b93d27
commit
ba1d0ce66c
+3
-1
@@ -2225,7 +2225,9 @@ public abstract class AbstractLoanScheduleGenerator implements LoanScheduleGener
|
||||
.adjustRepaymentDate(actualRepaymentDate, loanApplicationTerms, holidayDetailDTO).getChangedScheduleDate();
|
||||
LocalDate modifiedLastInstDate = null;
|
||||
LoanTermVariationsData variation1 = null;
|
||||
boolean hasDueDateVariation = false;
|
||||
while (loanApplicationTerms.getLoanTermVariations().hasDueDateVariation(lastInstallmentDate)) {
|
||||
hasDueDateVariation = true;
|
||||
LoanTermVariationsData variation = loanApplicationTerms.getLoanTermVariations().nextDueDateVariation();
|
||||
if (!variation.isSpecificToInstallment()) {
|
||||
modifiedLastInstDate = variation.getDateValue();
|
||||
@@ -2233,7 +2235,7 @@ public abstract class AbstractLoanScheduleGenerator implements LoanScheduleGener
|
||||
}
|
||||
}
|
||||
|
||||
if (!lastInstallmentDate.isEqual(installment.getDueDate())
|
||||
if (hasDueDateVariation && !lastInstallmentDate.isEqual(installment.getDueDate())
|
||||
&& !installment.getDueDate().equals(modifiedLastInstDate)) {
|
||||
lastInstallmentDate = prevLastInstDate;
|
||||
actualRepaymentDate = lastInstallmentDate;
|
||||
|
||||
Reference in New Issue
Block a user