diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index 00796add031..016d0da52f6 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -110,6 +110,13 @@ if ($search_ref_liv) $sql .= natural_search('l.ref', $search_ref_liv); if ($search_company) $sql .= natural_search('s.nom', $search_company); if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall); +$nbtotalofrecords = 0; +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) +{ + $result = $db->query($sql); + $nbtotalofrecords = $db->num_rows($result); +} + $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($limit + 1,$offset); @@ -126,7 +133,7 @@ if ($resql) if ($search_company) $param.= "&search_company=".$search_company; if ($optioncss != '') $param.='&optioncss='.$optioncss; - print_barre_liste($langs->trans('ListOfSendings'), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num); + print_barre_liste($langs->trans('ListOfSendings'), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num, $nbtotalofrecords); $i = 0;