fixed minor error in report #10

This commit is contained in:
daniel 2016-08-11 10:04:10 +02:00
parent 9f0bdc5315
commit 93b64ba43c

View File

@ -4065,6 +4065,7 @@ function reporting_general($report, $content) {
$mod_name = modules_get_agentmodule_name ($row['id_agent_module']);
$ag_name = modules_get_agentmodule_agent_name ($row['id_agent_module']);
$type_mod = modules_get_last_value($row['id_agent_module']);
$unit = db_get_value('unit', 'tagente_modulo',
'id_agente_modulo',
$row['id_agent_module']);
@ -4074,6 +4075,7 @@ function reporting_general($report, $content) {
modules_get_last_value($row['id_agent_module']);
}
else {
if(is_numeric($type_mod)){
switch ($row['operation']) {
case 'sum':
$data_res[$key] =
@ -4097,6 +4099,9 @@ function reporting_general($report, $content) {
$row['id_agent_module'], $content['period']);
break;
}
} else {
$data_res[$key] = $type_mod;
}
}
switch ($content['group_by_agent']) {
@ -4250,8 +4255,11 @@ function reporting_general($report, $content) {
if (!is_numeric($d)) {
$data['value'] = $d;
// to see the chains on the table
$data['formated_value'] = $d;
}
else {
$data['value'] = $d;
$data['formated_value'] = format_for_graph($d, 2) . " " .
$units[$i];