From 74eccf279d3e67c0a01228782b09f3fbff7c9ef2 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Wed, 9 Apr 2025 12:08:52 +0200 Subject: [PATCH] Fix regression --- htdocs/core/lib/functions.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index ffd0042bd83..6507b514288 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -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; } }