adamsaghy commented on code in PR #3312:
URL: https://github.com/apache/fineract/pull/3312#discussion_r1266622506
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/DefaultLoanLifecycleStateMachine.java:
##########
@@ -42,6 +42,10 @@ public LoanStatus dryTransition(final LoanEvent loanEvent,
final Loan loan) {
public void transition(final LoanEvent loanEvent, final Loan loan) {
LoanStatus newStatus = getNextStatus(loanEvent, loan);
if (newStatus != null) {
+ if (isNotLoanCreation(loanEvent) && (loan.isClosed() ||
LoanStatus.OVERPAID.equals(loan.getStatus()))
Review Comment:
Minor: Please either use the loan methods to decide on the statuses or use
the equality check everywhere, but do not mix them.
Example:
if (isNotLoanCreation(loanEvent) && (loan.isClosed() ||
**loan.isOverpaid())** && LoanStatus.ACTIVE.equals(newStatus))
--
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]