diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php
index c397605645d..19b11a0ddf6 100644
--- a/htdocs/expedition/index.php
+++ b/htdocs/expedition/index.php
@@ -51,9 +51,9 @@ $var=false;
print '
\n";
/*
diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php
index 13760ebf776..00796add031 100644
--- a/htdocs/expedition/list.php
+++ b/htdocs/expedition/list.php
@@ -38,6 +38,7 @@ $result = restrictedArea($user, 'expedition',$expeditionid,'');
$search_ref_exp = GETPOST("search_ref_exp");
$search_ref_liv = GETPOST('search_ref_liv');
$search_company = GETPOST("search_company");
+$sall = GETPOST('sall');
$optioncss = GETPOST('optioncss','alpha');
$sortfield = GETPOST('sortfield','alpha');
@@ -63,6 +64,13 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
$viewstatut='';
}
+// List of fields to search into when doing a "search in all"
+$fieldstosearchall = array(
+ 'e.ref'=>"Ref",
+ 's.nom'=>"ThirdParty"
+);
+
+
/*
* View
*/
@@ -100,6 +108,7 @@ if ($viewstatut <> '') {
if ($search_ref_exp) $sql .= natural_search('e.ref', $search_ref_exp);
if ($search_ref_liv) $sql .= natural_search('l.ref', $search_ref_liv);
if ($search_company) $sql .= natural_search('s.nom', $search_company);
+if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall);
$sql.= $db->order($sortfield,$sortorder);
$sql.= $db->plimit($limit + 1,$offset);
@@ -123,12 +132,21 @@ if ($resql)
$i = 0;
print '