Changed condition for general reports with last value checked

This commit is contained in:
Tatiana Llorente 2019-11-04 12:00:12 +01:00
parent cf3bcefddf
commit 28e2702a48
1 changed files with 6 additions and 1 deletions

View File

@ -224,7 +224,12 @@ function reporting_make_reporting_data(
// General reports with 0 period means last value
// Avoid to overwrite it by template value.
if (!empty($period) && ($content['type'] !== 'general' && $content['period'] != 0)) {
$general_last_value = false;
if ($content['type'] === 'general' && $content['period'] == 0) {
$general_last_value = true;
}
if (!empty($period) && $general_last_value === false) {
$content['period'] = $period;
}