adamsaghy commented on code in PR #5041:
URL: https://github.com/apache/fineract/pull/5041#discussion_r2375690826
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ReprocessLoanTransactionsServiceImpl.java:
##########
@@ -147,28 +145,28 @@ &&
doesLoanChargePaidByContainLoanCharge(transaction.getLoanChargesPaid(), loanC
}
}
- private boolean
doesLoanChargePaidByContainLoanCharge(Set<LoanChargePaidBy> loanChargePaidBys,
LoanCharge loanCharge) {
- return loanChargePaidBys.stream() //
- .anyMatch(loanChargePaidBy ->
loanChargePaidBy.getLoanCharge().equals(loanCharge));
- }
-
@Override
public void processLatestTransaction(final LoanTransaction
loanTransaction, final Loan loan) {
LoanRepaymentScheduleTransactionProcessor transactionProcessor =
loanTransactionProcessingService
.getTransactionProcessor(loan.getTransactionProcessingStrategyCode());
+ List<LoanTransaction> transactions = Collections.emptyList();
+ if (loanTransaction.isInterestRefund() ||
loanTransaction.isContractTermination() || loanTransaction.isChargeback()
+ || loanTransaction.isChargeOff()) {
+ transactions = loan.getLoanTransactions();
Review Comment:
But you dont need the accrual transactions for example, right? So
immediately you can fetch only the absolutely necessary transactions only. Am I
missing something here?
--
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]