add validation for repayment strategy for loan application flows, add data update patch for heavensfamily data.
This commit is contained in:
+6
@@ -3,6 +3,7 @@ package org.mifosng.platform.loan.service;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.mifosng.platform.DataValidatorBuilder;
|
||||
import org.mifosng.platform.api.commands.CalculateLoanScheduleCommand;
|
||||
import org.mifosng.platform.api.commands.LoanChargeCommand;
|
||||
import org.mifosng.platform.api.commands.LoanApplicationCommand;
|
||||
@@ -39,6 +40,11 @@ public class LoanApplicationCommandValidator {
|
||||
}
|
||||
}
|
||||
|
||||
if (command.getTransactionProcessingStrategyId() == null) {
|
||||
DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors).resource("loan");
|
||||
baseDataValidator.reset().parameter("transactionProcessingStrategyId").value(command.getTransactionProcessingStrategyId()).notNull().inMinMaxRange(2, 2);
|
||||
}
|
||||
|
||||
try {
|
||||
// reuse calculate loan schedule validator for now
|
||||
CalculateLoanScheduleCommand calculateLoanScheduleCommand = this.command.toCalculateLoanScheduleCommand();
|
||||
|
||||
Reference in New Issue
Block a user