adamsaghy commented on code in PR #4552:
URL: https://github.com/apache/fineract/pull/4552#discussion_r2033426684


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java:
##########
@@ -3097,7 +3091,7 @@ public void handleChargebackTransaction(final Loan loan, 
LoanTransaction chargeb
                             new MoneyHolder(loan.getTotalOverpaidAsMoney()), 
null));
         }
         loan.updateLoanSummaryDerivedFields();
-        if 
(!loan.doPostLoanTransactionChecks(chargebackTransaction.getTransactionDate(), 
loanLifecycleStateMachine)) {
+        if (!loanLifecycleStateMachine.doPostLoanTransactionChecks(loan, 
chargebackTransaction.getTransactionDate())) {

Review Comment:
   This is the only logic which do anything with the method return value, but 
do be honest i have no clue the underlying logic here...
   
   Would you mind to review it and straighten a little bit? 
   `loanLifecycleStateMachine.doPostLoanTransactionChecks` is moving the status 
to either overpaid or closed fully paid or initiate a loan status change of 
"LOAN REPAYMENT OR WAIVER" event, which is weird here and if all of them says 
no status change, then we call status change for "LOAN CHARGEBACK" event.... i 
find it confusing...



-- 
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]

Reply via email to