oleksii-novikov-onix commented on code in PR #4700:
URL: https://github.com/apache/fineract/pull/4700#discussion_r2109792997
##########
fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanAccountingBridgeMapper.java:
##########
@@ -73,7 +76,9 @@ public List<AccountingBridgeDataDTO>
deriveAccountingBridgeDataForChargeOff(fina
public AccountingBridgeDataDTO deriveAccountingBridgeData(final String
currencyCode, final List<Long> existingTransactionIds,
final List<Long> existingReversedTransactionIds, final boolean
isAccountTransfer, final Loan loan) {
final List<AccountingBridgeLoanTransactionDTO> newLoanTransactions =
new ArrayList<>();
- for (final LoanTransaction transaction : loan.getLoanTransactions()) {
+
+ // TODO Probably we should not fetch all transactions here
+ for (final LoanTransaction transaction :
loanTransactionRepository.findByLoan(loan)) {
Review Comment:
Unfortunately, these changes are produced by changes in
LoanAccrualsProcessingServiceImpl. When we try to avoid using the
addLoanTransaction method from the LoanAccrualsProcessingServiceImpl, some
journal entries end up missing + somethimes amounts are not expected.
I can write the appropriate JPA query or queries, but I left a TODO because
this part is tricky. The reason is that existingTransactionIds and/or
existingReversedTransactionIds could be empty, which doesn’t work well with
JPA's IN operator.
--
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]