Merge pull request #1537 from pramodn02/MIFOSX-2328

MIFOSX-2328 : added call to update maturity date on approval
This commit is contained in:
Adi Narayana Raju
2015-11-05 16:15:42 +05:30
2 changed files with 4 additions and 2 deletions
@@ -1194,7 +1194,7 @@ public class Loan extends AbstractPersistable<Long> {
}
private void updateLoanScheduleDependentDerivedFields() {
public void updateLoanScheduleDependentDerivedFields() {
this.expectedMaturityDate = determineExpectedMaturityDate().toDate();
this.actualMaturityDate = determineExpectedMaturityDate().toDate();
}
@@ -390,7 +390,9 @@ public class LoanRescheduleRequestWritePlatformServiceImpl implements LoanResche
for (final LoanRepaymentScheduleInstallment repaymentScheduleInstallment : repaymentScheduleInstallments) {
repaymentScheduleInstallment.updateDerivedFields(currency, new LocalDate());
}
//updates maturity date
loan.updateLoanScheduleDependentDerivedFields();
// update the loan object
this.loanRepository.save(loan);
}