Skip to content
Snippets Groups Projects
Commit 57f8f304 authored by Florian Henry's avatar Florian Henry
Browse files

Correction Reset Mask (before do not work with FA{yy}{mm}-{0000@99} with

date 2014-01-01)
parent 8642e202
No related branches found
No related tags found
No related merge requests found
......@@ -612,13 +612,13 @@ 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');
$maskraz = date('m',$date);
$resetEveryMonth = true;
}
if ($maskraz > 12) return 'ErrorBadMaskBadRazMonth';
// Define posy, posm and reg
if ($maskraz > 1)
if ($maskraz >= 1)
{
if (! preg_match('/^(.*)\{(y+)\}\{(m+)\}/i',$maskwithonlyymcode)
&& ! preg_match('/^(.*)\{(m+)\}\{(y+)\}/i',$maskwithonlyymcode)) return 'ErrorCantUseRazInStartedYearIfNoYearMonthInMask';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment