Arnold Galovics created FINERACT-2359:
-----------------------------------------
Summary: Wrong Days in Year configuration used for calculating
interest
Key: FINERACT-2359
URL: https://issues.apache.org/jira/browse/FINERACT-2359
Project: Apache Fineract
Issue Type: Bug
Reporter: Arnold Galovics
*Repro steps:*
* Create a Loan Product with days in year config of 360
* Create a Loan with the product for 100 000 USD with 1% interest with
WHOLE_TERM option and 60 days repayment period and 60 days term
* Approve, disburse the loan
*Expected result*
Interest for the single period loan is 1000 USD
*Actual result*
Interest for the single period loan is 1013.89 USD
*Note*
Loan product is cumulative. The reason this happens is because the interest
calculation basis days in year is hardcoded here:
[https://github.com/apache/fineract/blob/d06eb618d075b7fee99c2c156f7688246ad7e280/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AprCalculator.java#L27]
{code:java}
case DAYS:
defaultAnnualNominalInterestRate =
interestRatePerPeriod.multiply(BigDecimal.valueOf(365));
case WHOLE_TERM:
final BigDecimal ratePerPeriod =
interestRatePerPeriod.divide(BigDecimal.valueOf(numberOfRepayments *
repaymentEvery), 8,
MoneyHelper.getRoundingMode()); switch
(repaymentPeriodFrequencyType) {
case DAYS:
defaultAnnualNominalInterestRate =
ratePerPeriod.multiply(BigDecimal.valueOf(365));{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)