Skip to content

Commit

Permalink
fix SEPA line with limit select and working pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
florian HENRY committed Jan 23, 2020
1 parent 7ad827f commit fd0daad
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions htdocs/compta/prelevement/card.php
Expand Up @@ -63,7 +63,7 @@
// Load object
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals

$hookmanager->initHooks(array('directdebitprevcard', 'globalcard'));
$hookmanager->initHooks(array('directdebitprevcard', 'globalcard', 'directdebitprevlist'));

/*
* Actions
Expand Down Expand Up @@ -362,10 +362,19 @@

$urladd = "&id=".$id;

print_barre_liste($langs->trans("Lines"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '');
print '<form method="get" action="' . $_SERVER ['PHP_SELF'] . '" name="search_form">' . "\n";
print '<input type="hidden" name="id" value="' . $id . '"/>';
print '<input type="hidden" name="socid" value="' . $socid . '"/>';
if (! empty($page)) {
print '<input type="hidden" name="page" value="' . $page . '"/>';
}
if (! empty($limit)) {
print '<input type="hidden" name="limit" value="' . $limit . '"/>';
}
print_barre_liste($langs->trans("Lines"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '', 0, '', '', $limit);

print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
print '<table class="noborder liste" width="100%" cellspacing="0" cellpadding="4">';
print '<tr class="liste_titre">';
print_liste_field_titre("Lines", $_SERVER["PHP_SELF"], "pl.rowid", '', $urladd);
print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "s.nom", '', $urladd);
Expand All @@ -375,7 +384,7 @@

$total = 0;

while ($i < min($num, $conf->liste_limit))
while ($i < min($num, $limit))
{
$obj = $db->fetch_object($result);

Expand Down Expand Up @@ -433,6 +442,7 @@

print "</table>";
print '</div>';
print '</form>';

$db->free($result);
}
Expand Down

0 comments on commit fd0daad

Please sign in to comment.