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

View File

@ -2394,6 +2394,13 @@ function reporting_agents_inventory($report, $content)
}
if (array_search('estado', $es_agents_inventory_display_options) !== false) {
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 {
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 {
@ -2402,6 +2409,7 @@ function reporting_agents_inventory($report, $content)
}
}
}
}
foreach ($agents as $key => $value) {
foreach ($value as $agent_val_key => $agent_val) {