Merge pull request #1517 from pramodn02/MIFOSX-2228
MIFOSX-2228 : changed the order of calculating outstanding for multidisburse loan
This commit is contained in:
+11
-10
@@ -1836,16 +1836,6 @@ public abstract class AbstractLoanScheduleGenerator implements LoanScheduleGener
|
|||||||
chargesDueAtTimeOfDisbursement);
|
chargesDueAtTimeOfDisbursement);
|
||||||
final List<LoanRepaymentScheduleInstallment> newRepaymentScheduleInstallments = new ArrayList<>();
|
final List<LoanRepaymentScheduleInstallment> newRepaymentScheduleInstallments = new ArrayList<>();
|
||||||
MonetaryCurrency currency = outstandingBalance.getCurrency();
|
MonetaryCurrency currency = outstandingBalance.getCurrency();
|
||||||
final Map<LocalDate, Money> disburseDetailMap = new HashMap<>();
|
|
||||||
if (loanApplicationTerms.isMultiDisburseLoan()) {
|
|
||||||
// fetches the first tranche amount and also updates other
|
|
||||||
// tranche
|
|
||||||
// details to map
|
|
||||||
BigDecimal disburseAmt = getDisbursementAmount(loanApplicationTerms, loanApplicationTerms.getExpectedDisbursementDate(),
|
|
||||||
periods, chargesDueAtTimeOfDisbursement, disburseDetailMap, true);
|
|
||||||
outstandingBalance = outstandingBalance.zero().plus(disburseAmt);
|
|
||||||
outstandingBalanceAsPerRest = outstandingBalance;
|
|
||||||
}
|
|
||||||
|
|
||||||
// early payments will be added here and as per the selected
|
// early payments will be added here and as per the selected
|
||||||
// strategy
|
// strategy
|
||||||
@@ -1892,6 +1882,17 @@ public abstract class AbstractLoanScheduleGenerator implements LoanScheduleGener
|
|||||||
// Set fixed Amortization Amounts(either EMI or Principal )
|
// Set fixed Amortization Amounts(either EMI or Principal )
|
||||||
updateAmortization(mc, loanApplicationTerms, actualRepaymentDate, periodNumber, outstandingBalance, holidayDetailDTO);
|
updateAmortization(mc, loanApplicationTerms, actualRepaymentDate, periodNumber, outstandingBalance, holidayDetailDTO);
|
||||||
|
|
||||||
|
final Map<LocalDate, Money> disburseDetailMap = new HashMap<>();
|
||||||
|
if (loanApplicationTerms.isMultiDisburseLoan()) {
|
||||||
|
// fetches the first tranche amount and also updates other
|
||||||
|
// tranche
|
||||||
|
// details to map
|
||||||
|
BigDecimal disburseAmt = getDisbursementAmount(loanApplicationTerms, loanApplicationTerms.getExpectedDisbursementDate(),
|
||||||
|
periods, chargesDueAtTimeOfDisbursement, disburseDetailMap, true);
|
||||||
|
outstandingBalance = outstandingBalance.zero().plus(disburseAmt);
|
||||||
|
outstandingBalanceAsPerRest = outstandingBalance;
|
||||||
|
}
|
||||||
|
|
||||||
// Block process the installment and creates the period if it falls
|
// Block process the installment and creates the period if it falls
|
||||||
// before reschedule from date
|
// before reschedule from date
|
||||||
// This will create the recalculation details by applying the
|
// This will create the recalculation details by applying the
|
||||||
|
|||||||
Reference in New Issue
Block a user