adamsaghy commented on code in PR #3992:
URL: https://github.com/apache/fineract/pull/3992#discussion_r1691299179
##########
fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanSummaryData.java:
##########
@@ -144,6 +146,7 @@ public static LoanSummaryData
withTransactionAmountsSummary(final LoanSummaryDat
totalRepaymentTransactionReversed =
computeTotalAmountForReversedTransactions(LoanTransactionType.REPAYMENT,
loanTransactions);
totalInterestPaymentWaiver =
computeTotalAmountForNonReversedTransactions(LoanTransactionType.INTEREST_PAYMENT_WAIVER,
loanTransactions);
+ totalInterestRefund =
computeTotalAmountForNonReversedTransactions(LoanTransactionType.INTEREST_REFUND,
loanTransactions);
Review Comment:
I think we should move away from using the "all loan transactions" (there
might be cases when we are not fetching the loan transactions at all) to have a
query to fetch the proper amount instead. As the loan got more and more loan
transactions it is becoming a performance pitfall.
Would you mind to rewrite this to fetch either filtered transactions (only
Interest refund types) or calculate immediately the total amount of interest
refund transactiosn (that are not reverted)?
--
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]