diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 616e9690e8a..dabf7d28cd4 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -72,8 +72,9 @@ $search_amount_no_tax = GETPOST("search_amount_no_tax","alpha"); $search_amount_all_tax = GETPOST("search_amount_all_tax","alpha"); $month = GETPOST("month","int"); $year = GETPOST("year","int"); +$filter = GETPOST("filtre"); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x")) { $search_ref=""; $search_ref_supplier=""; @@ -83,6 +84,7 @@ if (GETPOST("button_removefilter")) $search_amount_all_tax=""; $year=""; $month=""; + $filter=""; } /* @@ -136,9 +138,9 @@ if ($socid) { $sql .= " AND s.rowid = ".$socid; } -if (GETPOST('filtre') && GETPOST('filtre') != -1) // GETPOST('filtre') may be a string +if ($filter) && $filter != -1) // GETPOST('filtre') may be a string { - $filtrearr = explode(",", GETPOST('filtre')); + $filtrearr = explode(",", $filter); foreach ($filtrearr as $fil) { $filt = explode(":", $fil); @@ -217,7 +219,7 @@ if ($resql) if ($search_company) $param.='&search_company='.urlencode($search_company); if ($search_amount_no_tax) $param.='&search_amount_no_tax='.urlencode($search_amount_no_tax); if ($search_amount_all_tax) $param.='&search_amount_all_tax='.urlencode($search_amount_all_tax); - if (GETPOST("filtre") && GETPOST('filtre') != -1) $param.='&filtre='.urlencode(GETPOST("filtre")); + if ($filter) && $filter != -1) $param.='&filtre='.urlencode($filter); print_barre_liste($langs->trans("BillsSuppliers").($socid?" $soc->name.":""),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords); print '
'; @@ -269,8 +271,8 @@ if ($resql) print ''; print ''; print ''; - $liststatus=array('paye:0'=>$langs->trans("Unpayed"), 'paye:1'=>$langs->trans("Payed")); - print $form->selectarray('filtre', $liststatus, GETPOST('filtre'), 1); + $liststatus=array('paye:0'=>$langs->trans("Unpaid"), 'paye:1'=>$langs->trans("Paid")); + print $form->selectarray('filtre', $liststatus, $filter), 1); print ''; print ''; print '';