FINERACT-416 Interest of the whole term#436
Conversation
|
@nazeer1100126 Can you check this |
avikganguly01
left a comment
There was a problem hiding this comment.
@MexinaD : Hey Mexina, sorry for the delay.
Can you confirm couple of things :-
-
The loan terms can be overriden at the loan account level right? If that is the case, corresponding changes need to be made at the loan account level to allow to override the product term settings.
-
Have you checked the usage of PeriodFrequencyType in the codebase and found no obvious cases where usage of this new enum value won't work with other product settings? If so, appropriate exceptions need to be thrown for such combinations.
-
Are any of the LMS integration tests failing when you run ./gradlew integrationTest?
Once you have addressed all the comments, can you enhance the example you provided at https://issues-test.apache.org/jira/browse/FINERACT-416 with expected results?
|
|
||
| switch (repaymentPeriodFrequencyType) { | ||
| case DAYS: | ||
| defaultAnnualNominalInterestRate = ratePerPeriod.multiply(BigDecimal.valueOf(365)); |
There was a problem hiding this comment.
Shoudn't this consider the no. of days in a year as per product configuration instead of 365?
There was a problem hiding this comment.
I followed what was already implemented for "DAYS" frequency from the first switch loop.
| defaultAnnualNominalInterestRate = interestRatePerPeriod.multiply(BigDecimal.valueOf(1)); | ||
| break; | ||
| case WHOLE_TERM: | ||
| final BigDecimal ratePerPeriod = interestRatePerPeriod.divide(BigDecimal.valueOf(numberOfRepayments*repaymentEvery), 8, RoundingMode.HALF_UP); |
There was a problem hiding this comment.
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.
|
@avikganguly01 Regarding the above cases
|
|
@avikganguly01 Note: This is an improvement |
|
@avikganguly01 Is there anything to modify? |
|
Hello @ShruthiRajaram Can you help to review this too |
@avikganguly01 Can you please preview this PR so that it can be in upcoming release, it is a long waited feature here in Tanzania.
Its jira ticket is https://issues.apache.org/jira/browse/FINERACT-416