adamsaghy commented on code in PR #2790:
URL: https://github.com/apache/fineract/pull/2790#discussion_r1040833610
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanSummaryData.java:
##########
@@ -120,4 +139,70 @@ public LoanSummaryData(final CurrencyData currency, final
BigDecimal principalDi
this.writeoffReason = writeoffReason;
this.totalRecovered = totalRecovered;
}
+
+ public static LoanSummaryData withTransactionAmountsSummary(final
LoanSummaryData defaultSummaryData,
+ final Collection<LoanTransactionData> loanTransactions) {
+
+ BigDecimal totalMerchantRefund =
computeTotalAmountForNonReversedTransactions(LoanTransactionType.MERCHANT_ISSUED_REFUND,
Review Comment:
Wouldnt it be better to iterate through the transactions just once and
calculate the different balances at the same time?
--
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]