|
@@ -104,23 +104,27 @@ if ($sortorder == "")
|
|
|
if ($sortfield == "")
|
|
|
$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 ();
|
|
|
if (! empty($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)) {
|
|
|
$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)) {
|
|
|
$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)) {
|
|
|
$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;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -137,8 +141,8 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x',
|
|
|
$filter = array();
|
|
|
}
|
|
|
|
|
|
-if ($action == 'export_csv') {
|
|
|
-
|
|
|
+if ($action == 'export_csv')
|
|
|
+{
|
|
|
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
|
|
|
|
|
$filename = 'balance';
|
|
@@ -200,7 +204,8 @@ if ($action != 'export_csv')
|
|
|
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.')" />';
|
|
|
- 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 = '';
|
|
|
|
|
@@ -238,12 +243,12 @@ if ($action != 'export_csv')
|
|
|
print '</tr>';
|
|
|
|
|
|
print '<tr class="liste_titre">';
|
|
|
- print_liste_field_titre("AccountAccounting", $_SERVER['PHP_SELF'], "t.numero_compte", "", $options, "", $sortfield, $sortorder);
|
|
|
- print_liste_field_titre("Label", $_SERVER['PHP_SELF'], "t.label_operation", "", $options, "", $sortfield, $sortorder);
|
|
|
- print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder);
|
|
|
- print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder);
|
|
|
- print_liste_field_titre("Balance", $_SERVER["PHP_SELF"], "", $options, "", 'align="right"', $sortfield, $sortorder);
|
|
|
- print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $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", "", $param, "", $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", "", $param, 'align="right"', $sortfield, $sortorder);
|
|
|
+ print_liste_field_titre("Balance", $_SERVER["PHP_SELF"], "", $param, "", 'align="right"', $sortfield, $sortorder);
|
|
|
+ print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder);
|
|
|
print "</tr>\n";
|
|
|
|
|
|
$total_debit = 0;
|