Debug accountancy module

This commit is contained in:
Laurent Destailleur 2016-11-06 13:07:49 +01:00
parent 69a6646433
commit 18d1878775
2 changed files with 17 additions and 14 deletions

View File

@ -40,6 +40,22 @@ $langs->load("accountancy");
if (! $user->admin)
accessforbidden();
$limit = GETPOST("limit")?GETPOST("limit","int"):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
if ($page == -1) { $page = 0; }
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
/*
* View
*/
llxHeader('', $langs->trans("ImportAccount"));
$to_import = GETPOST("mesCasesCochees");
@ -90,15 +106,7 @@ if ($_POST["action"] == 'import') {
print '<div><font color="red">' . $langs->trans("EndProcessing") . '</font></div>';
}
/*
* list accounting account from product
*
*/
$page = GETPOST("page");
if ($page < 0)
$page = 0;
$limit = $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION;
$offset = $limit * $page;
// list accounting account from product
$sql = "(SELECT p.rowid as product_id, p.accountancy_code_sell as accounting ";
$sql .= " FROM " . MAIN_DB_PREFIX . "product as p ";

View File

@ -143,11 +143,6 @@ class modAccounting extends DolibarrModules
"chaine",
""
);
$this->const[12] = array(
"ACCOUNTING_LIMIT_LIST_VENTILATION",
"chaine",
"50"
);
$this->const[13] = array(
"ACCOUNTING_LIST_SORT_VENTILATION_TODO",
"yesno",