diff --git a/htdocs/core/actions_extrafields.inc.php b/htdocs/core/actions_extrafields.inc.php index b5eb5257ecc..0900c8c3ffe 100644 --- a/htdocs/core/actions_extrafields.inc.php +++ b/htdocs/core/actions_extrafields.inc.php @@ -27,7 +27,7 @@ $maxsizestring=255; $maxsizeint=10; $mesg=array(); -$extrasize=GETPOST('size', 'int'); +$extrasize=GETPOST('size', 'intcomma'); $type=GETPOST('type', 'alpha'); $param=GETPOST('param', 'alpha'); diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index fae30c05e73..b8f5c0480b5 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1645,7 +1645,10 @@ class ExtraFields elseif ($type == 'double') { if (!empty($value)) { - $value=price($value); + //$value=price($value); + $sizeparts = explode(",", $size); + $number_decimals = $sizeparts[1]; + $value=price($value, 0, $langs, 0, 0, $number_decimals, ''); } } elseif ($type == 'boolean')