From 54e2803926a93961f258cbe1908aa937e3d0ff4c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 3 Nov 2014 17:48:10 +0100 Subject: [PATCH] Missing search table for interventions --- htdocs/comm/index.php | 17 +++++++++++++++++ htdocs/fichinter/list.php | 8 +++++++- htdocs/langs/en_US/interventions.lang | 1 + 3 files changed, 25 insertions(+), 1 deletion(-) 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 '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print "
'.$langs->trans("SearchAnIntervention").'
:
:
\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