From 293bb5c2fecfa3ed71ab3fa77bcf73ee26d6d6ea Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Mon, 26 Feb 2024 15:08:08 +0100 Subject: [PATCH 1/2] #12943 fixed inventory filter --- pandora_console/include/functions_inventory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_inventory.php b/pandora_console/include/functions_inventory.php index 3fd8c3f198..a9d3bb910c 100644 --- a/pandora_console/include/functions_inventory.php +++ b/pandora_console/include/functions_inventory.php @@ -982,7 +982,7 @@ function get_data_basic_info_sql($params, $count=false) $groupby = ''; if ($count !== true) { - $fields = '*'; + $fields = 'tagente.*, tagent_secondary_group.*, tagent_custom_data.*'; $innerjoin = 'LEFT JOIN tagente_estado ON '.$table.'.id_agente = tagente_estado.id_agente '; $innerjoin .= 'LEFT JOIN tagent_secondary_group ON '.$table.'.id_agente = tagent_secondary_group.id_agent '; $innerjoin .= 'LEFT JOIN tagent_custom_data ON '.$table.'.id_agente = tagent_custom_data.id_agent '; From 70818c40b13c57c4bc897b33854d20d8763b6542 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Wed, 28 Feb 2024 14:22:57 +0100 Subject: [PATCH 2/2] #12943 fixed metaconsole inventory --- pandora_console/include/functions_inventory.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_inventory.php b/pandora_console/include/functions_inventory.php index a9d3bb910c..5f9e3bd62d 100644 --- a/pandora_console/include/functions_inventory.php +++ b/pandora_console/include/functions_inventory.php @@ -982,7 +982,12 @@ function get_data_basic_info_sql($params, $count=false) $groupby = ''; if ($count !== true) { - $fields = 'tagente.*, tagent_secondary_group.*, tagent_custom_data.*'; + if (is_metaconsole() === true) { + $fields = 'tmetaconsole_agent.*, tagent_secondary_group.*, tagent_custom_data.*'; + } else { + $fields = 'tagente.*, tagent_secondary_group.*, tagent_custom_data.*'; + } + $innerjoin = 'LEFT JOIN tagente_estado ON '.$table.'.id_agente = tagente_estado.id_agente '; $innerjoin .= 'LEFT JOIN tagent_secondary_group ON '.$table.'.id_agente = tagent_secondary_group.id_agent '; $innerjoin .= 'LEFT JOIN tagent_custom_data ON '.$table.'.id_agente = tagent_custom_data.id_agent ';