Fix regression

This commit is contained in:
ldestailleur
2025-04-09 12:08:52 +02:00
parent 380fd37430
commit 74eccf279d

View File

@@ -7124,13 +7124,13 @@ function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $
}
// If force rounding
if ((string) $forcerounding != '-1') {
if ((string) $forcerounding != '-1' && (string) $forcerounding != '') {
if ($forcerounding === 'MU') {
$nbdecimal = getDolGlobalInt('MAIN_MAX_DECIMALS_UNIT');
} elseif ($forcerounding === 'MT') {
$nbdecimal = getDolGlobalInt('MAIN_MAX_DECIMALS_TOT');
} elseif ($forcerounding >= 0) {
$nbdecimal = $forcerounding;
$nbdecimal = (int) $forcerounding;
}
}