FINERACT-2107: Allow interest rate change on fully paid installment for Progressive loans

This commit is contained in:
leksinomi
2024-11-07 21:51:57 +01:00
committed by Adam Saghy
parent 6feb10a87e
commit 4013172ab0
7 changed files with 221 additions and 3 deletions
@@ -19,7 +19,9 @@
package org.apache.fineract.portfolio.loanaccount.rescheduleloan.data;
import org.apache.fineract.infrastructure.core.api.JsonCommand;
import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder;
import org.apache.fineract.portfolio.loanaccount.domain.Loan;
import org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment;
import org.apache.fineract.portfolio.loanaccount.rescheduleloan.domain.LoanRescheduleRequest;
public interface LoanRescheduleRequestDataValidator {
@@ -29,4 +31,6 @@ public interface LoanRescheduleRequestDataValidator {
void validateForApproveAction(JsonCommand jsonCommand, LoanRescheduleRequest loanRescheduleRequest);
void validateForRejectAction(JsonCommand jsonCommand, LoanRescheduleRequest loanRescheduleRequest);
void validateReschedulingInstallment(DataValidatorBuilder dataValidatorBuilder, LoanRepaymentScheduleInstallment installment);
}
@@ -199,8 +199,8 @@ public class LoanRescheduleRequestDataValidatorImpl implements LoanRescheduleReq
jsonCommand.checkForUnsupportedParameters(typeToken, jsonString, createRequestDataParameters);
}
public static void validateReschedulingInstallment(DataValidatorBuilder dataValidatorBuilder,
LoanRepaymentScheduleInstallment installment) {
@Override
public void validateReschedulingInstallment(DataValidatorBuilder dataValidatorBuilder, LoanRepaymentScheduleInstallment installment) {
if (installment == null) {
dataValidatorBuilder.reset().parameter(RescheduleLoansApiConstants.rescheduleFromDateParamName)
.failWithCode("repayment.schedule.installment.does.not.exist", "Repayment schedule installment does not exist");