forked from Wavyzz/dolibarr
Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -6710,11 +6710,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 = '...';
|
||||
}
|
||||
}
|
||||
@@ -6722,9 +6722,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;
|
||||
}
|
||||
@@ -11958,7 +11958,7 @@ function dol_mimetype($file, $default = 'application/octet-stream', $mode = 0)
|
||||
$mime = 'video';
|
||||
$imgmime = 'video.png';
|
||||
$famime = 'file-video';
|
||||
} elseif (preg_match('/\.(zip|rar|gz|tgz|z|cab|bz2|7z|tar|lzh|zst)$/i', $tmpfile)) { // Archive
|
||||
} elseif (preg_match('/\.(zip|rar|gz|tgz|xz|z|cab|bz2|7z|tar|lzh|zst)$/i', $tmpfile)) { // Archive
|
||||
// application/xxx where zzz is zip, ...
|
||||
$mime = 'archive';
|
||||
$imgmime = 'archive.png';
|
||||
|
||||
Reference in New Issue
Block a user