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


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccrualWritePlatformServiceImpl.java:
##########
@@ -158,13 +158,19 @@ private void addAccrualTransactions(SavingsAccount 
savingsAccount, final LocalDa
 
         final List<LocalDate> accrualTransactionDates = 
savingsAccount.retrieveOrderedAccrualTransactions().stream()
                 .map(transaction -> transaction.getTransactionDate()).toList();
+        final List<LocalDate> accrualTransactionDatesReverse = 
savingsAccount.retrieveOrderedAccrualTransactions().stream()
+                .filter(transaction -> 
transaction.isReversed()).map(transaction -> 
transaction.getTransactionDate()).toList();
+
         LocalDate accruedTillDate = fromDate;
 
         for (PostingPeriod period : allPostingPeriods) {
+            LocalDate valueDate = period.getPeriodInterval().endDate();
+            List<LocalDate> matchingAccrualDates = 
accrualTransactionDatesReverse.stream()

Review Comment:
   Can you help me understand this logic? I have no clue why we need reversed 
accrual transactions with transaction date that matches with the period end 
date.



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