FINERACT-2081: Fix end of month and partial interest calculation for 360/30
This commit is contained in:
+4
-4
@@ -1549,10 +1549,10 @@ public final class LoanApplicationTerms {
|
||||
public LoanProductMinimumRepaymentScheduleRelatedDetail toLoanProductRelatedDetailMinimumData() {
|
||||
final CurrencyData currency = new CurrencyData(this.currency.getCode(), this.currency.getDecimalPlaces(),
|
||||
this.currency.getInMultiplesOf());
|
||||
return new LoanProductRelatedDetailMinimumData(currency, principal, inArrearsTolerance, interestRatePerPeriod,
|
||||
annualNominalInterestRate, interestChargingGrace, interestPaymentGrace, principalGrace,
|
||||
recurringMoratoriumOnPrincipalPeriods, interestMethod, interestCalculationPeriodMethod, daysInYearType, daysInMonthType,
|
||||
amortizationMethod, repaymentPeriodFrequencyType, repaymentEvery, numberOfRepayments);
|
||||
return new LoanProductRelatedDetailMinimumData(currency, interestRatePerPeriod, annualNominalInterestRate, interestChargingGrace,
|
||||
interestPaymentGrace, principalGrace, recurringMoratoriumOnPrincipalPeriods, interestMethod,
|
||||
interestCalculationPeriodMethod, daysInYearType, daysInMonthType, amortizationMethod, repaymentPeriodFrequencyType,
|
||||
repaymentEvery, numberOfRepayments);
|
||||
}
|
||||
|
||||
public Integer getLoanTermFrequency() {
|
||||
|
||||
+6
-28
@@ -20,7 +20,6 @@ package org.apache.fineract.portfolio.loanproduct.data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.apache.fineract.organisation.monetary.data.CurrencyData;
|
||||
import org.apache.fineract.organisation.monetary.domain.Money;
|
||||
import org.apache.fineract.portfolio.common.domain.DaysInMonthType;
|
||||
import org.apache.fineract.portfolio.common.domain.DaysInYearType;
|
||||
import org.apache.fineract.portfolio.common.domain.PeriodFrequencyType;
|
||||
@@ -32,39 +31,28 @@ import org.apache.fineract.portfolio.loanproduct.domain.LoanProductMinimumRepaym
|
||||
public class LoanProductRelatedDetailMinimumData implements LoanProductMinimumRepaymentScheduleRelatedDetail {
|
||||
|
||||
private final CurrencyData currency;
|
||||
|
||||
private final Money principal;
|
||||
private final Money inArrearsTolerance;
|
||||
|
||||
private final BigDecimal interestRatePerPeriod;
|
||||
private final BigDecimal annualNominalInterestRate;
|
||||
|
||||
private final Integer interestChargingGrace;
|
||||
private final Integer interestPaymentGrace;
|
||||
private final Integer principalGrace;
|
||||
private final Integer recurringMoratoriumOnPrincipalPeriods;
|
||||
|
||||
private final InterestMethod interestMethod;
|
||||
private final InterestCalculationPeriodMethod interestCalculationPeriodMethod;
|
||||
|
||||
private final DaysInYearType daysInYearType;
|
||||
private final DaysInMonthType daysInMonthType;
|
||||
|
||||
private final AmortizationMethod amortizationMethod;
|
||||
|
||||
private final PeriodFrequencyType repaymentPeriodFrequencyType;
|
||||
private final Integer repaymentEvery;
|
||||
private final Integer numberOfRepayments;
|
||||
|
||||
public LoanProductRelatedDetailMinimumData(CurrencyData currency, Money principal, Money inArrearsTolerance,
|
||||
BigDecimal interestRatePerPeriod, BigDecimal annualNominalInterestRate, Integer interestChargingGrace,
|
||||
Integer interestPaymentGrace, Integer principalGrace, Integer recurringMoratoriumOnPrincipalPeriods,
|
||||
InterestMethod interestMethod, InterestCalculationPeriodMethod interestCalculationPeriodMethod, DaysInYearType daysInYearType,
|
||||
DaysInMonthType daysInMonthType, AmortizationMethod amortizationMethod, PeriodFrequencyType repaymentPeriodFrequencyType,
|
||||
Integer repaymentEvery, Integer numberOfRepayments) {
|
||||
public LoanProductRelatedDetailMinimumData(CurrencyData currency, BigDecimal interestRatePerPeriod,
|
||||
BigDecimal annualNominalInterestRate, Integer interestChargingGrace, Integer interestPaymentGrace, Integer principalGrace,
|
||||
Integer recurringMoratoriumOnPrincipalPeriods, InterestMethod interestMethod,
|
||||
InterestCalculationPeriodMethod interestCalculationPeriodMethod, DaysInYearType daysInYearType, DaysInMonthType daysInMonthType,
|
||||
AmortizationMethod amortizationMethod, PeriodFrequencyType repaymentPeriodFrequencyType, Integer repaymentEvery,
|
||||
Integer numberOfRepayments) {
|
||||
this.currency = currency;
|
||||
this.principal = principal;
|
||||
this.inArrearsTolerance = inArrearsTolerance;
|
||||
this.interestRatePerPeriod = interestRatePerPeriod;
|
||||
this.annualNominalInterestRate = annualNominalInterestRate;
|
||||
this.interestChargingGrace = defaultToNullIfZero(interestChargingGrace);
|
||||
@@ -94,11 +82,6 @@ public class LoanProductRelatedDetailMinimumData implements LoanProductMinimumRe
|
||||
return currency;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Money getPrincipal() {
|
||||
return principal;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getGraceOnInterestCharged() {
|
||||
return interestChargingGrace;
|
||||
@@ -119,11 +102,6 @@ public class LoanProductRelatedDetailMinimumData implements LoanProductMinimumRe
|
||||
return recurringMoratoriumOnPrincipalPeriods;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Money getInArrearsTolerance() {
|
||||
return inArrearsTolerance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal getNominalInterestRatePerPeriod() {
|
||||
return interestRatePerPeriod;
|
||||
|
||||
-5
@@ -20,7 +20,6 @@ package org.apache.fineract.portfolio.loanproduct.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.apache.fineract.organisation.monetary.data.CurrencyData;
|
||||
import org.apache.fineract.organisation.monetary.domain.Money;
|
||||
import org.apache.fineract.portfolio.common.domain.PeriodFrequencyType;
|
||||
|
||||
/**
|
||||
@@ -30,8 +29,6 @@ public interface LoanProductMinimumRepaymentScheduleRelatedDetail {
|
||||
|
||||
CurrencyData getCurrencyData();
|
||||
|
||||
Money getPrincipal();
|
||||
|
||||
Integer getGraceOnInterestCharged();
|
||||
|
||||
Integer getGraceOnInterestPayment();
|
||||
@@ -40,8 +37,6 @@ public interface LoanProductMinimumRepaymentScheduleRelatedDetail {
|
||||
|
||||
Integer getRecurringMoratoriumOnPrincipalPeriods();
|
||||
|
||||
Money getInArrearsTolerance();
|
||||
|
||||
BigDecimal getNominalInterestRatePerPeriod();
|
||||
|
||||
PeriodFrequencyType getInterestPeriodFrequencyType();
|
||||
|
||||
-2
@@ -263,12 +263,10 @@ public class LoanProductRelatedDetail implements LoanProductMinimumRepaymentSche
|
||||
return currency.toData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Money getPrincipal() {
|
||||
return Money.of(getCurrencyData(), this.principal);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Money getInArrearsTolerance() {
|
||||
return Money.of(getCurrencyData(), this.inArrearsTolerance);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user