diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 659ff4d3c5a32b248ee410a84d96a999fdea24e7..2929b66e80cfbaf7278b6dee1abbc813463123d5 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2054,7 +2054,7 @@ abstract class CommonObject $forcedroundingmode=$roundingadjust; if ($forcedroundingmode == 'auto' && isset($conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND)) $forcedroundingmode=$conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND; - if ($forcedroundingmode == 'auto') $forcedroundingmode='0'; + elseif ($forcedroundingmode == 'auto') $forcedroundingmode='0'; $error=0; diff --git a/htdocs/resource/class/resource.class.php b/htdocs/resource/class/resource.class.php index e6c01eb09f40a0854ac9fcfaf7f3acd7caf95031..c323ad17e69e25daee34f6e9c2286d738338674b 100644 --- a/htdocs/resource/class/resource.class.php +++ b/htdocs/resource/class/resource.class.php @@ -624,10 +624,11 @@ class Resource extends CommonObject * Load properties id_previous and id_next * * @param string $filter Optional filter - * @param int $fieldid Name of field to use for the select MAX and MIN + * @param int $fieldid Name of field to use for the select MAX and MIN + * @param int $nodbprefix Do not include DB prefix to forge table name * @return int <0 if KO, >0 if OK */ - function load_previous_next_ref($filter,$fieldid) + function load_previous_next_ref($filter, $fieldid, $nodbprefix =0) { global $conf, $user;