adamsaghy commented on code in PR #4886:
URL: https://github.com/apache/fineract/pull/4886#discussion_r2253544654


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountInterestPostingServiceImpl.java:
##########
@@ -268,16 +271,66 @@ public List<PostingPeriod> calculateInterestUsing(final 
MathContext mc, final Lo
             if 
(postedAsOnDates.contains(periodInterval.endDate().plusDays(1))) {
                 isUserPosting = true;
             }
-            final PostingPeriod postingPeriod = 
PostingPeriod.createFromDTO(periodInterval, periodStartingBalance,
-                    
retreiveOrderedNonInterestPostingTransactions(savingsAccountData), 
monetaryCurrency, compoundingPeriodType,
-                    interestCalculationType, interestRateAsFraction, 
daysInYearType.getValue(), upToInterestCalculationDate,
-                    interestPostTransactions, isInterestTransfer, 
minBalanceForInterestCalculation,
-                    isSavingsInterestPostingAtCurrentPeriodEnd, 
overdraftInterestRateAsFraction, minOverdraftForInterestCalculation,
-                    isUserPosting, financialYearBeginningMonth, 
savingsAccountData.isAllowOverdraft());
+            if (savingsAccountData.isAllowOverdraft() && 
!MathUtil.isZero(savingsAccountData.getGlAccountIdForInterestReceivable())) {
+
+                List<SavingsAccountTransactionData> 
listOfTransactionsIsOverdraft = listForOverdraft(savingsAccountData, 
periodInterval);
+                List<SavingsAccountTransactionData> 
listOfTransactionsIsInterestPosting = listForInterestPosting(savingsAccountData,
+                        periodInterval);
+                Boolean firstIsOverdraft = 
isOverdraftAccount(savingsAccountData, periodInterval);
+                List<SavingsAccountTransactionData> primaryListForPost = null;

Review Comment:
   Most of the names have improved, but I still have concerns about the 
following:
   prioritizedTransactionList / fallbackTransactionList: These names attempt to 
express a priority relationship between the two lists.
   While prioritizedTransactionList might work — especially if accompanied by a 
comment explaining the prioritization logic — the meaning of 
fallbackTransactionList is much less clear and feels ambiguous.
   Could you explain the logic behind how these two lists are used? With more 
context, I’d be happy to suggest clearer and more appropriate naming options.



-- 
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