airajena commented on code in PR #5340:
URL: https://github.com/apache/fineract/pull/5340#discussion_r2721369960


##########
fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculator.java:
##########
@@ -1375,10 +1369,14 @@ private BigDecimal calculateRateFactorPerPeriod(final 
ProgressiveLoanInterestSch
         DaysInYearCustomStrategyType daysInYearCustomStrategy = 
loanProductRelatedDetail.getDaysInYearCustomStrategy();
         BigDecimal daysInYear = getNumberOfDays(daysInYearType, 
daysInYearCustomStrategy, interestPeriodFromDate,
                 repaymentPeriod.getFromDate(), repaymentPeriod.getDueDate());
-        final BigDecimal actualDaysInPeriod = BigDecimal
-                .valueOf(DateUtils.getDifferenceInDays(interestPeriodFromDate, 
interestPeriodDueDate));
         final BigDecimal calculatedDaysInRepaymentPeriod = BigDecimal
                 
.valueOf(DateUtils.getDifferenceInDays(repaymentPeriod.getFromDate(), 
repaymentPeriod.getDueDate()));
+        BigDecimal actualDaysInPeriod = 
BigDecimal.valueOf(DateUtils.getDifferenceInDays(interestPeriodFromDate, 
interestPeriodDueDate));
+        if (loanProductRelatedDetail.getInterestCalculationPeriodMethod() != 
null
+                && 
loanProductRelatedDetail.getInterestCalculationPeriodMethod().isSameAsRepaymentPeriod()
+                && 
!loanProductRelatedDetail.isAllowPartialPeriodInterestCalculation()) {
+            actualDaysInPeriod = calculatedDaysInRepaymentPeriod;
+        }

Review Comment:
   Thank you for the review. I have removed the changes to 
ProgressiveEMICalculator.java and ClientChargeWritePlatformServiceImpl.java as 
requested, keeping the PR focused solely on the valid fix for FINERACT-2155 in 
SavingsAccount.java.
   
   Regarding the reverted changes: I initially thought they were necessary to 
fix e2e test failures I encountered earlier. 
   
   Could you please point me to any documentation regarding the financial 
architecture calculations in Fineract? It would help me better understand the 
model for future contributions.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to