Merge branch 'ent-4896-General-Report-en-Plantillas-no-tiene-bien-la-hora' into 'develop'

Ent 4896 general report en plantillas no tiene bien la hora

See merge request artica/pandorafms!2855
This commit is contained in:
Daniel Rodriguez 2019-11-05 13:33:27 +01:00
commit 98d36cfc6d
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 // General reports with 0 period means last value
// Avoid to overwrite it by template 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; $content['period'] = $period;
} }