Skip to content
Snippets Groups Projects
Commit a4d0e501 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge pull request #3489 from AlainRnet/patch-1

Update lines.php
parents 5c0d90ae 587a193a
No related branches found
No related tags found
No related merge requests found
...@@ -184,6 +184,14 @@ if (strlen(trim($search_vat))) ...@@ -184,6 +184,14 @@ if (strlen(trim($search_vat)))
if (! empty($conf->multicompany->enabled)) { if (! empty($conf->multicompany->enabled)) {
$sql .= " AND f.entity IN (" . getEntity("facture", 1) . ")"; $sql .= " AND f.entity IN (" . getEntity("facture", 1) . ")";
} }
// Count total nb of records with no order and no limits
$nbtotalofrecords = 0;
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$resql = $db->query($sql);
if ($resql) $nbtotalofrecords = $db->num_rows($resql);
else dol_print_error($db);
}
$sql.= $db->order($sortfield,$sortorder); $sql.= $db->order($sortfield,$sortorder);
$sql.= $db->plimit($limit + 1,$offset); $sql.= $db->plimit($limit + 1,$offset);
...@@ -192,9 +200,17 @@ $result = $db->query($sql); ...@@ -192,9 +200,17 @@ $result = $db->query($sql);
if ($result) { if ($result) {
$num_lines = $db->num_rows($result); $num_lines = $db->num_rows($result);
$i = 0; $i = 0;
print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num_lines); $param="";
if ($search_login) $param.="&search_login=".$search_login;
if ($search_facture) $param.="&search_facture=".$search_facture;
if ($search_ref) $param.="&search_ref=".$search_ref;
if ($search_label) $param.="&search_label=".$search_label;
if ($search_desc) $param.="&search_desc=".$search_desc;
if ($search_account) $param.="&search_account=".$search_account;
if ($filter) $param.="&filter=".$filter;
print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines,$nbtotalofrecords);
print '<td align="left"><b>' . $langs->trans("DescVentilDoneCustomer") . '</b></td>'; print '<td align="left"><b>' . $langs->trans("DescVentilDoneCustomer") . '</b></td>';
print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">'; print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
...@@ -277,5 +293,10 @@ if ($result) { ...@@ -277,5 +293,10 @@ if ($result) {
print "</table></form>"; print "</table></form>";
if ($num_lines > $conf->liste_limit)
{
print_barre_liste('',$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num_lines,$nbtotalofrecords,'');
}
llxFooter(); llxFooter();
$db->close(); $db->close();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment