From 0aadbc6433709d44ffba1c7921d1cfc863625198 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 1 Dec 2022 17:39:28 +0100 Subject: [PATCH] Fix too late to test critical change during beta --- htdocs/core/lib/functions2.lib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 0168bb55db3..bd5a4b16691 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -1284,8 +1284,9 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $ $sql .= " AND ".$field." NOT LIKE '(PROV%)'"; // To ensure that all variables within the MAX() brackets are integers - $sql .= " AND ". $db->regexpsql($sqlstring, '^[0-9]+$', true); - + if (getDolGlobalInt('MAIN_NUMBERING_FILTER_ON_INT_ONLY')) { + $sql .= " AND ". $db->regexpsql($sqlstring, '^[0-9]+$', true); + } if ($bentityon) { // only if entity enable $sql .= " AND entity IN (".getEntity($sharetable).")";