forked from Wavyzz/dolibarr
Natural search on numeric works also with several space after operator
This commit is contained in:
@@ -4961,7 +4961,7 @@ function natural_search($fields, $value, $numeric=0)
|
|||||||
|
|
||||||
if ($numeric)
|
if ($numeric)
|
||||||
{
|
{
|
||||||
$value=preg_replace('/([<>=]+)\s([0-9'.preg_quote($langs->trans("DecimalSeparator"),'/').'\-])/','\1\2',$value); // Clean string '< 10' into '<10' so we can the explode on space to get all tests to do
|
$value=preg_replace('/([<>=]+)\s+([0-9'.preg_quote($langs->trans("DecimalSeparator"),'/').'\-])/','\1\2',$value); // Clean string '< 10' into '<10' so we can the explode on space to get all tests to do
|
||||||
}
|
}
|
||||||
$crits = explode(' ', $value);
|
$crits = explode(' ', $value);
|
||||||
$res = '';
|
$res = '';
|
||||||
|
|||||||
Reference in New Issue
Block a user