forked from Wavyzz/dolibarr
Fix warning
This commit is contained in:
@@ -1227,12 +1227,12 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $
|
||||
$maskLike = str_replace("%", "_", $maskLike);
|
||||
|
||||
// Replace protected special codes with matching number of _ as wild card character
|
||||
if ($resetEveryMonth ) { // Perf optimization, when a reset is requested at each month, we can include the year and month inside the filter
|
||||
if ($resetEveryMonth && $yearcomp && $monthcomp) { // Perf optimization, when a reset is requested at each month, we can include the year and month inside the filter
|
||||
$maskLike = preg_replace('/\{yyyy\}/i', $yearcomp, $maskLike);
|
||||
$maskLike = preg_replace('/\{yy\}/i', $yearcomp, $maskLike);
|
||||
$maskLike = preg_replace('/\{y\}/i', $yearcomp, $maskLike);
|
||||
$maskLike = preg_replace('/\{mm\}/i', sprintf("%02d", $monthcomp), $maskLike);
|
||||
} elseif ($maskraz == 1) { // Perf optimization, when a reset is requested at first month, we can include the year inside the filter, but not the month
|
||||
} elseif ($maskraz == 1 && $yearcomp) { // Perf optimization, when a reset is requested at first month, we can include the year inside the filter, but not the month
|
||||
$maskLike = preg_replace('/\{yyyy\}/i', $yearcomp, $maskLike);
|
||||
$maskLike = preg_replace('/\{yy\}/i', $yearcomp, $maskLike);
|
||||
$maskLike = preg_replace('/\{y\}/i', $yearcomp, $maskLike);
|
||||
|
||||
Reference in New Issue
Block a user