@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * \ingroup titre |
24 | 24 | * \brief Description and activation file for module titre |
25 | 25 | */ |
26 | -include_once DOL_DOCUMENT_ROOT . "/core/modules/DolibarrModules.class.php"; |
|
26 | +include_once DOL_DOCUMENT_ROOT."/core/modules/DolibarrModules.class.php"; |
|
27 | 27 | |
28 | 28 | /** |
29 | 29 | * Description and activation class for module titre |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $this->version = '3.1.4'; |
67 | 67 | // Key used in llx_const table to save module status enabled/disabled |
68 | 68 | // (where MYMODULE is value of property name of module in uppercase) |
69 | - $this->const_name = 'MAIN_MODULE_' . strtoupper($this->name); |
|
69 | + $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); |
|
70 | 70 | // Where to store the module in setup page |
71 | 71 | // (0=common,1=interface,2=others,3=very specific) |
72 | 72 | $this->special = 2; |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | // List of modules id that must be enabled if this module is enabled |
126 | 126 | $this->depends = array(); |
127 | 127 | |
128 | - $this->conflictwith=array('modMilestone'); |
|
128 | + $this->conflictwith = array('modMilestone'); |
|
129 | 129 | // List of modules id to disable if this one is disabled |
130 | 130 | $this->requiredby = array(); |
131 | 131 | // Minimum version of PHP required by module |
@@ -190,20 +190,20 @@ discard block |
||
190 | 190 | // 'categories_x' to add a tab in category view |
191 | 191 | // (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member) |
192 | 192 | // Dictionnaries |
193 | - if (! isset($conf->subtotal->enabled)) { |
|
194 | - $conf->subtotal=new stdClass(); |
|
193 | + if (!isset($conf->subtotal->enabled)) { |
|
194 | + $conf->subtotal = new stdClass(); |
|
195 | 195 | $conf->subtotal->enabled = 0; |
196 | 196 | } |
197 | 197 | $this->dictionaries = array( |
198 | 198 | 'langs'=>'subtotal@subtotal', |
199 | - 'tabname'=>array(MAIN_DB_PREFIX.'c_subtotal_free_text'), // List of tables we want to see into dictonnary editor |
|
200 | - 'tablib'=>array($langs->trans('subtotalFreeLineDictionary')), // Label of tables |
|
201 | - 'tabsql'=>array('SELECT f.rowid as rowid, f.label, f.content, f.entity, f.active FROM '.MAIN_DB_PREFIX.'c_subtotal_free_text as f WHERE f.entity='.$conf->entity), // Request to select fields |
|
202 | - 'tabsqlsort'=>array('label ASC'), // Sort order |
|
203 | - 'tabfield'=>array('label,content'), // List of fields (result of select to show dictionary) |
|
204 | - 'tabfieldvalue'=>array('label,content'), // List of fields (list of fields to edit a record) |
|
205 | - 'tabfieldinsert'=>array('label,content,entity'), // List of fields (list of fields for insert) |
|
206 | - 'tabrowid'=>array('rowid'), // Name of columns with primary key (try to always name it 'rowid') |
|
199 | + 'tabname'=>array(MAIN_DB_PREFIX.'c_subtotal_free_text'), // List of tables we want to see into dictonnary editor |
|
200 | + 'tablib'=>array($langs->trans('subtotalFreeLineDictionary')), // Label of tables |
|
201 | + 'tabsql'=>array('SELECT f.rowid as rowid, f.label, f.content, f.entity, f.active FROM '.MAIN_DB_PREFIX.'c_subtotal_free_text as f WHERE f.entity='.$conf->entity), // Request to select fields |
|
202 | + 'tabsqlsort'=>array('label ASC'), // Sort order |
|
203 | + 'tabfield'=>array('label,content'), // List of fields (result of select to show dictionary) |
|
204 | + 'tabfieldvalue'=>array('label,content'), // List of fields (list of fields to edit a record) |
|
205 | + 'tabfieldinsert'=>array('label,content,entity'), // List of fields (list of fields for insert) |
|
206 | + 'tabrowid'=>array('rowid'), // Name of columns with primary key (try to always name it 'rowid') |
|
207 | 207 | 'tabcond'=>array($conf->subtotal->enabled) |
208 | 208 | ); |
209 | 209 | /* Example: |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | |
479 | 479 | $extra = new ExtraFields($db); // propaldet, commandedet, facturedet |
480 | 480 | $TElementType = array('propaldet', 'commandedet', 'facturedet', 'supplier_proposaldet', 'commande_fournisseurdet', 'facture_fourn_det'); |
481 | - foreach($TElementType as $element_type) { |
|
481 | + foreach ($TElementType as $element_type) { |
|
482 | 482 | $extra->addExtraField('show_total_ht', 'Afficher le Total HT sur le sous-total', 'int', 0, 10, $element_type, 0, 0, '', unserialize('a:1:{s:7:"options";a:1:{s:0:"";N;}}'), 0, '', 0, 1); |
483 | 483 | $extra->addExtraField('show_reduc', 'Afficher la réduction sur le sous-total', 'int', 0, 10, $element_type, 0, 0, '', unserialize('a:1:{s:7:"options";a:1:{s:0:"";N;}}'), 0, '', 0, 1); |
484 | 484 | } |