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


##########
fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepository.java:
##########
@@ -68,43 +70,43 @@ public interface LoanRepository extends JpaRepository<Loan, 
Long>, JpaSpecificat
     String FIND_ACTIVE_LOANS_PRODUCT_IDS_BY_GROUP = "Select 
loan.loanProduct.id from Loan loan where "
             + "loan.group.id = :groupId and loan.loanStatus = :loanStatus and 
loan.client.id is NULL group by loan.loanProduct.id";
 
-    String DOES_CLIENT_HAVE_NON_CLOSED_LOANS = "select case when (count (loan) 
> 0) then 'true' else 'false' end from Loan loan where loan.client.id = 
:clientId and loan.loanStatus in (100,200,300,303,304,700)";

Review Comment:
   If you pass the statuses as parameters, you might wanna rename the methods 
to reflect the "new" behaviour. Example: no need the "closed / non-closed" as 
manually any status can be provided.



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