Merge pull request #12919 from atm-florian/10_fixCreateSEPALimitAndPagination
10 fix create sepa limit and pagination
This commit is contained in:
commit
14f1f98b59
@ -193,6 +193,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
print "</div>\n";
|
print "</div>\n";
|
||||||
|
print '</form>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
@ -221,6 +222,11 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
|||||||
{
|
{
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
$nbtotalofrecords = $db->num_rows($result);
|
$nbtotalofrecords = $db->num_rows($result);
|
||||||
|
if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
|
||||||
|
{
|
||||||
|
$page = 0;
|
||||||
|
$offset = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql.= $db->plimit($limit+1, $offset);
|
$sql.= $db->plimit($limit+1, $offset);
|
||||||
@ -236,11 +242,12 @@ if ($resql)
|
|||||||
if($socid) $param .= '&socid='.urlencode($socid);
|
if($socid) $param .= '&socid='.urlencode($socid);
|
||||||
if($option) $param .= "&option=".urlencode($option);
|
if($option) $param .= "&option=".urlencode($option);
|
||||||
|
|
||||||
if(! empty($page) && $num <= $nbtotalofrecords) $page = 0;
|
|
||||||
|
|
||||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="page" value="'.$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("InvoiceWaitingWithdraw"), $page, $_SERVER['PHP_SELF'], $param, '', '', '', $num, $nbtotalofrecords, 'title_accountancy.png', 0, '', '', $limit);
|
print_barre_liste($langs->trans("InvoiceWaitingWithdraw"), $page, $_SERVER['PHP_SELF'], $param, '', '', '', $num, $nbtotalofrecords, 'title_accountancy.png', 0, '', '', $limit);
|
||||||
|
|
||||||
|
|||||||
@ -140,8 +140,6 @@ else
|
|||||||
|
|
||||||
$newcardbutton = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/index.php">'.$langs->trans("Back").'</a>';
|
$newcardbutton = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/index.php">'.$langs->trans("Back").'</a>';
|
||||||
|
|
||||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic', 0, $newcardbutton, '', $limit);
|
|
||||||
|
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
@ -152,6 +150,7 @@ print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
|||||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||||
|
|
||||||
|
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic', 0, $newcardbutton, '', $limit);
|
||||||
|
|
||||||
print '<table class="liste" width="100%">';
|
print '<table class="liste" width="100%">';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user