From 7c41be7f0a5069aeca89e40b3e8c4bbd8b4b8967 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 26 May 2021 15:22:49 +0200 Subject: [PATCH] FIX Navigation in list of holiday --- htdocs/holiday/view_log.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/htdocs/holiday/view_log.php b/htdocs/holiday/view_log.php index a2ecbe1e8b3..cd43e03f957 100644 --- a/htdocs/holiday/view_log.php +++ b/htdocs/holiday/view_log.php @@ -373,7 +373,7 @@ if (!empty($arrayfields['cpl.fk_type']['checked'])) { // Filter: Previous balance if (!empty($arrayfields['cpl.prev_solde']['checked'])) { - print ''; + print ''; print ''; print ''; } @@ -385,7 +385,7 @@ if (!empty($arrayfields['variation']['checked'])) { // Filter: New Balance if (!empty($arrayfields['cpl.new_solde']['checked'])) { - print ''; + print ''; print ''; print ''; } @@ -428,12 +428,20 @@ if (!empty($arrayfields['cpl.new_solde']['checked'])) { print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print ''; -// TODO: $i = 0; -$i = 1; +$j = 0; +while ($j < ($page * $limit)) { + $obj = next($object->logs); + $j++; +} + +$i = 0; while ($i < min($num, $limit)) { //TODO: $obj = $db->fetch_object($resql); - $obj = next($object->logs); + $obj = current($object->logs); + if (empty($obj)) { + break; + } $holidaylogstatic->id = $obj['rowid']; $holidaylogstatic->date = $obj['date_action']; @@ -511,6 +519,7 @@ while ($i < min($num, $limit)) { print ''; $i++; + next($object->logs); } if ($log_holiday == '2') {