From 40742e84a9ef9702be1f9da246217ba45f48c0ee Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Jun 2014 16:47:00 +0200 Subject: [PATCH] Fix: Bad balance of colspan. Fix: Filter on status was not visible when selected from url. Fix: Filtering on status was last when asking to sort. --- ChangeLog | 2 ++ htdocs/fourn/facture/list.php | 25 ++++++++++++++----------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index c3a10ce31ae..392de85a460 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,8 @@ Fix: [ bug #1416 ] Supplier order does not list document models in the select bo supplier order card Fix: [ bug #1443 ] Payment conditions is erased after editing supplier invoice label or limit date for payment +Fix: Filter on status was not visible when selected from url. +Fix: Filtering on status was last when asking to sort. ***** ChangeLog for 3.5.3 compared to 3.5.2 ***** Fix: Error on field accountancy code for export profile of invoices. diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 4b3b375a047..09dce5ceb70 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -119,7 +119,7 @@ if ($socid) { $sql .= " AND s.rowid = ".$socid; } -if (GETPOST('filtre')) +if (GETPOST('filtre') && GETPOST('filtre') != -1) // GETPOST('filtre') may be a string { $filtrearr = explode(",", GETPOST('filtre')); foreach ($filtrearr as $fil) @@ -191,15 +191,16 @@ if ($resql) $soc->fetch($socid); } - $param='&socid='.$socid; - if ($month) $param.='&month='.urlencode($month); - if ($year) $param.='&year=' .urlencode($year); - if (GETPOST("search_ref")) $param.='&search_ref='.urlencode(GETPOST("search_ref")); - if (GETPOST("search_ref_supplier")) $param.='&search_ref_supplier'.urlencode(GETPOST("search_ref_supplier")); - if (GETPOST("search_libelle")) $param.='&search_libelle='.urlencode(GETPOST("search_libelle")); - if (GETPOST("search_societe")) $param.='&search_societe='.urlencode(GETPOST("search_societe")); - if (GETPOST("search_montant_ht")) $param.='&search_montant_ht='.urlencode(GETPOST("search_montant_ht")); - if (GETPOST("search_montant_ttc")) $param.='&search_montant_ttc='.urlencode(GETPOST("search_montant_ttc")); + $param='&socid='.$socid; + if ($month) $param.='&month='.urlencode($month); + if ($year) $param.='&year=' .urlencode($year); + if (GETPOST("search_ref")) $param.='&search_ref='.urlencode(GETPOST("search_ref")); + if (GETPOST("search_ref_supplier")) $param.='&search_ref_supplier'.urlencode(GETPOST("search_ref_supplier")); + if (GETPOST("search_libelle")) $param.='&search_libelle='.urlencode(GETPOST("search_libelle")); + if (GETPOST("search_societe")) $param.='&search_societe='.urlencode(GETPOST("search_societe")); + if (GETPOST("search_montant_ht")) $param.='&search_montant_ht='.urlencode(GETPOST("search_montant_ht")); + if (GETPOST("search_montant_ttc")) $param.='&search_montant_ttc='.urlencode(GETPOST("search_montant_ttc")); + if (GETPOST("filtre") && GETPOST('filtre') != -1) $param.='&filtre='.urlencode(GETPOST("filtre")); print_barre_liste($langs->trans("BillsSuppliers").($socid?" $soc->nom":""),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords); print '
'; @@ -242,7 +243,9 @@ if ($resql) print ''; print ''; print ''; - print ''; + print ''; + $liststatus=array('paye:0'=>$langs->trans("Unpayed"), 'paye:1'=>$langs->trans("Payed")); + print $form->selectarray('filtre', $liststatus, GETPOST('filtre'), 1); print ''; print ''; print "\n";