FINERACT-2081: fix last installment marking on pay-off

This commit is contained in:
Kristof Jozsa
2024-09-18 15:07:02 +02:00
committed by Adam Saghy
parent 35c04c0141
commit f30264ccfc
8 changed files with 115 additions and 11 deletions
@@ -925,6 +925,8 @@ public class AdvancedPaymentScheduleTransactionProcessor extends AbstractLoanRep
addToTransactionMapping(loanTransactionToRepaymentScheduleMapping, portion, zero, zero, zero);
}
}
currentInstallment.checkIfRepaymentPeriodObligationsAreMet(transactionDate, loanTransaction.getLoan().loanCurrency());
return portion;
}
@@ -230,6 +230,7 @@ class AdvancedPaymentScheduleTransactionProcessorTest {
when(loanTransaction.getTransactionDate()).thenReturn(transactionDate);
when(charge.getAmountOutstanding(currency)).thenReturn(chargeAmountMoney);
when(loanTransaction.getLoan()).thenReturn(loan);
when(loan.loanCurrency()).thenReturn(currency);
when(loanTransaction.getLoan().getLoanProductRelatedDetail()).thenReturn(loanProductRelatedDetail);
when(loanProductRelatedDetail.getLoanScheduleProcessingType()).thenReturn(LoanScheduleProcessingType.HORIZONTAL);
when(loan.getDisbursementDate()).thenReturn(disbursementDate);