Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into

develop
This commit is contained in:
Laurent Destailleur
2024-10-07 15:23:41 +02:00
6 changed files with 35 additions and 23 deletions

View File

@@ -6732,10 +6732,11 @@ function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $
if (dol_strlen($decpart) > $nbdecimal) {
$nbdecimal = dol_strlen($decpart);
}
// Si on depasse max
$max_nbdecimal = (int) str_replace('...', '', getDolGlobalString('MAIN_MAX_DECIMALS_SHOWN'));
if ($trunc && $nbdecimal > $max_nbdecimal) {
$nbdecimal = $max_nbdecimal;
// If nbdecimal is higher than max to show
$nbdecimalmaxshown = (int) str_replace('...', '', getDolGlobalString('MAIN_MAX_DECIMALS_SHOWN'));
if ($trunc && $nbdecimal > $nbdecimalmaxshown) {
$nbdecimal = $nbdecimalmaxshown;
if (preg_match('/\.\.\./i', getDolGlobalString('MAIN_MAX_DECIMALS_SHOWN'))) {
// If output is truncated, we show ...
$end = '...';