fix minor issues in Mifosx-437
This commit is contained in:
+5
-2
@@ -123,8 +123,7 @@ public class Charge extends AbstractPersistable<Long> {
|
||||
this.penalty = penalty;
|
||||
this.active = active;
|
||||
this.chargePaymentMode = paymentMode == null ? null : paymentMode.getValue();
|
||||
this.minCap = minCap;
|
||||
this.maxCap = maxCap;
|
||||
|
||||
|
||||
final List<ApiParameterError> dataValidationErrors = new ArrayList<ApiParameterError>();
|
||||
final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors).resource("charges");
|
||||
@@ -162,6 +161,10 @@ public class Charge extends AbstractPersistable<Long> {
|
||||
.failWithCodeNoParameterAddedToErrorCode("not.allowed.charge.time.for.loan");
|
||||
}
|
||||
}
|
||||
if(isPercentageOfAmount()){
|
||||
this.minCap = minCap;
|
||||
this.maxCap = maxCap;
|
||||
}
|
||||
|
||||
if (!dataValidationErrors.isEmpty()) { throw new PlatformApiDataValidationException(dataValidationErrors); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user