diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php
index c5347246719..4129b561ed1 100644
--- a/htdocs/comm/index.php
+++ b/htdocs/comm/index.php
@@ -118,6 +118,23 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire)
print "
";
}
+// Search contract
+if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire)
+{
+ $var=false;
+ print '
\n";
+ print "
";
+}
+
/*
* Draft proposals
*/
diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php
index 076ad9bc689..4bea6c46850 100644
--- a/htdocs/fichinter/list.php
+++ b/htdocs/fichinter/list.php
@@ -56,10 +56,11 @@ if (! $sortfield)
}
$limit = $conf->liste_limit;
-$search_ref=GETPOST('search_ref','alpha');
+$search_ref=GETPOST('search_ref')?GETPOST('search_ref','alpha'):GETPOST('search_inter','alpha');
$search_company=GETPOST('search_company','alpha');
$search_desc=GETPOST('search_desc','alpha');
$search_status=GETPOST('search_status');
+$sall=GETPOST('sall');
/*
@@ -99,6 +100,11 @@ if (! $user->rights->societe->client->voir && empty($socid))
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
if ($socid)
$sql.= " AND s.rowid = " . $socid;
+if ($sall) {
+ $arraytosearch=array('f.ref', 'f.description', 's.nom');
+ if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) $arraytosearch=array('f.ref', 'f.description', 's.nom', 'fd.description');
+ $sql .= natural_search($arraytosearch, $sall);
+}
$sql.= $db->order($sortfield,$sortorder);
$sql.= $db->plimit($limit+1, $offset);
//print $sql;
diff --git a/htdocs/langs/en_US/interventions.lang b/htdocs/langs/en_US/interventions.lang
index 3e4011b0b79..c79da05364e 100644
--- a/htdocs/langs/en_US/interventions.lang
+++ b/htdocs/langs/en_US/interventions.lang
@@ -38,6 +38,7 @@ InterventionClassifiedBilledInDolibarr=Intervention %s set as billed
InterventionClassifiedUnbilledInDolibarr=Intervention %s set as unbilled
InterventionSentByEMail=Intervention %s sent by EMail
InterventionDeletedInDolibarr=Intervention %s deleted
+SearchAnIntervention=Search an intervention
##### Types de contacts #####
TypeContact_fichinter_internal_INTERREPFOLL=Representative following-up intervention
TypeContact_fichinter_internal_INTERVENING=Intervening