From bd8aa4e7ca906ed517eb859ddd233b45ec0489f3 Mon Sep 17 00:00:00 2001 From: goutham-M Date: Fri, 23 May 2014 17:39:52 +0530 Subject: [PATCH] Templates should not show inactive staff under staff drop down --- .../staff/service/StaffReadPlatformServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mifosng-provider/src/main/java/org/mifosplatform/organisation/staff/service/StaffReadPlatformServiceImpl.java b/mifosng-provider/src/main/java/org/mifosplatform/organisation/staff/service/StaffReadPlatformServiceImpl.java index f66cb34a5..5f2f7e79b 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/organisation/staff/service/StaffReadPlatformServiceImpl.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/organisation/staff/service/StaffReadPlatformServiceImpl.java @@ -74,7 +74,7 @@ public class StaffReadPlatformServiceImpl implements StaffReadPlatformService { sqlBuilder.append("s.mobile_no as mobileNo, s.is_active as isActive "); sqlBuilder.append("from m_office o "); sqlBuilder.append("join m_office ohierarchy on o.hierarchy like concat(ohierarchy.hierarchy, '%') "); - sqlBuilder.append("join m_staff s on s.office_id = ohierarchy.id "); + sqlBuilder.append("join m_staff s on s.office_id = ohierarchy.id and s.is_active=1 "); if (loanOfficersOnly) { sqlBuilder.append("and s.is_loan_officer is true "); @@ -140,7 +140,7 @@ public class StaffReadPlatformServiceImpl implements StaffReadPlatformService { final Long defaultOfficeId = defaultToUsersOfficeIfNull(officeId); - final String sql = "select " + this.lookupMapper.schema() + " where s.office_id = ?"; + final String sql = "select " + this.lookupMapper.schema() + " where s.office_id = ? and s.is_active=1 "; return this.jdbcTemplate.query(sql, this.lookupMapper, new Object[] { defaultOfficeId }); }