Merge pull request #11420 from fbosman/develop

Fix #11331 Bug: extrafields type double wrong length
This commit is contained in:
Laurent Destailleur 2019-06-28 12:56:46 +02:00 committed by GitHub
commit a65d3d039d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -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');

View File

@ -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')