diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php
index 26ea76d2277..89ba3a200b8 100644
--- a/htdocs/accountancy/admin/index.php
+++ b/htdocs/accountancy/admin/index.php
@@ -226,82 +226,78 @@ print '
';
print ''.$langs->trans('Options').' ';
print " \n";
-if (!empty($user->admin))
+// TO DO Mutualize code for yes/no constants
+
+/* Set this option as a hidden option but keep it for some needs.
+print '';
+print ''.$langs->trans("ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL").' ';
+if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) {
+ print '';
+ print img_picto($langs->trans("Activated"), 'switch_on');
+ print ' ';
+} else {
+ print '';
+ print img_picto($langs->trans("Disabled"), 'switch_off');
+ print ' ';
+}
+print ' ';
+*/
+
+print '';
+print ''.$langs->trans("BANK_DISABLE_DIRECT_INPUT").' ';
+if (!empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) {
+ print '';
+ print img_picto($langs->trans("Activated"), 'switch_on');
+ print ' ';
+} else {
+ print '';
+ print img_picto($langs->trans("Disabled"), 'switch_off');
+ print ' ';
+}
+print ' ';
+
+print '';
+print ''.$langs->trans("ACCOUNTANCY_COMBO_FOR_AUX").' ';
+if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) {
+ print '';
+ print img_picto($langs->trans("Activated"), 'switch_on');
+ print ' ';
+} else {
+ print '';
+ print img_picto($langs->trans("Disabled"), 'switch_off');
+ print ' ';
+}
+print ' ';
+
+print '';
+print ''.$langs->trans("ACCOUNTING_MANAGE_ZERO").' ';
+if (!empty($conf->global->ACCOUNTING_MANAGE_ZERO)) {
+ print '';
+ print img_picto($langs->trans("Activated"), 'switch_on');
+ print ' ';
+} else {
+ print '';
+ print img_picto($langs->trans("Disabled"), 'switch_off');
+ print ' ';
+}
+print ' ';
+
+// Param a user $user->rights->accounting->chartofaccount can access
+foreach ($list as $key)
{
- // TO DO Mutualize code for yes/no constants
+ print '';
- /* Set this option as a hidden option but keep it for some needs.
- print ' ';
- print ''.$langs->trans("ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL").' ';
- if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) {
- print '';
- print img_picto($langs->trans("Activated"), 'switch_on');
- print ' ';
- } else {
- print '';
- print img_picto($langs->trans("Disabled"), 'switch_off');
- print ' ';
- }
+ if (!empty($conf->global->ACCOUNTING_MANAGE_ZERO) && ($key == 'ACCOUNTING_LENGTH_GACCOUNT' || $key == 'ACCOUNTING_LENGTH_AACCOUNT')) continue;
+
+ // Param
+ $label = $langs->trans($key);
+ print ''.$label.' ';
+ // Value
+ print '';
+ print ' ';
+
+ print ' ';
print ' ';
- */
-
- print '';
- print ''.$langs->trans("BANK_DISABLE_DIRECT_INPUT").' ';
- if (!empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) {
- print '';
- print img_picto($langs->trans("Activated"), 'switch_on');
- print ' ';
- } else {
- print '';
- print img_picto($langs->trans("Disabled"), 'switch_off');
- print ' ';
- }
- print ' ';
-
- print '';
- print ''.$langs->trans("ACCOUNTANCY_COMBO_FOR_AUX").' ';
- if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) {
- print '';
- print img_picto($langs->trans("Activated"), 'switch_on');
- print ' ';
- } else {
- print '';
- print img_picto($langs->trans("Disabled"), 'switch_off');
- print ' ';
- }
- print ' ';
-
- print '';
- print ''.$langs->trans("ACCOUNTING_MANAGE_ZERO").' ';
- if (!empty($conf->global->ACCOUNTING_MANAGE_ZERO)) {
- print '';
- print img_picto($langs->trans("Activated"), 'switch_on');
- print ' ';
- } else {
- print '';
- print img_picto($langs->trans("Disabled"), 'switch_off');
- print ' ';
- }
- print ' ';
-
- // Param a user $user->rights->accounting->chartofaccount can access
- foreach ($list as $key)
- {
- print '';
-
- if (!empty($conf->global->ACCOUNTING_MANAGE_ZERO) && ($key == 'ACCOUNTING_LENGTH_GACCOUNT' || $key == 'ACCOUNTING_LENGTH_AACCOUNT')) continue;
-
- // Param
- $label = $langs->trans($key);
- print ''.$label.' ';
- // Value
- print '';
- print ' ';
-
- print ' ';
-
- print ' ';
- }
}
print '';
print ' ';
@@ -312,58 +308,53 @@ print '';
print ''.$langs->trans('BindingOptions').' ';
print " \n";
-if (!empty($user->admin))
-{
- // TO DO Mutualize code for yes/no constants
- print '';
- print ''.$langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_TODO").' ';
- if (!empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO)) {
- print '';
- print img_picto($langs->trans("Activated"), 'switch_on');
- print ' ';
- } else {
- print '';
- print img_picto($langs->trans("Disabled"), 'switch_off');
- print ' ';
- }
- print ' ';
-
- print '';
- print ''.$langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_DONE").' ';
- if (!empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE)) {
- print '';
- print img_picto($langs->trans("Activated"), 'switch_on');
- print ' ';
- } else {
- print '';
- print img_picto($langs->trans("Disabled"), 'switch_off');
- print ' ';
- }
- print ' ';
+// TO DO Mutualize code for yes/no constants
+print '';
+print ''.$langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_TODO").' ';
+if (!empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO)) {
+ print '';
+ print img_picto($langs->trans("Activated"), 'switch_on');
+ print ' ';
+} else {
+ print '';
+ print img_picto($langs->trans("Disabled"), 'switch_off');
+ print ' ';
}
+print ' ';
+
+print '';
+print ''.$langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_DONE").' ';
+if (!empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE)) {
+ print '';
+ print img_picto($langs->trans("Activated"), 'switch_on');
+ print ' ';
+} else {
+ print '';
+ print img_picto($langs->trans("Disabled"), 'switch_off');
+ print ' ';
+}
+print ' ';
// Param a user $user->rights->accounting->chartofaccount can access
foreach ($list_binding as $key)
{
- print '';
+ print ' ';
- // Param
- $label = $langs->trans($key);
- print ''.$label.' ';
- // Value
- print '';
- if ($key == 'ACCOUNTING_DATE_START_BINDING') {
+ // Param
+ $label = $langs->trans($key);
+ print ' '.$label.' ';
+ // Value
+ print '';
+ if ($key == 'ACCOUNTING_DATE_START_BINDING') {
print $form->selectDate(($conf->global->$key ? $db->idate($conf->global->$key) : -1), $key, 0, 0, 1);
} else {
print ' ';
}
- print ' ';
-
- print ' ';
+ print '';
+ print '';
}
-
print '';
print '
';