Merge pull request #918 from Nayan/MIFOSX-1228

#MIFOSX-1228 Templates should not show inactive staff under staff drop down
This commit is contained in:
Vishwas Babu A J
2014-05-28 11:47:05 +05:30
@@ -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 });
}