Fix pagination
Conflicts: htdocs/accountancy/bookkeeping/balance.php
This commit is contained in:
parent
e29fb85cec
commit
2684767b19
@ -103,23 +103,27 @@ if ($sortorder == "")
|
|||||||
if ($sortfield == "")
|
if ($sortfield == "")
|
||||||
$sortfield = "t.numero_compte";
|
$sortfield = "t.numero_compte";
|
||||||
|
|
||||||
$options = '';
|
|
||||||
|
$param='';
|
||||||
|
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
|
||||||
|
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
|
||||||
|
|
||||||
$filter = array ();
|
$filter = array ();
|
||||||
if (! empty($search_date_start)) {
|
if (! empty($search_date_start)) {
|
||||||
$filter['t.doc_date>='] = $search_date_start;
|
$filter['t.doc_date>='] = $search_date_start;
|
||||||
$options .= '&date_startmonth=' . GETPOST('date_startmonth', 'int') . '&date_startday=' . GETPOST('date_startday', 'int') . '&date_startyear=' . GETPOST('date_startyear', 'int');
|
$param .= '&date_startmonth=' . GETPOST('date_startmonth', 'int') . '&date_startday=' . GETPOST('date_startday', 'int') . '&date_startyear=' . GETPOST('date_startyear', 'int');
|
||||||
}
|
}
|
||||||
if (! empty($search_date_end)) {
|
if (! empty($search_date_end)) {
|
||||||
$filter['t.doc_date<='] = $search_date_end;
|
$filter['t.doc_date<='] = $search_date_end;
|
||||||
$options .= '&date_endmonth=' . GETPOST('date_endmonth', 'int') . '&date_endday=' . GETPOST('date_endday', 'int') . '&date_endyear=' . GETPOST('date_endyear', 'int');
|
$param .= '&date_endmonth=' . GETPOST('date_endmonth', 'int') . '&date_endday=' . GETPOST('date_endday', 'int') . '&date_endyear=' . GETPOST('date_endyear', 'int');
|
||||||
}
|
}
|
||||||
if (! empty($search_accountancy_code_start)) {
|
if (! empty($search_accountancy_code_start)) {
|
||||||
$filter['t.numero_compte>='] = $search_accountancy_code_start;
|
$filter['t.numero_compte>='] = $search_accountancy_code_start;
|
||||||
$options .= '&search_accountancy_code_start=' . $search_accountancy_code_start;
|
$param .= '&search_accountancy_code_start=' . $search_accountancy_code_start;
|
||||||
}
|
}
|
||||||
if (! empty($search_accountancy_code_end)) {
|
if (! empty($search_accountancy_code_end)) {
|
||||||
$filter['t.numero_compte<='] = $search_accountancy_code_end;
|
$filter['t.numero_compte<='] = $search_accountancy_code_end;
|
||||||
$options .= '&search_accountancy_code_end=' . $search_accountancy_code_end;
|
$param .= '&search_accountancy_code_end=' . $search_accountancy_code_end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -141,8 +145,8 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x',
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($action == 'export_csv') {
|
if ($action == 'export_csv')
|
||||||
|
{
|
||||||
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||||
|
|
||||||
$filename = 'balance';
|
$filename = 'balance';
|
||||||
@ -194,7 +198,8 @@ else {
|
|||||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||||
|
|
||||||
$button = '<input type="submit" name="exportcsv" class="butAction" value="' . $langs->trans("Export") . ' ('.$conf->global->ACCOUNTING_EXPORT_FORMAT.')" />';
|
$button = '<input type="submit" name="exportcsv" class="butAction" value="' . $langs->trans("Export") . ' ('.$conf->global->ACCOUNTING_EXPORT_FORMAT.')" />';
|
||||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, $button, $result, $result, 'title_accountancy', 0);
|
|
||||||
|
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $button, $result, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
|
||||||
|
|
||||||
$moreforfilter = '';
|
$moreforfilter = '';
|
||||||
|
|
||||||
@ -232,12 +237,12 @@ else {
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre("AccountAccounting", $_SERVER['PHP_SELF'], "t.numero_compte", "", $options, "", $sortfield, $sortorder);
|
print_liste_field_titre("AccountAccounting", $_SERVER['PHP_SELF'], "t.numero_compte", "", $param, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Label", $_SERVER['PHP_SELF'], "t.label_operation", "", $options, "", $sortfield, $sortorder);
|
print_liste_field_titre("Label", $_SERVER['PHP_SELF'], "t.label_operation", "", $param, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Balance", $_SERVER["PHP_SELF"], "", $options, "", 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("Balance", $_SERVER["PHP_SELF"], "", $param, "", 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
|
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$total_debit = 0;
|
$total_debit = 0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user