mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-09 11:08:34 +01:00
Fix for php8
This commit is contained in:
@@ -4877,7 +4877,7 @@ function price2num($amount, $rounding = '', $option = 0)
|
||||
elseif ($rounding == 'CR') $nbofdectoround = 8;
|
||||
elseif (is_numeric($rounding)) $nbofdectoround = $rounding;
|
||||
//print "RR".$amount.' - '.$nbofdectoround.'<br>';
|
||||
if (dol_strlen($nbofdectoround)) $amount = round($amount, $nbofdectoround); // $nbofdectoround can be 0.
|
||||
if (dol_strlen($nbofdectoround)) $amount = round(is_string($amount) ? (float) $amount : $amount, $nbofdectoround); // $nbofdectoround can be 0.
|
||||
else return 'ErrorBadParameterProvidedToFunction';
|
||||
//print 'SS'.$amount.' - '.$nbofdec.' - '.$dec.' - '.$thousand.' - '.$nbofdectoround.'<br>';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user