add validation for repayment strategy for loan application flows, add data update patch for heavensfamily data.
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
UPDATE `mifostenant-heavensfamily`.`m_loan`
|
||||||
|
SET
|
||||||
|
`loan_transaction_strategy_id` = 2
|
||||||
|
WHERE id > 0;
|
||||||
|
|
||||||
|
UPDATE `mifostenant-heavensfamily`.`m_loan`
|
||||||
|
SET
|
||||||
|
`term_frequency` = `repay_every` * `number_of_repayments`
|
||||||
|
WHERE `term_frequency` = 0;
|
||||||
+6
@@ -3,6 +3,7 @@ package org.mifosng.platform.loan.service;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.mifosng.platform.DataValidatorBuilder;
|
||||||
import org.mifosng.platform.api.commands.CalculateLoanScheduleCommand;
|
import org.mifosng.platform.api.commands.CalculateLoanScheduleCommand;
|
||||||
import org.mifosng.platform.api.commands.LoanChargeCommand;
|
import org.mifosng.platform.api.commands.LoanChargeCommand;
|
||||||
import org.mifosng.platform.api.commands.LoanApplicationCommand;
|
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 {
|
try {
|
||||||
// reuse calculate loan schedule validator for now
|
// reuse calculate loan schedule validator for now
|
||||||
CalculateLoanScheduleCommand calculateLoanScheduleCommand = this.command.toCalculateLoanScheduleCommand();
|
CalculateLoanScheduleCommand calculateLoanScheduleCommand = this.command.toCalculateLoanScheduleCommand();
|
||||||
|
|||||||
Reference in New Issue
Block a user