2
0
forked from Wavyzz/dolibarr

Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/filefunc.inc.php
	htdocs/opensurvey/class/opensurveysondage.class.php
	htdocs/product/class/product.class.php
	htdocs/supplier_proposal/card.php
This commit is contained in:
Laurent Destailleur
2020-12-04 19:24:29 +01:00
9 changed files with 45 additions and 30 deletions

View File

@@ -4804,7 +4804,7 @@ function price2num($amount, $rounding = '', $option = 0)
if ($option != 1) { // If not a PHP number or unknown, we change or clean format
//print 'PP'.$amount.' - '.$dec.' - '.$thousand.' - '.intval($amount).'<br>';
if (!is_numeric($amount)) {
$amount = preg_replace('/[a-zA-Z\/\\\*\(\)\<\>\-]/', '', $amount);
$amount = preg_replace('/[a-zA-Z\/\\\*\(\)\<\>]/', '', $amount);
}
if ($option == 2 && $thousand == '.' && preg_match('/\.(\d\d\d)$/', (string) $amount)) { // It means the . is used as a thousand separator and string come frominput data, so 1.123 is 1123