From d1eaef6f6df8dc0607ec8551a40a573adeb80132 Mon Sep 17 00:00:00 2001 From: fermin831 Date: Tue, 3 Jul 2018 13:22:23 +0200 Subject: [PATCH] Fixed filter count in agent detail. --- pandora_console/include/functions_agents.php | 2 +- pandora_console/include/functions_api.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index e084c16381..4a4d113b08 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -2688,7 +2688,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 ce31336723..fb820f2c2b 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -9335,7 +9335,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);