From cf05f38e5417f4cd7989db995a329229901c647e Mon Sep 17 00:00:00 2001 From: Frans Bosman Date: Mon, 13 Dec 2021 19:56:06 +0100 Subject: [PATCH] Update functions.lib.php Change exists to isset in price2num --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 01e8acf4896..0084a4a33c8 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -4784,7 +4784,7 @@ function price2num($amount, $rounding = '', $option = 0) $nbofdectoround = ''; if ($rounding == 'MU') $nbofdectoround = $conf->global->MAIN_MAX_DECIMALS_UNIT; elseif ($rounding == 'MT') $nbofdectoround = $conf->global->MAIN_MAX_DECIMALS_TOT; - elseif ($rounding == 'MS') $nbofdectoround = empty($conf->global->MAIN_MAX_DECIMALS_STOCK) ? 5 : $conf->global->MAIN_MAX_DECIMALS_STOCK; + elseif ($rounding == 'MS') $nbofdectoround = !isset($conf->global->MAIN_MAX_DECIMALS_STOCK) ? 5 : $conf->global->MAIN_MAX_DECIMALS_STOCK; elseif ($rounding == 'CR') $nbofdectoround = 8; elseif (is_numeric($rounding)) $nbofdectoround = $rounding; //print "RR".$amount.' - '.$nbofdectoround.'
';