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 '
'; print ''; print ''; -print ''; +print ''; print ''; +print $langs->trans("Shipment").':'; print "
'.$langs->trans("SearchASending").'
'.$langs->trans("Search").'
'; -print $langs->trans("Ref").':

\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 '
'."\n"; if ($optioncss != '') print ''; - print ''; + + if ($sall) + { + foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val); + print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall); + } + + $moreforfilter=''; + + print '
'; print ''; print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"],"e.ref","",$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Company"), $_SERVER["PHP_SELF"],"s.nom", "", $param,'align="left"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("ThirdParty"), $_SERVER["PHP_SELF"],"s.nom", "", $param,'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateDeliveryPlanned"), $_SERVER["PHP_SELF"],"e.date_delivery","",$param, 'align="center"',$sortfield,$sortorder); if($conf->livraison_bon->enabled) { diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php index 0240b6d8d51..4801dff3af0 100644 --- a/htdocs/product/stock/list.php +++ b/htdocs/product/stock/list.php @@ -111,7 +111,9 @@ if ($result) print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall); } - print '
'; + $moreforfilter=''; + + print '
'; print ""; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"], "e.label","","","",$sortfield,$sortorder);