mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-24 02:11:27 +01:00
Fix reset Mask (befor do not work with FA{yy}{mm}-{0000@99} and date
2014-01-01)
This commit is contained in:
@@ -635,7 +635,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
|
||||
if ($maskraz > 12) return 'ErrorBadMaskBadRazMonth';
|
||||
|
||||
// Define posy, posm and reg
|
||||
if ($maskraz > 1) // if reset is not first month, we need month and year into mask
|
||||
if ($maskraz >= 1) // if reset is not first month, we need month and year into mask
|
||||
{
|
||||
if (preg_match('/^(.*)\{(y+)\}\{(m+)\}/i',$maskwithonlyymcode,$reg)) { $posy=2; $posm=3; }
|
||||
elseif (preg_match('/^(.*)\{(m+)\}\{(y+)\}/i',$maskwithonlyymcode,$reg)) { $posy=3; $posm=2; }
|
||||
|
||||
Reference in New Issue
Block a user