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:44:09 GMT
Github user MexinaD commented on a diff in the pull request:

    https://github.com/apache/fineract/pull/436#discussion_r160679575
  
    --- 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);
    --- End diff --
    
    Its not divided by 8 but i rounded off the result of InterestRatePerPeriod divide by (numberOfRepayment*repayedEvery)
to 8 us it was applied in another code in Loan.java "final MathContext mc = new MathContext(8,
roundingMode);" So i assumed the roundoff that the system is using is 8.


---

Mime
View raw message