Fix: Search on debit/credit
This commit is contained in:
parent
3158e8db2c
commit
c2d184f576
@ -184,25 +184,25 @@ if ($account || $_GET["ref"])
|
|||||||
$mode_search = 0;
|
$mode_search = 0;
|
||||||
if ($_REQUEST["req_desc"])
|
if ($_REQUEST["req_desc"])
|
||||||
{
|
{
|
||||||
$sql_rech.= " AND b.label like '%".$_REQUEST["req_desc"]."%'";
|
$sql_rech.= " AND b.label like '%".addslashes($_REQUEST["req_desc"])."%'";
|
||||||
$param.='&req_desc='.urlencode($_REQUEST["req_desc"]);
|
$param.='&req_desc='.urlencode($_REQUEST["req_desc"]);
|
||||||
$mode_search = 1;
|
$mode_search = 1;
|
||||||
}
|
}
|
||||||
if ($_REQUEST["req_debit"])
|
if ($_REQUEST["req_debit"])
|
||||||
{
|
{
|
||||||
$sql_rech.=" AND b.amount = -".$_REQUEST["req_debit"];
|
$sql_rech.=" AND b.amount = -".price2num($_REQUEST["req_debit"]);
|
||||||
$param.='&req_debit='.urlencode($_REQUEST["req_debit"]);
|
$param.='&req_debit='.urlencode($_REQUEST["req_debit"]);
|
||||||
$mode_search = 1;
|
$mode_search = 1;
|
||||||
}
|
}
|
||||||
if ($_REQUEST["req_credit"])
|
if ($_REQUEST["req_credit"])
|
||||||
{
|
{
|
||||||
$sql_rech.=" AND b.amount = ".$_REQUEST["req_credit"];
|
$sql_rech.=" AND b.amount = ".price2num($_REQUEST["req_credit"]);
|
||||||
$param.='&req_credit='.urlencode($_REQUEST["req_credit"]);
|
$param.='&req_credit='.urlencode($_REQUEST["req_credit"]);
|
||||||
$mode_search = 1;
|
$mode_search = 1;
|
||||||
}
|
}
|
||||||
if ($_REQUEST["thirdparty"])
|
if ($_REQUEST["thirdparty"])
|
||||||
{
|
{
|
||||||
$sql_rech.=" AND (IFNULL(s.nom,'') LIKE '%".$_REQUEST["thirdparty"]."%')";
|
$sql_rech.=" AND (IFNULL(s.nom,'') LIKE '%".addslashes($_REQUEST["thirdparty"])."%')";
|
||||||
$param.='&thirdparty='.urlencode($_REQUEST["thirdparty"]);
|
$param.='&thirdparty='.urlencode($_REQUEST["thirdparty"]);
|
||||||
$mode_search = 1;
|
$mode_search = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user