Browse Source

Fix limit

Laurent Destailleur 6 years ago
parent
commit
e29fb85cec
1 changed files with 1 additions and 1 deletions
  1. 1 1
      htdocs/accountancy/class/bookkeeping.class.php

+ 1 - 1
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();