*** include/func.inc.php.old    Mon Jun 17 17:03:08 2013
--- include/func.inc.php        Mon Jun 17 17:02:05 2013
***************
*** 510,529 ****
--- 510,541 ----
        // special processing of uptime
        if ($units == 'uptime') {
                return convertUnitsUptime($value);
        }
  
        // special processing for seconds
        if ($units == 's') {
                return convertUnitsS($value);
        }
  
+       // Do not convert values if unit starts with '!'
+       // If the unit starts with '![num]', num is the number of points after the decimal to print
+       if (strpos($units, '!', 0) === 0) {
+               if (preg_match("/^\[(\d+)\](.*)/", substr($units, 1), $matches)) {
+                       $precision = $matches[1];
+                       return sprintf("%.".$precision."f", $value) . ' ' . $matches[2];
+               }
+               else {
+                       return $value . ' ' . substr($units, 1);
+               }
+       }
+ 
        // any other unit
        // black list wich do not require units metrics..
        $blackList = array('%', 'ms', 'rpm', 'RPM');
  
        if (in_array($units, $blackList) || (zbx_empty($units) && ($convert == ITEM_CONVERT_WITH_UNITS || $value < 1))) {
                if (abs($value) >= ZBX_UNITS_ROUNDOFF_THRESHOLD) {
                        $value = round($value, ZBX_UNITS_ROUNDOFF_UPPER_LIMIT);
                }
                $value = sprintf('%.'.ZBX_UNITS_ROUNDOFF_LOWER_LIMIT.'f', $value);
                $value = preg_replace('/^([\-0-9]+)(\.)([0-9]*)[0]+$/U', '$1$2$3', $value);