You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2020/05/28 16:16:45 UTC

[GitHub] [fineract] vishwasbabu commented on a change in pull request #924: FINERACT-609 TopUp

vishwasbabu commented on a change in pull request #924:
URL: https://github.com/apache/fineract/pull/924#discussion_r431960044



##########
File path: fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/service/AccountDetailsReadPlatformServiceJpaRepositoryImpl.java
##########
@@ -171,6 +172,12 @@ public AccountSummaryCollectionData retrieveGroupAccountDetails(final Long group
         return this.jdbcTemplate.query(sql, rm, new Object[]{groupId , glimAccount});
     }
 
+    @Override
+    public Collection<LoanAccountSummaryData> retrieveGroupActiveLoanAccountSummary(final Long groupId) {
+        final String loanWhereClause = " where l.group_id = ? and l.loan_status_id = 300 ";

Review comment:
       I would append a clause to the effect of "l.client_id is NULL", this ensures that only group loans are fetched by the query all JLG loans are ignored (loans which are associated with clients and groups and fetched as a part of the retrieveClientActiveLoanAccountSummary method)

##########
File path: fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java
##########
@@ -1428,15 +1428,15 @@ public LoanAccountData retrieveLoanProductDetailsTemplate(final Long productId,
             }
         }
 
-        Collection<LoanAccountSummaryData> clientActiveLoanOptions = null;
-        if(loanProduct.canUseForTopup() && clientId != null){
-            clientActiveLoanOptions = this.accountDetailsReadPlatformService.retrieveClientActiveLoanAccountSummary(clientId);

Review comment:
       We shouldn't be removing the existing condition which checks for client loans, rather we should be adding an else if for additionally checking for group loans




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org