Skip to content

Commit

Permalink
Merge pull request #11420 from fbosman/develop
Browse files Browse the repository at this point in the history
Fix #11331 Bug: extrafields type double wrong length
  • Loading branch information
eldy committed Jun 28, 2019
2 parents 039aafc + ff7ae5e commit a65d3d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion htdocs/core/actions_extrafields.inc.php
Expand Up @@ -27,7 +27,7 @@
$maxsizeint=10;
$mesg=array();

$extrasize=GETPOST('size', 'int');
$extrasize=GETPOST('size', 'intcomma');
$type=GETPOST('type', 'alpha');
$param=GETPOST('param', 'alpha');

Expand Down
5 changes: 4 additions & 1 deletion htdocs/core/class/extrafields.class.php
Expand Up @@ -1645,7 +1645,10 @@ public function showOutputField($key, $value, $moreparam = '', $extrafieldsobjec
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')
Expand Down

0 comments on commit a65d3d0

Please sign in to comment.