diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index 817d6dc84e9..537585a63d9 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -89,8 +89,8 @@ $arrayfields=array( 'accountype'=>array('label'=>$langs->trans("Type"), 'checked'=>1), 'b.label'=>array('label'=>$langs->trans("Label"), 'checked'=>1), 'b.number'=>array('label'=>$langs->trans("AccountIdShort"), 'checked'=>1), - 'b.account_number'=>array('label'=>$langs->trans("AccountAccounting"), 'checked'=>$conf->accountancy->enabled), - 'b.fk_accountancy_journal'=>array('label'=>$langs->trans("AccountancyJournal"), 'checked'=>$conf->accountancy->enabled), + 'b.account_number'=>array('label'=>$langs->trans("AccountAccounting"), 'checked'=>$conf->accounting->enabled), + 'b.fk_accountancy_journal'=>array('label'=>$langs->trans("AccountancyJournal"), 'checked'=>$conf->accounting->enabled), 'toreconcile'=>array('label'=>$langs->trans("TransactionsToConciliate"), 'checked'=>1), 'b.currency_code'=>array('label'=>$langs->trans("Currency"), 'checked'=>0), 'b.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php index 3f8a7c092b8..325c504af42 100644 --- a/htdocs/core/modules/modAccounting.class.php +++ b/htdocs/core/modules/modAccounting.class.php @@ -71,73 +71,88 @@ class modAccounting extends DolibarrModules $this->langfiles = array("accountancy","compta"); // Constants + // List of particular constants to add when module is enabled (key, 'chaine', value, desc, visible, 'current' or 'allentities', deleteonunactive) + // Example: $this->const=array(0=>array('MYMODULE_MYNEWCONST1','chaine','myvalue','This is a constant to add',1), + // 1=>array('MYMODULE_MYNEWCONST2','chaine','myvalue','This is another constant to add',0, 'current', 1) + // ); $this->const = array(); $this->const[1] = array( "MAIN_COMPANY_CODE_ALWAYS_REQUIRED", "chaine", "1", - "With this constants on, third party code is always required whatever is numbering module behaviour" + "With this constants on, third party code is always required whatever is numbering module behaviour", 0, 'current', 0 ); $this->const[2] = array( "MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED", "chaine", "1", - "With this constants on, bank account number is always required" + "With this constants on, bank account number is always required", 0, 'current', 1 ); $this->const[3] = array( "ACCOUNTING_ACCOUNT_SUSPENSE", "chaine", - "471" + "471", + "", 0, 'current', 0 ); $this->const[4] = array( "ACCOUNTING_ACCOUNT_TRANSFER_CASH", "chaine", - "58" + "58", + "", 0, 'current', 0 ); $this->const[5] = array( "CHARTOFACCOUNTS", "chaine", - "2" + "2", + "", 0, 'current', 0 ); $this->const[6] = array( "ACCOUNTING_EXPORT_MODELCSV", "chaine", - "1" + "1", + "", 0, 'current', 0 ); $this->const[7] = array( "ACCOUNTING_LENGTH_GACCOUNT", "chaine", - "" + "", + "", 0, 'current', 0 ); $this->const[8] = array( "ACCOUNTING_LENGTH_AACCOUNT", "chaine", - "" + "", + "", 0, 'current', 0 ); $this->const[9] = array( "ACCOUNTING_LIST_SORT_VENTILATION_TODO", "yesno", - "1" + "1", + "", 0, 'current', 0 ); $this->const[10] = array( "ACCOUNTING_LIST_SORT_VENTILATION_DONE", "yesno", - "1" + "1", + "", 0, 'current', 0 ); $this->const[11] = array ( "ACCOUNTING_EXPORT_DATE", "chaine", - "%d%m%Y" + "%d%m%Y", + "", 0, 'current', 0 ); $this->const[12] = array( "ACCOUNTING_EXPORT_SEPARATORCSV", "string", - "," + ",", + "", 0, 'current', 0 ); $this->const[13] = array( "ACCOUNTING_EXPORT_FORMAT", "chaine", - "csv" + "csv", + "", 0, 'current', 0 ); // Tabs