From 5992ebcdbc1cd1696094895a1f0a4182bb6ab0d6 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Wed, 6 Feb 2013 11:52:49 +0100 Subject: [PATCH] New : option to reset numbering to 0 every month using @99 in the mask --- htdocs/core/lib/functions2.lib.php | 1 + 1 file changed, 1 insertion(+) 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