|
@@ -13,4 +13,5 @@ from sa_agent_hr t1
|
|
|
inner join sys_users t2 on t1.userid = t2.userid and t2.status!='DELETED'
|
|
|
inner join sys_usersite t3 ON t3.userid = t2.userid and t3.siteid=t1.siteid
|
|
|
LEFT JOIN sys_usertrialperiod t4 ON t4.userid=t1.userid and t4.siteid=t1.siteid
|
|
|
-where t1.siteid=$siteid$ and t1.sys_enterpriseid=$sys_enterpriseid$ and $where$
|
|
|
+ inner join sa_agents t5 ON t5.sa_agentsid = t1.sa_agentsid and t5.siteid=t1.siteid
|
|
|
+where t1.siteid=$siteid$ and t5.sys_enterpriseid=$sys_enterpriseid$ and $where$
|