From 12a3ce77466f835f6dfe7d75f0ba98d6a44200a8 Mon Sep 17 00:00:00 2001 From: simnandez Date: Thu, 19 Apr 2012 19:10:21 +0200 Subject: [PATCH 1/3] Fix: [ bug #368 ] Product list --- htdocs/product/liste.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index 4338139e62c..6663a9f527e 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -82,6 +82,7 @@ if (isset($_POST["button_removefilter_x"])) $sref=""; $sbarcode=""; $snom=""; + $search_categ=0; } if ($conf->categorie->enabled && GETPOST('catid')) @@ -190,6 +191,7 @@ else $param="&sref=".$sref.($sbarcode?"&sbarcode=".$sbarcode:"")."&snom=".$snom."&sall=".$sall."&tosell=".$tosell."&tobuy=".$tobuy; $param.=($fourn_id?"&fourn_id=".$fourn_id:""); + $param.=($search_categ?"&search_categ=".$search_categ:""); $param.=isset($type)?"&type=".$type:""; print_barre_liste($texte, $page, "liste.php", $param, $sortfield, $sortorder,'',$num); From 5f001c107979db22dc696c807188802a227642ad Mon Sep 17 00:00:00 2001 From: simnandez Date: Thu, 19 Apr 2012 20:14:37 +0200 Subject: [PATCH 2/3] Fix: [ bug #370 ] Filter in accountancy -> suppliers_bills --- htdocs/fourn/facture/impayees.php | 45 ++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php index 427607b542c..8616ab6dc94 100644 --- a/htdocs/fourn/facture/impayees.php +++ b/htdocs/fourn/facture/impayees.php @@ -4,6 +4,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012-2012 Vinicius Nogueira + * Copyright (C) 2012 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -69,6 +70,14 @@ $companystatic=new Societe($db); $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); + +$search_ref = GETPOST('search_ref','alpha'); +$search_ref_supplier = GETPOST('search_ref_supplier','alpha'); +$search_societe = GETPOST('search_societe','alpha'); +$search_montant_ht = GETPOST('search_montant_ht','int'); +$search_montant_ttc = GETPOST('search_montant_ttc','int'); + + $page = GETPOST("page",'int'); if ($page == -1) { $page = 0; } $offset = $conf->liste_limit * $page; @@ -105,28 +114,28 @@ if ($user->rights->fournisseur->facture->lire) } } - if ($_GET["search_ref"]) + if ($search_ref) { - $sql .= " AND f.rowid like '%".$_GET["search_ref"]."%'"; + $sql .= " AND f.rowid like '%".$search_ref."%'"; } - if ($_GET["search_ref_supplier"]) + if ($search_ref_supplier) { - $sql .= " AND f.facnumber like '%".$_GET["search_ref_supplier"]."%'"; + $sql .= " AND f.facnumber like '%".$search_ref_supplier."%'"; } - if ($_GET["search_societe"]) + if ($search_societe) { - $sql .= " AND s.nom like '%".$_GET["search_societe"]."%'"; + $sql .= " AND s.nom like '%".$search_societe."%'"; } - if ($_GET["search_montant_ht"]) + if ($search_montant_ht) { - $sql .= " AND f.total_ht = '".$_GET["search_montant_ht"]."'"; + $sql .= " AND f.total_ht = '".$search_montant_ht."'"; } - if ($_GET["search_montant_ttc"]) + if ($search_montant_ttc) { - $sql .= " AND f.total_ttc = '".$_GET["search_montant_ttc"]."'"; + $sql .= " AND f.total_ttc = '".$search_montant_ttc."'"; } if (dol_strlen($_POST["sf_ref"]) > 0) @@ -153,6 +162,12 @@ if ($user->rights->fournisseur->facture->lire) $param =''; if ($socid) $param.="&socid=".$socid; + + if ($search_ref) $param.='&search_ref='.urlencode($search_ref); + if ($search_societe) $param.='&search_societe='.urlencode($search_societe); + if ($search_montant_ht) $param.='&search_montant_ht='.urlencode($search_montant_ht); + if ($search_montant_ttc) $param.='&search_montant_ttc='.urlencode($search_montant_ttc); + $param.=($option?"&option=".$option:""); if ($late) $param.='&late='.urlencode($late); $urlsource.=str_replace('&','&',$param); @@ -187,17 +202,17 @@ if ($user->rights->fournisseur->facture->lire) // Lines with filter fields print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ' '; print ' '; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; From 312f81004fb0495642017bfb15662439fdae3106 Mon Sep 17 00:00:00 2001 From: simnandez Date: Thu, 19 Apr 2012 20:20:08 +0200 Subject: [PATCH 3/3] Fix: [ bug #370 ] Filter in accountancy -> suppliers_bills --- htdocs/fourn/facture/impayees.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php index 8616ab6dc94..988b66930ec 100644 --- a/htdocs/fourn/facture/impayees.php +++ b/htdocs/fourn/facture/impayees.php @@ -163,10 +163,11 @@ if ($user->rights->fournisseur->facture->lire) $param =''; if ($socid) $param.="&socid=".$socid; - if ($search_ref) $param.='&search_ref='.urlencode($search_ref); - if ($search_societe) $param.='&search_societe='.urlencode($search_societe); - if ($search_montant_ht) $param.='&search_montant_ht='.urlencode($search_montant_ht); - if ($search_montant_ttc) $param.='&search_montant_ttc='.urlencode($search_montant_ttc); + if ($search_ref) $param.='&search_ref='.urlencode($search_ref); + if ($search_ref_supplier) $param.='&search_ref_supplier='.urlencode($search_ref_supplier); + if ($search_societe) $param.='&search_societe='.urlencode($search_societe); + if ($search_montant_ht) $param.='&search_montant_ht='.urlencode($search_montant_ht); + if ($search_montant_ttc) $param.='&search_montant_ttc='.urlencode($search_montant_ttc); $param.=($option?"&option=".$option:""); if ($late) $param.='&late='.urlencode($late);