Skip to content

Commit

Permalink
Fix 1667 Pagination is only partially shown in supplier references list
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic34 committed Nov 22, 2014
1 parent 671243e commit b2a1408
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion htdocs/fourn/product/list.php
Expand Up @@ -118,6 +118,13 @@
{
$sql .= " AND ppf.fk_soc = ".$fourn_id;
}
// Count total nb of records without orderby and limit
$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);

Expand All @@ -143,7 +150,7 @@


$param="&tobuy=".$tobuy."&sref=".$sref."&snom=".$snom."&fourn_id=".$fourn_id.(isset($type)?"&type=".$type:"").(empty($sRefSupplier)?"":"&srefsupplier=".$sRefSupplier);
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num);
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords);


if (isset($catid))
Expand Down

0 comments on commit b2a1408

Please sign in to comment.