Repository: fineract
Updated Branches:
  refs/heads/develop d857d8b47 -> fcb5ba30c


FINERACT-494 Issue when selecting savings account on client creation page


Project: http://git-wip-us.apache.org/repos/asf/fineract/repo
Commit: http://git-wip-us.apache.org/repos/asf/fineract/commit/61e6214f
Tree: http://git-wip-us.apache.org/repos/asf/fineract/tree/61e6214f
Diff: http://git-wip-us.apache.org/repos/asf/fineract/diff/61e6214f

Branch: refs/heads/develop
Commit: 61e6214fa671e9cbb1cd9a176daf35f585c07aba
Parents: df16dc3
Author: Nazeer Hussain Shaik <[email protected]>
Authored: Wed Sep 13 19:49:45 2017 +0530
Committer: Nazeer Hussain Shaik <[email protected]>
Committed: Wed Sep 13 19:49:45 2017 +0530

----------------------------------------------------------------------
 .../SavingsProductReadPlatformServiceImpl.java       | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/fineract/blob/61e6214f/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsProductReadPlatformServiceImpl.java
----------------------------------------------------------------------
diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsProductReadPlatformServiceImpl.java
 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsProductReadPlatformServiceImpl.java
index 4758b01..fec8a21 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsProductReadPlatformServiceImpl.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsProductReadPlatformServiceImpl.java
@@ -262,14 +262,19 @@ public class SavingsProductReadPlatformServiceImpl 
implements SavingsProductRead
 
         if (isOverdraftType != null) {
             if (inClauseAdded) {
-                sql += " and sp.allow_overdraft=?";
+                sql += " and sp.allow_overdraft=? and sp.deposit_type_enum = 
?";
             } else {
-                sql += " where sp.allow_overdraft=?";
+                sql += " where sp.allow_overdraft=? and sp.deposit_type_enum = 
?";
             }
-            return this.jdbcTemplate.query(sql, 
this.savingsProductLookupsRowMapper, isOverdraftType);
+            return this.jdbcTemplate.query(sql, 
this.savingsProductLookupsRowMapper, new Object[] {isOverdraftType, 
DepositAccountType.SAVINGS_DEPOSIT.getValue() });
         }
-
-        return this.jdbcTemplate.query(sql, 
this.savingsProductLookupsRowMapper);
+        
+        if(inClauseAdded) {
+               sql += " and sp.deposit_type_enum = ?";
+        }else {
+                sql += " where sp.deposit_type_enum = ?";
+        }
+        return this.jdbcTemplate.query(sql, 
this.savingsProductLookupsRowMapper, new Object[] { 
DepositAccountType.SAVINGS_DEPOSIT.getValue() });
 
     }
 

Reply via email to