Merge branch 'ent-4580-8639-errores-al-generar-informes-dinamicos' into 'develop'

Fixed date limit in historical_data

See merge request artica/pandorafms!2695
This commit is contained in:
Daniel Rodriguez 2019-09-03 18:37:55 +02:00
commit 8493ec20eb
1 changed files with 3 additions and 3 deletions

View File

@ -3100,7 +3100,7 @@ function reporting_historical_data($report, $content)
$return['type'] = 'historical_data';
$period = $content['period'];
$date_limit = (time() - $period);
$date_limit = ($report['datetime'] - $period);
if (empty($content['name'])) {
$content['name'] = __('Historical data');
}
@ -3169,7 +3169,7 @@ function reporting_historical_data($report, $content)
FROM tagente_datos_string
WHERE id_agente_modulo ='.$content['id_agent_module'].'
AND utimestamp >'.$date_limit.'
AND utimestamp <='.time(),
AND utimestamp <='.$report['datetime'],
true
);
break;
@ -3180,7 +3180,7 @@ function reporting_historical_data($report, $content)
FROM tagente_datos
WHERE id_agente_modulo ='.$content['id_agent_module'].'
AND utimestamp >'.$date_limit.'
AND utimestamp <='.time(),
AND utimestamp <='.$report['datetime'],
true
);
break;