New: Can filter on status

This commit is contained in:
Laurent Destailleur 2013-07-26 11:27:56 +02:00
parent 61f11d3621
commit 55fc3165ba

View File

@ -64,6 +64,7 @@ $search_ref=GETPOST('sf_ref')?GETPOST('sf_ref','alpha'):GETPOST('search_ref','al
$search_societe=GETPOST('search_societe','alpha');
$search_montant_ht=GETPOST('search_montant_ht','alpha');
$search_montant_ttc=GETPOST('search_montant_ttc','alpha');
$search_status=GETPOST('search_status','alpha');
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
@ -116,6 +117,8 @@ if (GETPOST("button_removefilter_x"))
$search_refcustomer='';
$search_societe='';
$search_montant_ht='';
$search_montant_ttc='';
$search_status='';
$year='';
$month='';
}
@ -185,6 +188,10 @@ if ($search_montant_ttc)
{
$sql.= ' AND f.total_ttc = \''.$db->escape(price2num(trim($search_montant_ttc))).'\'';
}
if ($search_status != '')
{
$sql.= " AND f.fk_statut = '".$db->escape($search_status)."'";
}
if ($month > 0)
{
if ($year > 0 && empty($day))