2
0
forked from Wavyzz/dolibarr

Fix rounding

This commit is contained in:
Laurent Destailleur
2023-01-20 19:34:26 +01:00
parent 4ffda61432
commit f7302232df

View File

@@ -5743,9 +5743,9 @@ function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $
// If force rounding // If force rounding
if ((string) $forcerounding != '-1') { if ((string) $forcerounding != '-1') {
if ($forcerounding == 'MU') { if ($forcerounding === 'MU') {
$nbdecimal = $conf->global->MAIN_MAX_DECIMALS_UNIT; $nbdecimal = $conf->global->MAIN_MAX_DECIMALS_UNIT;
} elseif ($forcerounding == 'MT') { } elseif ($forcerounding === 'MT') {
$nbdecimal = $conf->global->MAIN_MAX_DECIMALS_TOT; $nbdecimal = $conf->global->MAIN_MAX_DECIMALS_TOT;
} elseif ($forcerounding >= 0) { } elseif ($forcerounding >= 0) {
$nbdecimal = $forcerounding; $nbdecimal = $forcerounding;