forked from Wavyzz/dolibarr
Merge pull request #15989 from zuiko/patch-3
Fix #15820 Bug: Unable to edit the pricing in Sales Order
This commit is contained in:
@@ -4863,7 +4863,7 @@ function price2num($amount, $rounding = '', $option = 0)
|
|||||||
if ($option != 1) { // If not a PHP number or unknown, we change or clean format
|
if ($option != 1) { // If not a PHP number or unknown, we change or clean format
|
||||||
//print 'PP'.$amount.' - '.$dec.' - '.$thousand.' - '.intval($amount).'<br>';
|
//print 'PP'.$amount.' - '.$dec.' - '.$thousand.' - '.intval($amount).'<br>';
|
||||||
if (!is_numeric($amount)) {
|
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
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user