adamsaghy commented on code in PR #4280:
URL: https://github.com/apache/fineract/pull/4280#discussion_r1927137294
##########
fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/AbstractLoanRepaymentScheduleTransactionProcessor.java:
##########
@@ -225,8 +246,14 @@ protected void calculateAccrualActivity(LoanTransaction
loanTransaction, Monetar
.filter(installment ->
LoanRepaymentScheduleProcessingWrapper.isInPeriod(loanTransaction.getTransactionDate(),
installment,
installment.getInstallmentNumber().equals(firstNormalInstallmentNumber)))
.findFirst().orElseThrow();
- if
(loanTransaction.getDateOf().isEqual(currentInstallment.getDueDate()) ||
installments.stream()
- .filter(i -> !i.isAdditional() &&
!i.isDownPayment()).noneMatch(LoanRepaymentScheduleInstallment::isNotFullyPaidOff))
{
+ // recalculate if
+ // loan is active OR
+ // transaction is not the last OR
+ // normalInstallmentsAreFullyPaidOff
+ // if nether is true, then it is a reopen scenario, and the last
non-reversed transaction will be reversed or
+ // recalculated anyway
+ if (isNotClosedOrOverpaid(loanTransaction.getLoan()) ||
!isLastAccrualActivityTransaction(loanTransaction)
Review Comment:
Lets have a chat...
--
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]