Fix: Filter on third party

This commit is contained in:
Laurent Destailleur 2011-10-28 23:59:16 +02:00
parent 1d280000ee
commit ba2c791af5

View File

@ -47,11 +47,10 @@ if ($user->societe_id) $socid=$user->societe_id;
$result=restrictedArea($user,'banque',$id,'bank_account','','',$fieldid); $result=restrictedArea($user,'banque',$id,'bank_account','','',$fieldid);
$req_nb=GETPOST("req_nb",'',3); $req_nb=GETPOST("req_nb",'',3);
$thirdarty=GETPOST("thirdparty",'',3); $thirdparty=GETPOST("thirdparty",'',3);
$account=GETPOST("account"); $account=GETPOST("account");
$vline=GETPOST("vline"); $vline=GETPOST("vline");
$action=GETPOST("action"); $action=GETPOST("action");
$page=isset($_GET["page"])?$_GET["page"]:0; $page=isset($_GET["page"])?$_GET["page"]:0;
$negpage=isset($_GET["negpage"])?$_GET["negpage"]:0; $negpage=isset($_GET["negpage"])?$_GET["negpage"]:0;
if ($negpage) if ($negpage)
@ -179,7 +178,6 @@ if ($account || $_GET["ref"])
$db->free($result); $db->free($result);
} }
// Definition de sql_rech et param // Definition de sql_rech et param
$param=''; $param='';
$sql_rech=''; $sql_rech='';
@ -210,7 +208,7 @@ if ($account || $_GET["ref"])
} }
if ($thirdparty) if ($thirdparty)
{ {
$sql_rech.=" AND s.nom LIKE '%".$db->escape($thirdparty)."%')"; $sql_rech.=" AND s.nom LIKE '%".$db->escape($thirdparty)."%'";
$param.='&thirdparty='.urlencode($thirdparty); $param.='&thirdparty='.urlencode($thirdparty);
$mode_search = 1; $mode_search = 1;
} }