From af83d8836ab5737d659f0c1b9f27ef185693b30b Mon Sep 17 00:00:00 2001 From: fbosman Date: Fri, 28 Jun 2019 07:06:19 +0200 Subject: [PATCH 1/4] Update actions_extrafields.inc.php --- htdocs/core/actions_extrafields.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/actions_extrafields.inc.php b/htdocs/core/actions_extrafields.inc.php index b5eb5257ecc..253ce1f9264 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'); From f44203775af0f1d2519cb67f8c0b94fc5673313c Mon Sep 17 00:00:00 2001 From: fbosman Date: Fri, 28 Jun 2019 07:10:28 +0200 Subject: [PATCH 2/4] Update extrafields.class.php --- htdocs/core/class/extrafields.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index fae30c05e73..c1c87a876a8 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') From 511be75fca7f6e312a31e5168ae833aab180b605 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 28 Jun 2019 12:55:19 +0200 Subject: [PATCH 3/4] Update actions_extrafields.inc.php --- htdocs/core/actions_extrafields.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/actions_extrafields.inc.php b/htdocs/core/actions_extrafields.inc.php index 253ce1f9264..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','intcomma'); +$extrasize=GETPOST('size', 'intcomma'); $type=GETPOST('type', 'alpha'); $param=GETPOST('param', 'alpha'); From ff7ae5ef2060d42a86eb6274dcf9cccc8f62c715 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 28 Jun 2019 12:56:31 +0200 Subject: [PATCH 4/4] Update extrafields.class.php --- htdocs/core/class/extrafields.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index c1c87a876a8..b8f5c0480b5 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1645,8 +1645,8 @@ class ExtraFields elseif ($type == 'double') { if (!empty($value)) { - // $value=price($value); - $sizeparts = explode(",",$size); + //$value=price($value); + $sizeparts = explode(",", $size); $number_decimals = $sizeparts[1]; $value=price($value, 0, $langs, 0, 0, $number_decimals, ''); }