Skip to content

Commit

Permalink
Merge pull request #4461 from frederic34/patch-8
Browse files Browse the repository at this point in the history
total records for payment list
  • Loading branch information
eldy committed Jan 22, 2016
2 parents d7da972 + b97417f commit d8cbe39
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion htdocs/compta/paiement/list.php
Expand Up @@ -175,6 +175,14 @@
$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook
$sql.=$hookmanager->resPrint;
}

$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);
//print "$sql";
Expand All @@ -192,7 +200,7 @@
$paramlist.=($search_company?"&search_company=".$search_company:"");
$paramlist.=($search_amount?"&search_amount=".$search_amount:"");

print_barre_liste($langs->trans("ReceivedCustomersPayments"), $page, $_SERVER["PHP_SELF"],$paramlist,$sortfield,$sortorder,'',$num,'','title_accountancy.png');
print_barre_liste($langs->trans("ReceivedCustomersPayments"), $page, $_SERVER["PHP_SELF"],$paramlist,$sortfield,$sortorder,'',$num, $nbtotalofrecords,'title_accountancy.png');

print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
print '<table class="noborder" width="100%">';
Expand Down

0 comments on commit d8cbe39

Please sign in to comment.