You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by "adamsaghy (via GitHub)" <gi...@apache.org> on 2024/04/03 12:02:26 UTC
Re: [PR] FINERACT-2062: Use 48 weeks in a year when interest rate is per month [fineract]
adamsaghy commented on code in PR #3795:
URL: https://github.com/apache/fineract/pull/3795#discussion_r1549595443
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultPaymentPeriodsInOneYearCalculator.java:
##########
@@ -32,15 +32,15 @@
public class DefaultPaymentPeriodsInOneYearCalculator implements PaymentPeriodsInOneYearCalculator {
@Override
- public Integer calculate(final PeriodFrequencyType repaymentFrequencyType) {
+ public Integer calculate(final PeriodFrequencyType repaymentFrequencyType,final PeriodFrequencyType interestRateFrequencyMethod) {
Integer paymentPeriodsInOneYear = 0;
switch (repaymentFrequencyType) {
case DAYS:
- paymentPeriodsInOneYear = 365;
+ paymentPeriodsInOneYear = interestRateFrequencyMethod.isMonthly() ? Integer.valueOf(360) : Integer.valueOf(365);
break;
case WEEKS:
- paymentPeriodsInOneYear = 52;
+ paymentPeriodsInOneYear = interestRateFrequencyMethod.isMonthly() ? Integer.valueOf(48) : Integer.valueOf(52);
Review Comment:
I dont think thats right... monthly interest calculation cannot be 4 weeks... @bharathc27 Thoughts?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org