diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index 245903101cf7a..ff6fe4e109cdd 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -2,7 +2,7 @@ /* Copyright (C) 2005 Rodolphe Quiedeville * Copyright (C) 2005-2016 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2010-2012 Juanjo Menent + * Copyright (C) 2010-2018 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 @@ -101,7 +101,7 @@ if ($search_line) $sql.= " AND pl.rowid = '".$db->escape($search_line)."'"; if ($search_bon) $sql.= natural_search("p.ref", $search_bon); if ($search_code) $sql.= natural_search("s.code_client", $search_code); -if ($search_company) natural_search("s.nom", $search_company); +if ($search_company) $sql.= natural_search("s.nom", $search_company); $sql.= $db->order($sortfield,$sortorder); @@ -123,13 +123,14 @@ $urladd = "&statut=".$statut; $urladd .= "&search_bon=".$search_bon; - - print_barre_liste($langs->trans("WithdrawalsLines"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic', 0, '', '', $limit); + if ($limit > 0 && $limit != $conf->liste_limit) $urladd.='&limit='.urlencode($limit); print"\n\n"; print '
'; - $moreforfilter=''; + print_barre_liste($langs->trans("WithdrawalsLines"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic', 0, '', '', $limit); + + $moreforfilter=''; print '
'; print ''."\n";