From e29fb85cec94ae39cfa775df23af8c652ba810bb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 14 Oct 2018 23:57:07 +0200 Subject: [PATCH] Fix limit --- htdocs/accountancy/class/bookkeeping.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 4a2037aa92c..e751cf1899f 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -991,7 +991,7 @@ class BookKeeping extends CommonObject $num = $this->db->num_rows($resql); $i = 0; - while ($obj = $this->db->fetch_object($resql) && $i < $num) + while (($obj = $this->db->fetch_object($resql)) && ($i < min($limit, $num))) { $line = new BookKeepingLine();