MIFOSX-1076 - Added recalculation of charges on updating amount

This commit is contained in:
Pramod Nuthakki
2014-04-18 23:43:08 +05:30
parent 84f2ccfb85
commit d4c897af8b
@@ -1012,6 +1012,7 @@ public class Loan extends AbstractPersistable<Long> {
if (!actualChanges.isEmpty()) {
final boolean recalculateLoanSchedule = !(actualChanges.size() == 1 && actualChanges.containsKey("inArrearsTolerance"));
actualChanges.put("recalculateLoanSchedule", recalculateLoanSchedule);
isChargesModified = true;
}
final String dateFormatAsInput = command.dateFormat();
@@ -1182,7 +1183,6 @@ public class Loan extends AbstractPersistable<Long> {
}
final String chargesParamName = "charges";
if (command.parameterExists(chargesParamName)) {
if (isChargesModified) {
actualChanges.put(chargesParamName, getLoanCharges(possiblyModifedLoanCharges));
@@ -1210,7 +1210,6 @@ public class Loan extends AbstractPersistable<Long> {
validateChargeHasValidSpecifiedDateIfApplicable(loanCharge, getDisbursementDate(), getLastRepaymentPeriodDueDate());
}
}
}
final String collateralParamName = "collateral";
if (command.parameterExists(collateralParamName)) {