fix for Repayment schedule not showing charges due at disbursement

This commit is contained in:
Vishwas Babu AJ
2013-03-26 00:12:42 +05:30
parent f2e4df94b8
commit ef223b346c
2 changed files with 7 additions and 0 deletions
@@ -537,6 +537,7 @@ public class LoanAccountData {
this.expectedFirstRepaymentOnDate = expectedFirstRepaymentOnDate;
this.interestChargedFromDate = interestChargedFromDate;
this.timeline = timeline;
this.feeChargesAtDisbursementCharged = feeChargesDueAtDisbursementCharged;
// totals
this.summary = summary;
@@ -553,6 +553,12 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
Money totalRepayment = Money.zero(monCurrency);
Money totalOutstanding = Money.zero(monCurrency);
// update totals with details of fees charged during disbursement
totalFeeChargesCharged = totalFeeChargesCharged.plus(disbursementPeriod.feeChargesDue());
totalRepaymentExpected = totalRepaymentExpected.plus(disbursementPeriod.feeChargesDue());
totalRepayment = totalRepayment.plus(disbursementPeriod.feeChargesPaid());
totalOutstanding = totalOutstanding.plus(disbursementPeriod.feeChargesDue()).minus(disbursementPeriod.feeChargesPaid());
Integer loanTermInDays = Integer.valueOf(0);
while (rs.next()) {