diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index 5324a9f81dbfe2f86b093b3652c0173da84c2c9a..5e404a76242f25e5f823e4a532d7fdcec4686a7e 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -102,6 +102,13 @@ else if ($year > 0) $sql.= " AND bc.date_bordereau BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; } +$nbtotalofrecords = 0; +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) +{ + $result = $db->query($sql); + $nbtotalofrecords = $db->num_rows($result); +} + $sql.= " ORDER BY $sortfield $sortorder"; $sql.= $db->plimit($limit+1, $offset); //print "$sql"; @@ -114,7 +121,7 @@ if ($resql) $i = 0; $params=''; - print_barre_liste($langs->trans("MenuChequeDeposits"), $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num); + print_barre_liste($langs->trans("MenuChequeDeposits"), $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num, $nbtotalofrecords); print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">'; print '<table class="liste">';