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


##########
fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/Loan.java:
##########
@@ -1389,6 +1389,11 @@ private void applyPeriodicAccruals(final 
Collection<LoanTransaction> accruals) {
         }
     }
 
+    private LocalDate 
getDateForRangeCalculationWhenChargeAccrualOnSubmittedDate(LoanTransaction 
loanTransaction) {
+        return loanTransaction.getLoanChargesPaid().size() == 0 ? 
loanTransaction.getTransactionDate()

Review Comment:
   `isEmpty` might be better for readability.
   
   However I dont really like this method. There are 2 places you check whether 
accrual transaction date to be used or the charge due date. Would you mind 
merge the conditions into just one place? You need a date , the method should 
decide entirely what date to be retrieved and hence to be used.



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