Reports, Prediction date: Change position of inputs in create items. And change code of creation data. Gitlab: #414

This commit is contained in:
m-lopez-f 2017-03-06 10:06:51 +01:00
parent ed287b7cdb
commit 10078287c7
2 changed files with 7 additions and 7 deletions

View File

@ -776,10 +776,10 @@ You can of course remove the warnings, that's why we include the source and do n
<td style="font-weight:bold;"><?php echo __('Data range') . ui_print_help_icon('prediction_date', true); ?></td>
<td>
<?php
echo __('Max') . "&nbsp;";
html_print_input_text('max_interval', $max_interval, '', 5, 10);
echo "&nbsp;" . __('Min') . "&nbsp;";
echo __('Min') . "&nbsp;";
html_print_input_text('min_interval', $min_interval, '', 5, 10);
echo "&nbsp;" . __('Max') . "&nbsp;";
html_print_input_text('max_interval', $max_interval, '', 5, 10);
?>
</td>
</tr>

View File

@ -3387,11 +3387,11 @@ function reporting_prediction_date($report, $content) {
$return['agent_name'] = $agent_name;
$return['module_name'] = $module_name;
set_time_limit(500);
$intervals_text = explode(';', $content['text']);
$intervals_text = $content['text'];
$max_interval = substr($intervals_text, 0, strpos($intervals_text, ';'));
$min_interval = substr($intervals_text, strpos($intervals_text, ';') + 1);
$max_interval = $intervals_text[0];
$min_interval = $intervals_text[1];
$value = forecast_prediction_date ($content['id_agent_module'], $content['period'], $max_interval, $min_interval);
if ($value === false) {