diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 50773ba82b1..f56e262c472 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -468,7 +468,7 @@ if ($_GET["action"] == 'create') */ $sql = "SELECT p.rowid,p.label,p.ref,p.price FROM ".MAIN_DB_PREFIX."product as p "; $sql .= " WHERE envente = 1"; - $sql .= " ORDER BY p.nbvente DESC LIMIT 20"; + $sql .= " ORDER BY p.nbvente DESC LIMIT ".$conf->liste_limit; if ( $db->query($sql) ) { $opt = ""; @@ -1284,7 +1284,7 @@ else $sql .= " ORDER BY $sortfield $sortorder, f.rowid DESC "; - $sql .= $db->plimit($limit + 1,$offset); + $sql .= $db->plimit($limit,$offset); $result = $db->query($sql); } @@ -1305,8 +1305,10 @@ else print '