diff --git a/htdocs/accountancy/admin/categories.php b/htdocs/accountancy/admin/categories.php
index 3414c36cd52..2a15921243f 100644
--- a/htdocs/accountancy/admin/categories.php
+++ b/htdocs/accountancy/admin/categories.php
@@ -45,6 +45,26 @@ if ($cat_id == 0) {
$cat_id = null;
}
+// Load variable for pagination
+$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
+$sortfield = GETPOST('sortfield', 'aZ09comma');
+$sortorder = GETPOST('sortorder', 'aZ09comma');
+$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
+if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
+ // If $page is not defined, or '' or -1 or if we click on clear filters
+ $page = 0;
+}
+$offset = $limit * $page;
+$pageprev = $page - 1;
+$pagenext = $page + 1;
+
+if (empty($sortfield)) {
+ $sortfield = 'account_number';
+}
+if (empty($sortorder)) {
+ $sortorder = 'ASC';
+}
+
// Security check
if (!$user->hasRight('accounting', 'chartofaccount')) {
accessforbidden();
@@ -137,14 +157,6 @@ if (!empty($cat_id)) {
if (is_array($accountingcategory->lines_cptbk) && count($accountingcategory->lines_cptbk) > 0) {
print img_picto($langs->trans("AccountingAccount"), 'accounting_account', 'class="pictofixedwith"');
print $form->multiselectarray('cpt_bk', $arraykeyvalue, GETPOST('cpt_bk', 'array'), null, null, '', 0, "80%", '', '', $langs->transnoentitiesnoconv("AddAccountFromBookKeepingWithNoCategories"));
- //print '
';
- /*print '
';
- print ajax_combobox('cpt_bk');
- */
print ' ';
}
}
@@ -152,13 +164,16 @@ if (!empty($cat_id)) {
print '';
-if ($action == 'display' || $action == 'delete') {
+if ((empty($action) || $action == 'display' || $action == 'delete') && $cat_id > 0) {
+ $param = 'account_category='.((int) $cat_id);
+
print '
';
print '
| '.$langs->trans("AccountAccounting")." | "; - print ''.$langs->trans("Label")." | "; - print "||||
| '.length_accountg($cpt->account_number).' | '; diff --git a/htdocs/compta/resultat/result.php b/htdocs/compta/resultat/result.php index cb2158bb48b..4bbb20b18a1 100644 --- a/htdocs/compta/resultat/result.php +++ b/htdocs/compta/resultat/result.php @@ -322,7 +322,7 @@ if ($modecompta == 'CREANCES-DETTES') { // Year NP print ''; print dol_escape_htmltag($cat['code']); - print ' | '; + print ' | '; print dol_escape_htmltag($cat['label']); print ' | '; @@ -507,7 +507,7 @@ if ($modecompta == 'CREANCES-DETTES') { } else { $labeltoshow .= ' - '.$langs->trans("GroupIsEmptyCheckSetup").''; } - print ''; + print ' | '; print $labeltoshow; print ' | '; @@ -537,7 +537,7 @@ if ($modecompta == 'CREANCES-DETTES') { if ($showaccountdetail == 'all' || $resultN != 0) { print '
| '; - print ' | '; + print ' | '; print ' '.length_accountg($cpt['account_number']); print ' - '; print $cpt['account_label']; | |||