Relocated charge recalculation in loan approval.

This commit is contained in:
Tan Gemicioglu
2016-12-26 16:27:14 +03:00
parent c8cedfc70d
commit ac7195a488
@@ -2145,9 +2145,11 @@ public class Loan extends AbstractPersistableCustom<Long> {
updateDisbursementDetails(command, actualChanges); updateDisbursementDetails(command, actualChanges);
} }
} }
if (loanProduct.isMultiDisburseLoan()) {
recalculateAllCharges(); recalculateAllCharges();
if (loanProduct.isMultiDisburseLoan()) {
if (this.disbursementDetails.isEmpty()) { if (this.disbursementDetails.isEmpty()) {
final String errorMessage = "For this loan product, disbursement details must be provided"; final String errorMessage = "For this loan product, disbursement details must be provided";
throw new MultiDisbursementDataRequiredException(LoanApiConstants.disbursementDataParameterName, errorMessage); throw new MultiDisbursementDataRequiredException(LoanApiConstants.disbursementDataParameterName, errorMessage);