josehernandezfintecheandomx commented on code in PR #2633:
URL: https://github.com/apache/fineract/pull/2633#discussion_r991289109
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/Loan.java:
##########
@@ -3689,9 +3700,11 @@ private Money calculateTotalOverpayment() {
}
for (final LoanTransaction loanTransaction : this.loanTransactions) {
- if ((loanTransaction.isRefund() ||
loanTransaction.isRefundForActiveLoan() ||
loanTransaction.isCreditBalanceRefund())
- && !loanTransaction.isReversed()) {
- totalPaidInRepayments =
totalPaidInRepayments.minus(loanTransaction.getAmount(currency));
+ if (!loanTransaction.isReversed()) {
+ if ((loanTransaction.isRefund() ||
loanTransaction.isRefundForActiveLoan() ||
loanTransaction.isCreditBalanceRefund()
+ || loanTransaction.isChargeback())) {
Review Comment:
This is for `calculateTotalOverpayment` so, for that you get first all the
repayments, then all the amounts paid in the different installments
In this part that you comment is to consider all the amounts that were
returned or credited for X reason to the client, refunds in general and charge
back too
--
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]