diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index d6c17337176..f6bdb81345c 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -125,29 +125,32 @@ if ($result) //print '
| '.$langs->trans("Statistics").' | |
| '; diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index e4993eacb88..fc090ef52e0 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -107,6 +107,16 @@ $hookmanager->initHooks(array('invoicelist')); $now=dol_now(); +// List of fields to search into when doing a "search in all" +$fieldstosearchall = array( + 'f.facnumber'=>'Ref', + 'f.ref_client'=>'RefCustomer', + 'fd.description'=>'Description', + 's.nom'=>"ThirdParty", + 'f.note_public'=>'NotePublic', +); +if (empty($user->socid)) $fieldstosearchall["f.note_private"]="NotePrivate"; + /* * Actions @@ -134,6 +144,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both $month=''; } + /* * View @@ -232,7 +243,7 @@ if (! $sall) } else { - $sql .= natural_search(array('s.nom', 'f.facnumber', 'f.note_public', 'fd.description'), $sall); + $sql .= natural_search(array_keys($fieldstosearchall), $sall); } $sql.= ' ORDER BY '; $listfield=explode(',',$sortfield); @@ -275,7 +286,19 @@ if ($resql) $i = 0; print ' |