diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 1fce23c3b4..65e27936cd 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -2691,7 +2691,7 @@ function agents_get_all_groups_agent ($id_agent, $group = false) { */ function agents_count_agents_filter ($filter = array(), $access = "AR") { $total_agents = agents_get_agents( - array ('id_group' => $id_group), + $filter, array ('COUNT(DISTINCT id_agente) as total'), $access ); diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index e339d2f40b..40aee4353f 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -9341,7 +9341,7 @@ function api_get_total_agents($id_group, $trash1, $trash2, $returnType) { return; } - $total_agents = agents_count_agents_filter(array ('id_group' => $id_group)); + $total_agents = agents_count_agents_filter(array ('id_grupo' => $id_group)); $data = array('type' => 'string', 'data' => $total_agents); returnData($returnType, $data);