minor fixes in report item

This commit is contained in:
alejandro.campos@artica.es 2021-06-03 13:49:10 +02:00
parent b8c6922902
commit fb5ecaeef4
1 changed files with 12 additions and 4 deletions

View File

@ -2394,11 +2394,19 @@ function reporting_agents_inventory($report, $content)
}
if (array_search('estado', $es_agents_inventory_display_options) !== false) {
if (in_array('-1', $es_agent_status_filter) === true || in_array(agents_get_status($value['id_agente']), $es_agent_status_filter)) {
$agents[$key]['estado'] = agents_get_status($value['id_agente']);
if (in_array(6, $es_agent_status_filter)) {
if (agents_get_status($value['id_agente']) === 0) {
unset($agents[$key]);
} else {
$agents[$key]['estado'] = agents_get_status($value['id_agente']);
}
} else {
// Agent does not match status filter.
unset($agents[$key]);
if (in_array('-1', $es_agent_status_filter) === true || in_array(agents_get_status($value['id_agente']), $es_agent_status_filter)) {
$agents[$key]['estado'] = agents_get_status($value['id_agente']);
} else {
// Agent does not match status filter.
unset($agents[$key]);
}
}
}
}