forked from Wavyzz/dolibarr
Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0
This commit is contained in:
@@ -6602,11 +6602,11 @@ function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $
|
||||
$nbdecimal = dol_strlen($decpart);
|
||||
}
|
||||
// Si on depasse max
|
||||
$max_nbdecimal = getDolGlobalString('MAIN_MAX_DECIMALS_SHOWN');
|
||||
if ($trunc && $nbdecimal > (int) $max_nbdecimal) {
|
||||
$max_nbdecimal = (int) str_replace('...', '', getDolGlobalString('MAIN_MAX_DECIMALS_SHOWN'));
|
||||
if ($trunc && $nbdecimal > $max_nbdecimal) {
|
||||
$nbdecimal = $max_nbdecimal;
|
||||
if (preg_match('/\.\.\./i', $nbdecimal)) {
|
||||
// Si un affichage est tronque, on montre des ...
|
||||
if (preg_match('/\.\.\./i', getDolGlobalString('MAIN_MAX_DECIMALS_SHOWN'))) {
|
||||
// If output is truncated, we show ...
|
||||
$end = '...';
|
||||
}
|
||||
}
|
||||
@@ -6614,9 +6614,9 @@ function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $
|
||||
// If force rounding
|
||||
if ((string) $forcerounding != '-1') {
|
||||
if ($forcerounding === 'MU') {
|
||||
$nbdecimal = getDolGlobalString('MAIN_MAX_DECIMALS_UNIT');
|
||||
$nbdecimal = getDolGlobalInt('MAIN_MAX_DECIMALS_UNIT');
|
||||
} elseif ($forcerounding === 'MT') {
|
||||
$nbdecimal = getDolGlobalString('MAIN_MAX_DECIMALS_TOT');
|
||||
$nbdecimal = getDolGlobalInt('MAIN_MAX_DECIMALS_TOT');
|
||||
} elseif ($forcerounding >= 0) {
|
||||
$nbdecimal = $forcerounding;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user