&& !this.fromJsonHelper.parameterExists(RescheduleLoansApiConstants.adjustedDueDateParamName, jsonElement)) {
dataValidatorBuilder.reset().parameter(RescheduleLoansApiConstants.graceOnPrincipalParamName).notNull();
}
if (rescheduleFromDate != null) {
LoanRepaymentScheduleInstallment installment = loan.getRepaymentScheduleInstallment(rescheduleFromDate);
if (installment == null) {
dataValidatorBuilder.reset().parameter(RescheduleLoansApiConstants.rescheduleFromDateParamName)
.failWithCode("repayment.schedule.installment.does.not.exist", "Repayment schedule installment does not exist");
}
if (installment != null && installment.isObligationsMet()) {
dataValidatorBuilder.reset().parameter(RescheduleLoansApiConstants.rescheduleFromDateParamName)
.failWithCode("repayment.schedule.installment.obligation.met", "Repayment schedule installment obligation met");
}
if (installment != null && installment.isPartlyPaid()) {
dataValidatorBuilder.reset().parameter(RescheduleLoansApiConstants.rescheduleFromDateParamName)
.failWithCode("repayment.schedule.installment.partly.paid", "Repayment schedule installment is partly paid");
}
if (installment != null) {
if (installment.getPenaltyChargesOutstanding(loan.getCurrency()).isGreaterThanZero()) {
dataValidatorBuilder.reset().failWithCodeNoParameterAddedToErrorCode(
"repayment.schedule.installment.has.an.outstanding.penalty.charge",
"Repayment schedule installment has an outsatnding penalty charge.");
}
if (installment.getFeeChargesOutstanding(loan.getCurrency()).isGreaterThanZero()) {
dataValidatorBuilder.reset().failWithCodeNoParameterAddedToErrorCode(
"repayment.schedule.installment.has.an.outstanding.fee.charge",
"Repayment schedule installment has an outsatnding fee charge.");
}
}