Merge pull request #869 from pramodn02/MIFOSX-1076
MIFOSX-1076 - Added recalculation of charges on updating amount
This commit is contained in:
+1
-2
@@ -1012,6 +1012,7 @@ public class Loan extends AbstractPersistable<Long> {
|
|||||||
if (!actualChanges.isEmpty()) {
|
if (!actualChanges.isEmpty()) {
|
||||||
final boolean recalculateLoanSchedule = !(actualChanges.size() == 1 && actualChanges.containsKey("inArrearsTolerance"));
|
final boolean recalculateLoanSchedule = !(actualChanges.size() == 1 && actualChanges.containsKey("inArrearsTolerance"));
|
||||||
actualChanges.put("recalculateLoanSchedule", recalculateLoanSchedule);
|
actualChanges.put("recalculateLoanSchedule", recalculateLoanSchedule);
|
||||||
|
isChargesModified = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
final String dateFormatAsInput = command.dateFormat();
|
final String dateFormatAsInput = command.dateFormat();
|
||||||
@@ -1182,7 +1183,6 @@ public class Loan extends AbstractPersistable<Long> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final String chargesParamName = "charges";
|
final String chargesParamName = "charges";
|
||||||
if (command.parameterExists(chargesParamName)) {
|
|
||||||
|
|
||||||
if (isChargesModified) {
|
if (isChargesModified) {
|
||||||
actualChanges.put(chargesParamName, getLoanCharges(possiblyModifedLoanCharges));
|
actualChanges.put(chargesParamName, getLoanCharges(possiblyModifedLoanCharges));
|
||||||
@@ -1210,7 +1210,6 @@ public class Loan extends AbstractPersistable<Long> {
|
|||||||
validateChargeHasValidSpecifiedDateIfApplicable(loanCharge, getDisbursementDate(), getLastRepaymentPeriodDueDate());
|
validateChargeHasValidSpecifiedDateIfApplicable(loanCharge, getDisbursementDate(), getLastRepaymentPeriodDueDate());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
final String collateralParamName = "collateral";
|
final String collateralParamName = "collateral";
|
||||||
if (command.parameterExists(collateralParamName)) {
|
if (command.parameterExists(collateralParamName)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user