diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index e746708d277..333b601cb34 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -2679,7 +2679,7 @@ function price2num($amount,$rounding='',$alreadysqlnb=0)
if ($rounding == 'MU') $nbofdectoround=$conf->global->MAIN_MAX_DECIMALS_UNIT;
elseif ($rounding == 'MT') $nbofdectoround=$conf->global->MAIN_MAX_DECIMALS_TOT;
elseif ($rounding == 'MS') $nbofdectoround=$conf->global->MAIN_MAX_DECIMALS_SHOWN;
- elseif ($rounding == '2') $nbofdectoround=2; // For admin info page
+ elseif (is_numeric($rounding)) $nbofdectoround=$rounding; // For admin info page
//print "RR".$amount.' - '.$nbofdectoround.'
';
if (dol_strlen($nbofdectoround)) $amount = round($amount,$nbofdectoround); // $nbofdectoround can be 0.
else return 'ErrorBadParameterProvidedToFunction';
diff --git a/htdocs/holiday/admin/holiday.php b/htdocs/holiday/admin/holiday.php
index 99e6f7fa4af..4c2844af408 100644
--- a/htdocs/holiday/admin/holiday.php
+++ b/htdocs/holiday/admin/holiday.php
@@ -72,7 +72,7 @@ if ($action == "add")
}
// Option du nombre de jours à ajouter chaque mois
- $nbHolidayEveryMonth = price2num($_POST['nbHolidayEveryMonth'],2);
+ $nbHolidayEveryMonth = price2num($_POST['nbHolidayEveryMonth'],5);
if(!$cp->updateConfCP('nbHolidayEveryMonth',$nbHolidayEveryMonth))
{
@@ -80,28 +80,28 @@ if ($action == "add")
}
// Option du nombre de jours pour un mariage
- $OptMariageCP = price2num($_POST['OptMariage'],2);
+ $OptMariageCP = price2num($_POST['OptMariage'],5);
if(!$cp->updateConfCP('OptMariage',$OptMariageCP)) {
$error = true;
}
// Option du nombre de jours pour un décés d'un proche
- $OptDecesProcheCP = price2num($_POST['OptDecesProche'],2);
+ $OptDecesProcheCP = price2num($_POST['OptDecesProche'],5);
if(!$cp->updateConfCP('OptDecesProche',$OptDecesProcheCP)) {
$error = true;
}
// Option du nombre de jours pour un mariage d'un enfant
- $OptMariageProcheCP = price2num($_POST['OptMariageProche'],2);
+ $OptMariageProcheCP = price2num($_POST['OptMariageProche'],5);
if(!$cp->updateConfCP('OptMariageProche',$OptMariageProcheCP)) {
$error = true;
}
// Option du nombre de jours pour un décés d'un parent
- $OptDecesParentsCP = price2num($_POST['OptDecesParents'],2);
+ $OptDecesParentsCP = price2num($_POST['OptDecesParents'],5);
if(!$cp->updateConfCP('OptDecesParents',$OptDecesParentsCP)) {
$error = true;
@@ -307,7 +307,7 @@ print ''."\n";
$var=!$var;
print '