Passed
Push — master ( e613a5...a34d33 )
by
unknown
01:38
created
core/modules/modSubtotal.class.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
66 66
         $this->version = '3.2.0';
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;
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         // List of modules id that must be enabled if this module is enabled
129 129
         $this->depends = array();
130 130
 
131
-		$this->conflictwith=array('modMilestone');
131
+		$this->conflictwith = array('modMilestone');
132 132
         // List of modules id to disable if this one is disabled
133 133
         $this->requiredby = array();
134 134
         // Minimum version of PHP required by module
@@ -193,20 +193,20 @@  discard block
 block discarded – undo
193 193
         // 'categories_x'		to add a tab in category view
194 194
         // (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member)
195 195
         // Dictionnaries
196
-        if (! isset($conf->subtotal->enabled)) {
197
-            $conf->subtotal=new stdClass();
196
+        if (!isset($conf->subtotal->enabled)) {
197
+            $conf->subtotal = new stdClass();
198 198
             $conf->subtotal->enabled = 0;
199 199
         }
200 200
         $this->dictionaries = array(
201 201
 			'langs'=>'subtotal@subtotal',
202
-            'tabname'=>array(MAIN_DB_PREFIX.'c_subtotal_free_text'),		// List of tables we want to see into dictonnary editor
203
-            'tablib'=>array($langs->trans('subtotalFreeLineDictionary')),													// Label of tables
204
-            '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
205
-            'tabsqlsort'=>array('label ASC'),																					// Sort order
206
-            'tabfield'=>array('label,content'),							// List of fields (result of select to show dictionary)
207
-            'tabfieldvalue'=>array('label,content'),						// List of fields (list of fields to edit a record)
208
-            'tabfieldinsert'=>array('label,content,entity'),					// List of fields (list of fields for insert)
209
-            'tabrowid'=>array('rowid'),											// Name of columns with primary key (try to always name it 'rowid')
202
+            'tabname'=>array(MAIN_DB_PREFIX.'c_subtotal_free_text'), // List of tables we want to see into dictonnary editor
203
+            'tablib'=>array($langs->trans('subtotalFreeLineDictionary')), // Label of tables
204
+            '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
205
+            'tabsqlsort'=>array('label ASC'), // Sort order
206
+            'tabfield'=>array('label,content'), // List of fields (result of select to show dictionary)
207
+            'tabfieldvalue'=>array('label,content'), // List of fields (list of fields to edit a record)
208
+            'tabfieldinsert'=>array('label,content,entity'), // List of fields (list of fields for insert)
209
+            'tabrowid'=>array('rowid'), // Name of columns with primary key (try to always name it 'rowid')
210 210
             'tabcond'=>array($conf->subtotal->enabled)	
211 211
 		);
212 212
         /* Example:
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
 	
482 482
         $extra = new ExtraFields($db); // propaldet, commandedet, facturedet
483 483
         $TElementType = array('propaldet', 'commandedet', 'facturedet', 'supplier_proposaldet', 'commande_fournisseurdet', 'facture_fourn_det');
484
-        foreach($TElementType as $element_type) {
484
+        foreach ($TElementType as $element_type) {
485 485
             $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);
486 486
             $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);
487 487
         }
Please login to merge, or discard this patch.