Merge branch 'ent-3666-fallo-rendimiento-informes-sla-disponibilidad-carrefour' into 'develop'

removed old useless code

See merge request artica/pandorafms!2241

Former-commit-id: 53aecf83239855335278d2b7068fd32dfe856c96
This commit is contained in:
Daniel Rodriguez 2019-03-27 11:52:55 +01:00
commit eacdf6ffc9
1 changed files with 2 additions and 11 deletions

View File

@ -549,10 +549,6 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0)
foreach ($item['data'] as $sla) {
if (isset($sla)) {
$the_first_men_time = get_agent_first_time(
io_safe_output($sla['agent'])
);
// First_table.
$row = [];
$row[] = $sla['agent'];
@ -2964,10 +2960,6 @@ function reporting_html_availability($table, $item, $pdf=0)
$table2->style[5] = 'text-align: right';
foreach ($item['data'] as $row) {
$the_first_men_time = get_agent_first_time(
io_safe_output($row['agent'])
);
$table_row = [];
$table_row[] = $row['agent'];
$table_row[] = $row['availability_item'];
@ -3276,9 +3268,8 @@ function get_agent_first_time($agent_name)
$id = agents_get_agent_id($agent_name, true);
$utimestamp = db_get_all_rows_sql(
'SELECT utimestamp FROM tagente_datos WHERE id_agente_modulo IN
(SELECT id_agente_modulo FROM tagente_modulo WHERE id_agente = '.$id.')
ORDER BY utimestamp ASC LIMIT 1'
'SELECT min(utimestamp) FROM tagente_datos WHERE id_agente_modulo IN
(SELECT id_agente_modulo FROM tagente_modulo WHERE id_agente = '.$id.')'
);
$utimestamp = $utimestamp[0]['utimestamp'];