Merge branch 'ent-7895-12309-Fallo-visualizacion-item-Incremental-en-informes' into 'develop'

fix data representation

See merge request artica/pandorafms!4491
This commit is contained in:
Daniel Rodriguez 2021-11-15 10:37:40 +00:00
commit c8a808936a
1 changed files with 2 additions and 2 deletions

View File

@ -8700,8 +8700,8 @@ function reporting_increment($report, $content)
$return['data']['message'] = __('The monitor have no data in this range of dates or monitor type is not numeric');
$return['data']['error'] = true;
} else if (is_numeric($old_data) && is_numeric($last_data)) {
$return['data']['old'] = $old_data;
$return['data']['now'] = $last_data;
$return['data']['old'] = round(floatval($old_data), $config['graph_precision']);
$return['data']['now'] = round(floatval($last_data), $config['graph_precision']);
$increment = ($old_data - $last_data);
if ($increment < 0) {