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') {