MIFOSX-1490 : added interest schedule for interest first repayment strategies

This commit is contained in:
Pramod Nuthakki
2014-08-28 22:38:20 +05:30
parent 76f064503b
commit 6c6362bf34
19 changed files with 662 additions and 228 deletions
@@ -24,6 +24,7 @@ public class LoanRepaymentScheduleInstallmentBuilder {
private final Money feeCharges = new MoneyBuilder().build();
private final Money penaltyCharges = new MoneyBuilder().build();
private boolean completed = false;
private boolean recalculatedInterestComponent = false;
public LoanRepaymentScheduleInstallmentBuilder(final MonetaryCurrency currencyDetail) {
this.currencyDetail = currencyDetail;
@@ -34,7 +35,7 @@ public class LoanRepaymentScheduleInstallmentBuilder {
public LoanRepaymentScheduleInstallment build() {
final LoanRepaymentScheduleInstallment installment = new LoanRepaymentScheduleInstallment(this.loan, this.installmentNumber,
this.fromDate, this.dueDate, this.principal.getAmount(), this.interest.getAmount(), this.feeCharges.getAmount(),
this.penaltyCharges.getAmount());
this.penaltyCharges.getAmount(), this.recalculatedInterestComponent);
if (this.completed) {
installment.payPrincipalComponent(this.latestTransactionDate, this.principal);
installment.payInterestComponent(this.latestTransactionDate, this.interest);