From 40b65a642dfc2f0745e2af1bf309b17eedfd3058 Mon Sep 17 00:00:00 2001 From: aspangaro <alexandre.spangaro@gmail.com> Date: Tue, 19 May 2015 22:22:18 +0200 Subject: [PATCH] Fix: ER list don't respect $conf->liste_limit --- htdocs/expensereport/list.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index 0974ce0f31c..58002c19dba 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -88,10 +88,10 @@ if ($page == -1) { $page = 0 ; } -$limit = $conf->liste_limit; -$offset = $limit * $page; +$offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; +$limit = $conf->liste_limit; $sql = "SELECT d.rowid, d.ref, d.fk_user_author, d.total_ht, d.total_tva, d.total_ttc, d.fk_statut as status,"; $sql.= " d.date_debut, d.date_fin,"; @@ -219,7 +219,7 @@ if ($resql) print '<td class="liste_titre"> </td>'; } - // Amount with no taxe + // Amount with no tax print '<td class="liste_titre" align="right"><input class="flat" type="text" size="6" name="search_amount_ht" value="'.$search_amount_ht.'"></td>'; print '<td class="liste_titre"> </td>'; @@ -245,9 +245,9 @@ if ($resql) $total_total_ttc = 0; $total_total_tva = 0; - if($num>0) + if($num > 0) { - while ($i < $num) + while ($i < min($num,$limit)) { $objp = $db->fetch_object($resql); -- GitLab