diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 90a2b1b3698..b50785e4fb9 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -607,6 +607,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m if ($maskraz > 0) // A reset is required { + if ($maskraz == 99) $maskraz = date('m'); if ($maskraz > 12) return 'ErrorBadMaskBadRazMonth'; // Define posy, posm and reg