mariiaKraievska commented on code in PR #5584:
URL: https://github.com/apache/fineract/pull/5584#discussion_r2939872259


##########
fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloanproduct/repository/WorkingCapitalLoanProductRepository.java:
##########
@@ -67,10 +69,4 @@ public interface WorkingCapitalLoanProductRepository
 
     @Query("select wclp FROM WorkingCapitalLoanProduct wclp where 
wclp.closeDate is null or wclp.closeDate >= :businessDate")
     List<WorkingCapitalLoanProduct> 
fetchActiveWorkingCapitalLoanProducts(LocalDate businessDate);
-
-    // TODO: Check if product is used in any loans (for deletion validation)
-    // This will be implemented when Working Capital Loan entity is created
-    // @Query("SELECT CASE WHEN COUNT(l)>0 THEN TRUE ELSE FALSE END FROM 
WorkingCapitalLoan l WHERE l.wcpProduct.id =
-    // :productId")
-    // boolean isProductInUse(@Param("productId") Long productId);

Review Comment:
   no, we don’t need this anymore.
   The commented–out isProductInUse query was placeholder from the time when 
the WC loan entity didn’t exist yet. Now that the entity and the actual usage 
checks are in place, I’ve removed the commented code.



##########
fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloanproduct/service/WorkingCapitalLoanProductWritePlatformServiceImpl.java:
##########
@@ -145,10 +148,9 @@ public CommandProcessingResult 
deleteWorkingCapitalLoanProduct(final Long produc
         final WorkingCapitalLoanProduct product = 
this.repository.findById(productId)
                 .orElseThrow(() -> new 
WorkingCapitalLoanProductNotFoundException(productId));
 
-        // TODO: Check if product is used in any loans (when Working Capital 
Loan entity is created)

Review Comment:
   Same here



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