fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MexinaD <...@git.apache.org>
Subject [GitHub] fineract pull request #436: FINERACT-416 Interest of the whole term
Date Wed, 10 Jan 2018 13:58:29 GMT
Github user MexinaD commented on a diff in the pull request:

    https://github.com/apache/fineract/pull/436#discussion_r160683568
  
    --- Diff: fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AprCalculator.java
---
    @@ -41,10 +41,29 @@ public BigDecimal calculateFrom(final PeriodFrequencyType interestPeriodFrequenc
                 case YEARS:
                     defaultAnnualNominalInterestRate = interestRatePerPeriod.multiply(BigDecimal.valueOf(1));
                 break;
    +            case WHOLE_TERM:
    +                        final BigDecimal ratePerPeriod = interestRatePerPeriod.divide(BigDecimal.valueOf(numberOfRepayments*repaymentEvery),
8, RoundingMode.HALF_UP);
    +                         
    +                         switch (repaymentPeriodFrequencyType) {
    +                             case DAYS:
    +                                 defaultAnnualNominalInterestRate = ratePerPeriod.multiply(BigDecimal.valueOf(365));
    --- End diff --
    
    I followed what was already implemented for "DAYS" frequency from the first switch loop.


---

Mime
View raw message