diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php
index 6ac97260e61..872f279ccc2 100644
--- a/htdocs/accountancy/admin/account.php
+++ b/htdocs/accountancy/admin/account.php
@@ -31,7 +31,10 @@ require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.
// Langs
$langs->load("compta");
+$langs->load("bills");
+$langs->load("admin");
$langs->load("accountancy");
+$langs->load("salaries");
$mesg = '';
$action = GETPOST('action');
diff --git a/htdocs/accountancy/admin/defaultaccounts.php b/htdocs/accountancy/admin/defaultaccounts.php
index 0e879acd0aa..51b530cbc12 100644
--- a/htdocs/accountancy/admin/defaultaccounts.php
+++ b/htdocs/accountancy/admin/defaultaccounts.php
@@ -48,15 +48,6 @@ if (! empty($user->rights->accountancy->chartofaccount))
$action = GETPOST('action', 'alpha');
-// Parameters ACCOUNTING_* and others
-$list = array (
- //'ACCOUNTING_LIMIT_LIST_VENTILATION', Useless, we can change value dynamically, so we use default global setup
- 'ACCOUNTING_MANAGE_ZERO',
- 'ACCOUNTING_LENGTH_GACCOUNT',
- 'ACCOUNTING_LENGTH_AACCOUNT' ,
- 'ACCOUNTING_LENGTH_DESCRIPTION', // adjust size displayed for lines description for dol_trunc
- 'ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT', // adjust size displayed for select account description for dol_trunc
-);
$list_account = array (
'ACCOUNTING_ACCOUNT_SUPPLIER',
@@ -99,25 +90,6 @@ if (GETPOST('change_chart'))
if ($action == 'update') {
$error = 0;
- $chartofaccounts = GETPOST('chartofaccounts', 'int');
-
- if (! empty($chartofaccounts)) {
-
- if (! dolibarr_set_const($db, 'CHARTOFACCOUNTS', $chartofaccounts, 'chaine', 0, '', $conf->entity)) {
- $error ++;
- }
- } else {
- $error ++;
- }
-
- foreach ( $list as $constname ) {
- $constvalue = GETPOST($constname, 'alpha');
-
- if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
- $error ++;
- }
- }
-
foreach ( $list_account as $constname ) {
$constvalue = GETPOST($constname, 'alpha');
@@ -133,56 +105,6 @@ if ($action == 'update') {
}
}
-// TO DO Mutualize code for yes/no constants
-if ($action == 'setlistsorttodo') {
- $setlistsorttodo = GETPOST('value', 'int');
- $res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_TODO", $setlistsorttodo, 'yesno', 0, '', $conf->entity);
- if (! $res > 0)
- $error ++;
-
- if (! $error) {
- setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
- } else {
- setEventMessages($langs->trans("Error"), null, 'mesgs');
- }
-}
-
-if ($action == 'setlistsortdone') {
- $setlistsortdone = GETPOST('value', 'int');
- $res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_DONE", $setlistsortdone, 'yesno', 0, '', $conf->entity);
- if (! $res > 0)
- $error ++;
- if (! $error) {
- setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
- } else {
- setEventMessages($langs->trans("Error"), null, 'mesgs');
- }
-}
-
-if ($action == 'setmanagezero') {
- $setmanagezero = GETPOST('value', 'int');
- $res = dolibarr_set_const($db, "ACCOUNTING_MANAGE_ZERO", $setmanagezero, 'yesno', 0, '', $conf->entity);
- if (! $res > 0)
- $error ++;
- if (! $error) {
- setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
- } else {
- setEventMessages($langs->trans("Error"), null, 'mesgs');
- }
-}
-
-if ($action == 'setdisabledirectinput') {
- $setdisabledirectinput = GETPOST('value', 'int');
- $res = dolibarr_set_const($db, "BANK_DISABLE_DIRECT_INPUT", $setdisabledirectinput, 'yesno', 0, '', $conf->entity);
- if (! $res > 0)
- $error ++;
- if (! $error) {
- setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
- } else {
- setEventMessages($langs->trans("Error"), null, 'mesgs');
- }
-}
-
/*
* View
@@ -196,149 +118,34 @@ $formaccountancy = new FormVentilation($db);
$linkback = '';
print load_fiche_titre($langs->trans('MenuDefaultAccounts'), $linkback, 'title_accountancy');
+print '
';
+print $langs->trans("DefaultBindingDesc").'
';
+print '
';
print '