Abhishek6122008 commented on code in PR #6174:
URL: https://github.com/apache/fineract/pull/6174#discussion_r4155451927


##########
fineract-savings/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsSchedularInterestPoster.java:
##########
@@ -150,6 +150,17 @@ private void batchUpdateJournalEntries(final 
List<SavingsAccountData> savingsAcc
                                         savingsAccountData.getId(), 
auditDatetime, auditDatetime, false, BigDecimal.ZERO, BigDecimal.ZERO,
                                         null, 
savingsAccountTransactionData.getTransactionDate(), null, userId, userId,
                                         DateUtils.getBusinessLocalDate() });
+                    } else {

Review Comment:
   @adamsaghy @bharathcgowda Yes, that's correct and thank you for the review, 
The issue is the current guard: cash-based accounts with accounting enabled 
still need to generate journal entries, so I'll remove it.
   
   I'll instead fix `selectAccountId` so that cash-based products post interest 
as debit `INTEREST_ON_SAVINGS` / credit `SAVINGS_CONTROL`, matching the 
behaviour in `CashBasedAccountingProcessorForSavings`. This should allow the 
job to generate the correct entries rather than skipping them or failing.
   
   As agreed, I'll also add `product_type = 2` to the `apm2`–`apm4` joins in 
this PR, along with test cases covering:
   
   * Cash-based and accrual interest posting through the job, verifying the 
journal entries.
   * A savings product and a loan product sharing the same ID.
   
   If this approach looks good, I'll go ahead and start working on it.
   



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