Skip to content
Snippets Groups Projects
Commit 5601c979 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

New: Can search list of thirdparties from web service on part of name.

parent 97eec37f
No related branches found
No related tags found
No related merge requests found
......@@ -113,6 +113,7 @@ For developers:
- New: [ task #1511, #1426 ] Added hook "doActions" for supplier card and supplier order card.
- New: renamed table llx_c_pays to llx_c_country & libelle field to label.
- New: Added hook "formConfirm" and "doActions" for fichinter card
- New: Can search list of thirdparties from web service on part of name.
- Qual: Renamed table llx_c_civilite into llx_c_civility,
field civilite into label in the same table,
and field civilite into civility in other table.
......
......@@ -629,7 +629,7 @@ function updateThirdParty($authentication,$thirdparty)
* getListOfThirdParties
*
* @param array $authentication Array of authentication information
* @param array $filterthirdparty Filter fields
* @param array $filterthirdparty Filter fields (key=>value to filer on. For example 'client'=>2, 'supplier'=>1, 'category'=>idcateg, 'name'=>'searchstring', ...)
* @return array Array result
*/
function getListOfThirdParties($authentication,$filterthirdparty)
......@@ -661,6 +661,7 @@ function getListOfThirdParties($authentication,$filterthirdparty)
$sql.=" WHERE entity=".$conf->entity;
foreach($filterthirdparty as $key => $val)
{
if ($key == 'name' && $val != '') $sql.=" AND s.name LIKE '%".$db->escape($val)."%'";
if ($key == 'client' && $val != '') $sql.=" AND s.client = ".$db->escape($val);
if ($key == 'supplier' && $val != '') $sql.=" AND s.fournisseur = ".$db->escape($val);
if ($key == 'category' && $val != '') $sql.=" AND s.rowid IN (SELECT fk_societe FROM ".MAIN_DB_PREFIX."categorie_societe WHERE fk_categorie=".$db->escape($val).") ";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment