Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,8 @@ private void validateMultiDisburseLoanData(final DataValidatorBuilder baseDataVa
effectiveAllowFullTermForTranche = loanProduct.getLoanProductTrancheDetails().isAllowFullTermForTranche();
}

// Validate: allowFullTermForTranche requires multi-disburse and PROGRESSIVE schedule
// Validate: allowFullTermForTranche requires multi-disburse and PROGRESSIVE
// schedule
if (Boolean.TRUE.equals(effectiveAllowFullTermForTranche)) {
if (!Boolean.TRUE.equals(effectiveMultiDisburseLoan)) {
baseDataValidator.reset().parameter(LoanProductConstants.ALLOW_FULL_TERM_FOR_TRANCHE_PARAM_NAME).failWithCode(
Expand Down Expand Up @@ -2125,7 +2126,8 @@ private void validateAdditionalAccountMappings(DataValidatorBuilder baseDataVali
final JsonArray reasonToExpenseMappingArray = this.fromApiJsonHelper.extractJsonArrayNamed(parameterName, element);
if (reasonToExpenseMappingArray != null && !reasonToExpenseMappingArray.isEmpty()) {
Map<Long, Set<Long>> reasonToAccounts = new HashMap<>();
List<JsonObject> processedMappings = new ArrayList<>(); // Collect processed mappings for the new method
List<JsonObject> processedMappings = new ArrayList<>(); // Collect processed mappings
// for the new method

int i = 0;
do {
Expand Down Expand Up @@ -2189,7 +2191,8 @@ private void validateClassificationToIncomeMappings(final DataValidatorBuilder b
final JsonArray classificationToIncomeMappingArray = this.fromApiJsonHelper.extractJsonArrayNamed(parameterName, element);
if (classificationToIncomeMappingArray != null && classificationToIncomeMappingArray.size() > 0) {
Map<Long, Set<Long>> classificationToAccounts = new HashMap<>();
List<JsonObject> processedMappings = new ArrayList<>(); // Collect processed mappings for the new method
List<JsonObject> processedMappings = new ArrayList<>(); // Collect processed mappings
// for the new method

int i = 0;
do {
Expand Down Expand Up @@ -2797,9 +2800,13 @@ public void fixedLengthValidations(final String transactionProcessingStrategyCod
private void validateLoanScheduleType(final String transactionProcessingStrategyCode, final DataValidatorBuilder baseDataValidator,
final JsonElement element) {
final String loanScheduleType = this.fromApiJsonHelper.extractStringNamed(LoanProductConstants.LOAN_SCHEDULE_TYPE, element);
baseDataValidator.reset().parameter(LoanProductConstants.LOAN_SCHEDULE_TYPE).value(loanScheduleType)
baseDataValidator.reset().parameter(LoanProductConstants.LOAN_SCHEDULE_TYPE).value(loanScheduleType).ignoreIfNull()
.isOneOfEnumValues(LoanScheduleType.class);

if (loanScheduleType == null || baseDataValidator.hasError()) {
return;
}

if (!LoanScheduleType.PROGRESSIVE.equals(LoanScheduleType.valueOf(loanScheduleType))
&& AdvancedPaymentScheduleTransactionProcessor.ADVANCED_PAYMENT_ALLOCATION_STRATEGY
.equals(transactionProcessingStrategyCode)) {
Expand Down
Loading