Completed
Branch develop (b5f2d2)
by
unknown
20:52
created
htdocs/core/boxes/box_last_modified_knowledgerecord.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 				$sql .= " AND k.fk_soc= ".((int) $user->socid);
119 119
 			}
120 120
 
121
-			$sql.= " AND k.status > 0";
121
+			$sql .= " AND k.status > 0";
122 122
 
123 123
 			$sql .= " ORDER BY k.tms DESC, k.rowid DESC ";
124 124
 			$sql .= $this->db->plimit($max, 0);
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 					$labellang = ($objp->lang ? $langs->trans('Language_'.$objp->lang) : '');
164 164
 					$this->info_box_contents[$i][$r] = array(
165 165
 						'td' => 'class="tdoverflowmax100"',
166
-						'text' => picto_from_langcode($objp->lang, 'class="paddingrightonly saturatemedium opacitylow"') . $labellang,
166
+						'text' => picto_from_langcode($objp->lang, 'class="paddingrightonly saturatemedium opacitylow"').$labellang,
167 167
 						'asis' => 1,
168 168
 					);
169 169
 					$r++;
Please login to merge, or discard this patch.
htdocs/core/boxes/box_last_knowledgerecord.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 				$sql .= " AND k.fk_soc= ".((int) $user->socid);
119 119
 			}
120 120
 
121
-			$sql.= " AND k.status > 0";
121
+			$sql .= " AND k.status > 0";
122 122
 
123 123
 			$sql .= " ORDER BY k.date_creation DESC, k.rowid DESC ";
124 124
 			$sql .= $this->db->plimit($max, 0);
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 					$labellang = ($objp->lang ? $langs->trans('Language_'.$objp->lang) : '');
164 164
 					$this->info_box_contents[$i][$r] = array(
165 165
 						'td' => 'class="tdoverflowmax100"',
166
-						'text' => picto_from_langcode($objp->lang, 'class="paddingrightonly saturatemedium opacitylow"') . $labellang,
166
+						'text' => picto_from_langcode($objp->lang, 'class="paddingrightonly saturatemedium opacitylow"').$labellang,
167 167
 						'asis' => 1,
168 168
 					);
169 169
 					$r++;
Please login to merge, or discard this patch.
htdocs/hrm/evaluation_agenda.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,9 @@
 block discarded – undo
100 100
 if (!isModEnabled('hrm')) {
101 101
 	accessforbidden();
102 102
 }
103
-if (!$permissiontoread) accessforbidden();
103
+if (!$permissiontoread) {
104
+	accessforbidden();
105
+}
104 106
 
105 107
 
106 108
 /*
Please login to merge, or discard this patch.
htdocs/user/virtualcard.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 	print $langs->trans("Text");
289 289
 	print '</td><td>';
290 290
 	require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
291
-	$extendededitor = 0;	// We force no WYSIWYG editor
291
+	$extendededitor = 0; // We force no WYSIWYG editor
292 292
 	$doleditor = new DolEditor('USER_PUBLIC_MORE', getDolUserString('USER_PUBLIC_MORE', '', $object), '', 160, 'dolibarr_notes', '', false, false, $extendededitor, ROWS_5, '90%');
293 293
 	$doleditor->Create();
294 294
 	print "</td></tr>\n";
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
 
303 303
 	print '<br>';
304 304
 
305
-	print '</div>';	// End hide/show
305
+	print '</div>'; // End hide/show
306 306
 
307 307
 	print '<br>';
308 308
 
Please login to merge, or discard this patch.
htdocs/barcode/printsheet.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@
 block discarded – undo
116 116
 		setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BarcodeValue")), null, 'errors');
117 117
 		$error++;
118 118
 	}
119
-	$MAXLENGTH = 51200;	// Limit set to 50Ko
119
+	$MAXLENGTH = 51200; // Limit set to 50Ko
120 120
 	if (dol_strlen($forbarcode) > $MAXLENGTH) {			// barcode value
121 121
 		setEventMessages($langs->trans("ErrorFieldTooLong", $langs->transnoentitiesnoconv("BarcodeValue")).' ('.$langs->trans("RequireXStringMax", $MAXLENGTH).')', null, 'errors');
122 122
 		$error++;
Please login to merge, or discard this patch.
htdocs/product/stock/stats/commande_fournisseur.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@
 block discarded – undo
39 39
 
40 40
 $id = GETPOST('id', 'int');
41 41
 $ref = GETPOST('ref', 'alpha');
42
-$batch  	= GETPOST('batch', 'alpha');
43
-$objectid  = GETPOST('productid', 'int');
42
+$batch = GETPOST('batch', 'alpha');
43
+$objectid = GETPOST('productid', 'int');
44 44
 
45 45
 // Security check
46 46
 $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : ''));
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,9 @@
 block discarded – undo
81 81
 	$search_year = '';
82 82
 }
83 83
 
84
-if (!$user->hasRight('produit', 'lire')) accessforbidden();
84
+if (!$user->hasRight('produit', 'lire')) {
85
+	accessforbidden();
86
+}
85 87
 
86 88
 
87 89
 /*
Please login to merge, or discard this patch.
htdocs/product/stock/stats/mo.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 
260 260
 			$motmp = new Mo($db);
261 261
 
262
-			$total_consumed=$total_produced=0;
262
+			$total_consumed = $total_produced = 0;
263 263
 
264 264
 			if ($num > 0) {
265 265
 				while ($i < min($num, $limit)) {
@@ -269,8 +269,8 @@  discard block
 block discarded – undo
269 269
 					$motmp->ref = $objp->ref;
270 270
 					$motmp->status = $objp->status;
271 271
 
272
-					$total_consumed+=$objp->nb_consumed;
273
-					$total_produced+=$objp->nb_produced;
272
+					$total_consumed += $objp->nb_consumed;
273
+					$total_produced += $objp->nb_produced;
274 274
 
275 275
 					print '<tr class="oddeven">';
276 276
 					print '<td>';
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,9 @@
 block discarded – undo
81 81
 	$search_year = '';
82 82
 }
83 83
 
84
-if (!$user->hasRight('produit', 'lire')) accessforbidden();
84
+if (!$user->hasRight('produit', 'lire')) {
85
+	accessforbidden();
86
+}
85 87
 
86 88
 
87 89
 /*
Please login to merge, or discard this patch.
htdocs/product/class/product.class.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -306,10 +306,10 @@  discard block
 block discarded – undo
306 306
 	public $finished;
307 307
 
308 308
 		/**
309
-	 * fk_default_bom indicates the default bom
310
-	 *
311
-	 * @var int
312
-	 */
309
+		 * fk_default_bom indicates the default bom
310
+		 *
311
+		 * @var int
312
+		 */
313 313
 	public $fk_default_bom;
314 314
 
315 315
 	/**
@@ -6360,12 +6360,12 @@  discard block
 block discarded – undo
6360 6360
 
6361 6361
 
6362 6362
 		/**
6363
-	 *	Return clicable link of object (with eventually picto)
6364
-	 *
6365
-	 *	@param      string	    $option                 Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
6366
-	 *  @param		array		$arraydata				Array of data
6367
-	 *  @return		string								HTML Code for Kanban thumb.
6368
-	 */
6363
+		 *	Return clicable link of object (with eventually picto)
6364
+		 *
6365
+		 *	@param      string	    $option                 Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
6366
+		 *  @param		array		$arraydata				Array of data
6367
+		 *  @return		string								HTML Code for Kanban thumb.
6368
+		 */
6369 6369
 	public function getKanbanView($option = '', $arraydata = null)
6370 6370
 	{
6371 6371
 		global $langs,$conf;
Please login to merge, or discard this patch.
Spacing   +81 added lines, -81 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 	 */
141 141
 	public $price;
142 142
 
143
-	public $price_formated;			// used by takepos/ajax/ajax.php
143
+	public $price_formated; // used by takepos/ajax/ajax.php
144 144
 
145 145
 	/**
146 146
 	 * Selling price with tax
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 	 */
150 150
 	public $price_ttc;
151 151
 
152
-	public $price_ttc_formated;		// used by takepos/ajax/ajax.php
152
+	public $price_ttc_formated; // used by takepos/ajax/ajax.php
153 153
 
154 154
 	/**
155 155
 	 * Minimum price net
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 	public $packaging;
229 229
 
230 230
 
231
-	public $lifetime;	// In seconds
231
+	public $lifetime; // In seconds
232 232
 
233 233
 	public $qc_frequency;
234 234
 
@@ -382,20 +382,20 @@  discard block
 block discarded – undo
382 382
 
383 383
 	//! Metric of products
384 384
 	public $weight;
385
-	public $weight_units;	// scale -3, 0, 3, 6
385
+	public $weight_units; // scale -3, 0, 3, 6
386 386
 	public $length;
387
-	public $length_units;	// scale -3, 0, 3, 6
387
+	public $length_units; // scale -3, 0, 3, 6
388 388
 	public $width;
389
-	public $width_units;	// scale -3, 0, 3, 6
389
+	public $width_units; // scale -3, 0, 3, 6
390 390
 	public $height;
391
-	public $height_units;	// scale -3, 0, 3, 6
391
+	public $height_units; // scale -3, 0, 3, 6
392 392
 	public $surface;
393
-	public $surface_units;	// scale -3, 0, 3, 6
393
+	public $surface_units; // scale -3, 0, 3, 6
394 394
 	public $volume;
395
-	public $volume_units;	// scale -3, 0, 3, 6
395
+	public $volume_units; // scale -3, 0, 3, 6
396 396
 
397 397
 	public $net_measure;
398
-	public $net_measure_units;	// scale -3, 0, 3, 6
398
+	public $net_measure_units; // scale -3, 0, 3, 6
399 399
 
400 400
 	public $accountancy_code_sell;
401 401
 	public $accountancy_code_sell_intra;
@@ -582,7 +582,7 @@  discard block
 block discarded – undo
582 582
 		'import_key'    =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'index'=>0, 'position'=>1000),
583 583
 		//'tosell'       =>array('type'=>'integer',      'label'=>'Status',           'enabled'=>1, 'visible'=>1,  'notnull'=>1, 'default'=>0, 'index'=>1,  'position'=>1000, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Active', -1=>'Cancel')),
584 584
 		//'tobuy'        =>array('type'=>'integer',      'label'=>'Status',           'enabled'=>1, 'visible'=>1,  'notnull'=>1, 'default'=>0, 'index'=>1,  'position'=>1000, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Active', -1=>'Cancel')),
585
-		'mandatory_period' => array('type'=>'integer', 'label'=>'mandatoryperiod', 'enabled'=>1, 'visible'=>1,  'notnull'=>1, 'default'=>0, 'index'=>1,  'position'=>1000),
585
+		'mandatory_period' => array('type'=>'integer', 'label'=>'mandatoryperiod', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'default'=>0, 'index'=>1, 'position'=>1000),
586 586
 	);
587 587
 
588 588
 	/**
@@ -872,9 +872,9 @@  discard block
 block discarded – undo
872 872
 
873 873
 							// update accountancy for this entity
874 874
 							if (!$error && getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) {
875
-								$this->db->query("DELETE FROM " . $this->db->prefix() . "product_perentity WHERE fk_product = " .((int) $this->id) . " AND entity = " . ((int) $conf->entity));
875
+								$this->db->query("DELETE FROM ".$this->db->prefix()."product_perentity WHERE fk_product = ".((int) $this->id)." AND entity = ".((int) $conf->entity));
876 876
 
877
-								$sql = "INSERT INTO " . $this->db->prefix() . "product_perentity (";
877
+								$sql = "INSERT INTO ".$this->db->prefix()."product_perentity (";
878 878
 								$sql .= " fk_product";
879 879
 								$sql .= ", entity";
880 880
 								$sql .= ", accountancy_code_buy";
@@ -885,13 +885,13 @@  discard block
 block discarded – undo
885 885
 								$sql .= ", accountancy_code_sell_export";
886 886
 								$sql .= ") VALUES (";
887 887
 								$sql .= $this->id;
888
-								$sql .= ", " . $conf->entity;
889
-								$sql .= ", '" . $this->db->escape($this->accountancy_code_buy) . "'";
890
-								$sql .= ", '" . $this->db->escape($this->accountancy_code_buy_intra) . "'";
891
-								$sql .= ", '" . $this->db->escape($this->accountancy_code_buy_export) . "'";
892
-								$sql .= ", '" . $this->db->escape($this->accountancy_code_sell) . "'";
893
-								$sql .= ", '" . $this->db->escape($this->accountancy_code_sell_intra) . "'";
894
-								$sql .= ", '" . $this->db->escape($this->accountancy_code_sell_export) . "'";
888
+								$sql .= ", ".$conf->entity;
889
+								$sql .= ", '".$this->db->escape($this->accountancy_code_buy)."'";
890
+								$sql .= ", '".$this->db->escape($this->accountancy_code_buy_intra)."'";
891
+								$sql .= ", '".$this->db->escape($this->accountancy_code_buy_export)."'";
892
+								$sql .= ", '".$this->db->escape($this->accountancy_code_sell)."'";
893
+								$sql .= ", '".$this->db->escape($this->accountancy_code_sell_intra)."'";
894
+								$sql .= ", '".$this->db->escape($this->accountancy_code_sell_export)."'";
895 895
 								$sql .= ")";
896 896
 								$result = $this->db->query($sql);
897 897
 								if (!$result) {
@@ -1268,12 +1268,12 @@  discard block
 block discarded – undo
1268 1268
 			$sql .= ", note_public = ".(isset($this->note_public) ? "'".$this->db->escape($this->note_public)."'" : 'null');
1269 1269
 			$sql .= ", duration = '".$this->db->escape($this->duration_value.$this->duration_unit)."'";
1270 1270
 			if (!getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) {
1271
-				$sql .= ", accountancy_code_buy = '" . $this->db->escape($this->accountancy_code_buy) . "'";
1272
-				$sql .= ", accountancy_code_buy_intra = '" . $this->db->escape($this->accountancy_code_buy_intra) . "'";
1273
-				$sql .= ", accountancy_code_buy_export = '" . $this->db->escape($this->accountancy_code_buy_export) . "'";
1274
-				$sql .= ", accountancy_code_sell= '" . $this->db->escape($this->accountancy_code_sell) . "'";
1275
-				$sql .= ", accountancy_code_sell_intra= '" . $this->db->escape($this->accountancy_code_sell_intra) . "'";
1276
-				$sql .= ", accountancy_code_sell_export= '" . $this->db->escape($this->accountancy_code_sell_export) . "'";
1271
+				$sql .= ", accountancy_code_buy = '".$this->db->escape($this->accountancy_code_buy)."'";
1272
+				$sql .= ", accountancy_code_buy_intra = '".$this->db->escape($this->accountancy_code_buy_intra)."'";
1273
+				$sql .= ", accountancy_code_buy_export = '".$this->db->escape($this->accountancy_code_buy_export)."'";
1274
+				$sql .= ", accountancy_code_sell= '".$this->db->escape($this->accountancy_code_sell)."'";
1275
+				$sql .= ", accountancy_code_sell_intra= '".$this->db->escape($this->accountancy_code_sell_intra)."'";
1276
+				$sql .= ", accountancy_code_sell_export= '".$this->db->escape($this->accountancy_code_sell_export)."'";
1277 1277
 			}
1278 1278
 			$sql .= ", desiredstock = ".((isset($this->desiredstock) && is_numeric($this->desiredstock)) ? (float) $this->desiredstock : "null");
1279 1279
 			$sql .= ", cost_price = ".($this->cost_price != '' ? $this->db->escape($this->cost_price) : 'null');
@@ -1281,7 +1281,7 @@  discard block
 block discarded – undo
1281 1281
 			$sql .= ", price_autogen = ".(!$this->price_autogen ? 0 : 1);
1282 1282
 			$sql .= ", fk_price_expression = ".($this->fk_price_expression != 0 ? (int) $this->fk_price_expression : 'NULL');
1283 1283
 			$sql .= ", fk_user_modif = ".($user->id > 0 ? $user->id : 'NULL');
1284
-			$sql .= ", mandatory_period = ".($this->mandatory_period );
1284
+			$sql .= ", mandatory_period = ".($this->mandatory_period);
1285 1285
 			// stock field is not here because it is a denormalized value from product_stock.
1286 1286
 			$sql .= " WHERE rowid = ".((int) $id);
1287 1287
 
@@ -1303,9 +1303,9 @@  discard block
 block discarded – undo
1303 1303
 
1304 1304
 				// update accountancy for this entity
1305 1305
 				if (!$error && getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) {
1306
-					$this->db->query("DELETE FROM " . $this->db->prefix() . "product_perentity WHERE fk_product = " . ((int) $this->id) . " AND entity = " . ((int) $conf->entity));
1306
+					$this->db->query("DELETE FROM ".$this->db->prefix()."product_perentity WHERE fk_product = ".((int) $this->id)." AND entity = ".((int) $conf->entity));
1307 1307
 
1308
-					$sql = "INSERT INTO " . $this->db->prefix() . "product_perentity (";
1308
+					$sql = "INSERT INTO ".$this->db->prefix()."product_perentity (";
1309 1309
 					$sql .= " fk_product";
1310 1310
 					$sql .= ", entity";
1311 1311
 					$sql .= ", accountancy_code_buy";
@@ -1316,13 +1316,13 @@  discard block
 block discarded – undo
1316 1316
 					$sql .= ", accountancy_code_sell_export";
1317 1317
 					$sql .= ") VALUES (";
1318 1318
 					$sql .= $this->id;
1319
-					$sql .= ", " . $conf->entity;
1320
-					$sql .= ", '" . $this->db->escape($this->accountancy_code_buy) . "'";
1321
-					$sql .= ", '" . $this->db->escape($this->accountancy_code_buy_intra) . "'";
1322
-					$sql .= ", '" . $this->db->escape($this->accountancy_code_buy_export) . "'";
1323
-					$sql .= ", '" . $this->db->escape($this->accountancy_code_sell) . "'";
1324
-					$sql .= ", '" . $this->db->escape($this->accountancy_code_sell_intra) . "'";
1325
-					$sql .= ", '" . $this->db->escape($this->accountancy_code_sell_export) . "'";
1319
+					$sql .= ", ".$conf->entity;
1320
+					$sql .= ", '".$this->db->escape($this->accountancy_code_buy)."'";
1321
+					$sql .= ", '".$this->db->escape($this->accountancy_code_buy_intra)."'";
1322
+					$sql .= ", '".$this->db->escape($this->accountancy_code_buy_export)."'";
1323
+					$sql .= ", '".$this->db->escape($this->accountancy_code_sell)."'";
1324
+					$sql .= ", '".$this->db->escape($this->accountancy_code_sell_intra)."'";
1325
+					$sql .= ", '".$this->db->escape($this->accountancy_code_sell_export)."'";
1326 1326
 					$sql .= ")";
1327 1327
 					$result = $this->db->query($sql);
1328 1328
 					if (!$result) {
@@ -1334,8 +1334,8 @@  discard block
 block discarded – undo
1334 1334
 				if (!$this->hasbatch() && $this->oldcopy->hasbatch()) {
1335 1335
 					// Selection of all product stock mouvements that contains batchs
1336 1336
 					$sql = 'SELECT pb.qty, pb.fk_entrepot, pb.batch FROM '.MAIN_DB_PREFIX.'product_batch as pb';
1337
-					$sql.= ' INNER JOIN '.MAIN_DB_PREFIX.'product_stock as ps ON (ps.rowid = batch.fk_product_stock)';
1338
-					$sql.= ' WHERE ps.fk_product = '.(int) $this->id;
1337
+					$sql .= ' INNER JOIN '.MAIN_DB_PREFIX.'product_stock as ps ON (ps.rowid = batch.fk_product_stock)';
1338
+					$sql .= ' WHERE ps.fk_product = '.(int) $this->id;
1339 1339
 
1340 1340
 					$resql = $this->db->query($sql);
1341 1341
 					if ($resql) {
@@ -1657,7 +1657,7 @@  discard block
 block discarded – undo
1657 1657
 				}
1658 1658
 			} elseif (isset($this->multilangs[$key])) {
1659 1659
 				if (empty($this->multilangs["$key"]["label"])) {
1660
-					$this->errors[] = $key . ' : ' . $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label"));
1660
+					$this->errors[] = $key.' : '.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label"));
1661 1661
 					return -1;
1662 1662
 				}
1663 1663
 
@@ -1853,7 +1853,7 @@  discard block
 block discarded – undo
1853 1853
 	private function getArrayForPriceCompare($level = 0)
1854 1854
 	{
1855 1855
 
1856
-		$testExit = array('multiprices','multiprices_ttc','multiprices_base_type','multiprices_min','multiprices_min_ttc','multiprices_tva_tx','multiprices_recuperableonly');
1856
+		$testExit = array('multiprices', 'multiprices_ttc', 'multiprices_base_type', 'multiprices_min', 'multiprices_min_ttc', 'multiprices_tva_tx', 'multiprices_recuperableonly');
1857 1857
 
1858 1858
 		foreach ($testExit as $field) {
1859 1859
 			if (!isset($this->$field)) {
@@ -2479,20 +2479,20 @@  discard block
 block discarded – undo
2479 2479
 
2480 2480
 		//For MultiCompany
2481 2481
 		//PMP per entity & Stocks Sharings stock_reel includes only stocks shared with this entity
2482
-		$separatedEntityPMP = false;	// Set to true to get the AWP from table llx_product_perentity instead of field 'pmp' into llx_product.
2483
-		$separatedStock = false;		// Set to true will count stock from subtable llx_product_stock. It is slower than using denormalized field 'stock', but it is required when using multientity and shared warehouses.
2482
+		$separatedEntityPMP = false; // Set to true to get the AWP from table llx_product_perentity instead of field 'pmp' into llx_product.
2483
+		$separatedStock = false; // Set to true will count stock from subtable llx_product_stock. It is slower than using denormalized field 'stock', but it is required when using multientity and shared warehouses.
2484 2484
 		$visibleWarehousesEntities = $conf->entity;
2485 2485
 		if (getDolGlobalString('MULTICOMPANY_PRODUCT_SHARING_ENABLED')) {
2486 2486
 			if (getDolGlobalString('MULTICOMPANY_PMP_PER_ENTITY_ENABLED')) {
2487
-				$checkPMPPerEntity = $this->db->query("SELECT pmp FROM " . $this->db->prefix() . "product_perentity WHERE fk_product = ".((int) $id)." AND entity = ".(int) $conf->entity);
2488
-				if ($this->db->num_rows($checkPMPPerEntity)>0) {
2487
+				$checkPMPPerEntity = $this->db->query("SELECT pmp FROM ".$this->db->prefix()."product_perentity WHERE fk_product = ".((int) $id)." AND entity = ".(int) $conf->entity);
2488
+				if ($this->db->num_rows($checkPMPPerEntity) > 0) {
2489 2489
 					$separatedEntityPMP = true;
2490 2490
 				}
2491 2491
 			}
2492 2492
 			global $mc;
2493 2493
 			$separatedStock = true;
2494 2494
 			if (isset($mc->sharings['stock']) && !empty($mc->sharings['stock'])) {
2495
-				$visibleWarehousesEntities .= "," . implode(",", $mc->sharings['stock']);
2495
+				$visibleWarehousesEntities .= ",".implode(",", $mc->sharings['stock']);
2496 2496
 			}
2497 2497
 		}
2498 2498
 		if ($separatedEntityPMP) {
@@ -2509,10 +2509,10 @@  discard block
 block discarded – undo
2509 2509
 		}
2510 2510
 		$sql .= " FROM ".$this->db->prefix()."product as p";
2511 2511
 		if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED') || $separatedEntityPMP) {
2512
-			$sql .= " LEFT JOIN " . $this->db->prefix() . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity);
2512
+			$sql .= " LEFT JOIN ".$this->db->prefix()."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity);
2513 2513
 		}
2514 2514
 		if ($separatedStock) {
2515
-			$sql .= " LEFT JOIN " . $this->db->prefix() . "product_stock as sp ON sp.fk_product = p.rowid AND sp.fk_entrepot IN (SELECT rowid FROM ".$this->db->prefix()."entrepot WHERE entity IN (".$this->db->sanitize($visibleWarehousesEntities)."))";
2515
+			$sql .= " LEFT JOIN ".$this->db->prefix()."product_stock as sp ON sp.fk_product = p.rowid AND sp.fk_entrepot IN (SELECT rowid FROM ".$this->db->prefix()."entrepot WHERE entity IN (".$this->db->sanitize($visibleWarehousesEntities)."))";
2516 2516
 		}
2517 2517
 
2518 2518
 		if ($id) {
@@ -2666,15 +2666,15 @@  discard block
 block discarded – undo
2666 2666
 						$sql .= " WHERE entity IN (".getEntity('productprice').")";
2667 2667
 						$sql .= " AND price_level=".((int) $i);
2668 2668
 						$sql .= " AND fk_product = ".((int) $this->id);
2669
-						$sql .= " ORDER BY date_price DESC, rowid DESC";	// Get the most recent line
2670
-						$sql .= " LIMIT 1";									// Only the first one
2669
+						$sql .= " ORDER BY date_price DESC, rowid DESC"; // Get the most recent line
2670
+						$sql .= " LIMIT 1"; // Only the first one
2671 2671
 						$resql = $this->db->query($sql);
2672 2672
 						if ($resql) {
2673 2673
 							$result = $this->db->fetch_array($resql);
2674 2674
 
2675 2675
 							$this->multiprices[$i] = $result ? $result["price"] : null;
2676 2676
 							$this->multiprices_ttc[$i] = $result ? $result["price_ttc"] : null;
2677
-							$this->multiprices_min[$i] =  $result ? $result["price_min"] : null;
2677
+							$this->multiprices_min[$i] = $result ? $result["price_min"] : null;
2678 2678
 							$this->multiprices_min_ttc[$i] = $result ? $result["price_min_ttc"] : null;
2679 2679
 							$this->multiprices_base_type[$i] = $result ? $result["price_base_type"] : null;
2680 2680
 							// Next two fields are used only if PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL is on
@@ -2894,7 +2894,7 @@  discard block
 block discarded – undo
2894 2894
 				$obj = $this->db->fetch_object($result);
2895 2895
 				$this->stats_mo['customers_'.$role] = $obj->nb_customers ? $obj->nb_customers : 0;
2896 2896
 				$this->stats_mo['nb_'.$role] = $obj->nb ? $obj->nb : 0;
2897
-				$this->stats_mo['qty_'.$role] = $obj->qty ? price2num($obj->qty, 'MS') : 0;		// qty may be a float due to the SUM()
2897
+				$this->stats_mo['qty_'.$role] = $obj->qty ? price2num($obj->qty, 'MS') : 0; // qty may be a float due to the SUM()
2898 2898
 			} else {
2899 2899
 				$this->error = $this->db->error();
2900 2900
 				$error++;
@@ -4371,7 +4371,7 @@  discard block
 block discarded – undo
4371 4371
 				//Addition of a product with the highest rank +1
4372 4372
 				$sql = "INSERT INTO ".$this->db->prefix()."product_association(fk_product_pere,fk_product_fils,qty,incdec,rang)";
4373 4373
 				$sql .= " VALUES (".((int) $id_pere).", ".((int) $id_fils).", ".price2num($qty, 'MS').", ".price2num($incdec, 'MS').", ".((int) $rank).")";
4374
-				if (! $this->db->query($sql)) {
4374
+				if (!$this->db->query($sql)) {
4375 4375
 					dol_print_error($this->db);
4376 4376
 					return -1;
4377 4377
 				} else {
@@ -4482,17 +4482,17 @@  discard block
 block discarded – undo
4482 4482
 
4483 4483
 		// Updated ranks so that none are missing
4484 4484
 		$sqlrank = "SELECT rowid, rang FROM ".$this->db->prefix()."product_association";
4485
-		$sqlrank.= " WHERE fk_product_pere = ".((int) $fk_parent);
4486
-		$sqlrank.= " ORDER BY rang";
4485
+		$sqlrank .= " WHERE fk_product_pere = ".((int) $fk_parent);
4486
+		$sqlrank .= " ORDER BY rang";
4487 4487
 		$resqlrank = $this->db->query($sqlrank);
4488 4488
 		if ($resqlrank) {
4489 4489
 			$cpt = 0;
4490 4490
 			while ($objrank = $this->db->fetch_object($resqlrank)) {
4491 4491
 				$cpt++;
4492 4492
 				$sql = "UPDATE ".$this->db->prefix()."product_association";
4493
-				$sql.= " SET rang = ".((int) $cpt);
4494
-				$sql.= " WHERE rowid = ".((int) $objrank->rowid);
4495
-				if (! $this->db->query($sql)) {
4493
+				$sql .= " SET rang = ".((int) $cpt);
4494
+				$sql .= " WHERE rowid = ".((int) $objrank->rowid);
4495
+				if (!$this->db->query($sql)) {
4496 4496
 					dol_print_error($this->db);
4497 4497
 					return -1;
4498 4498
 				}
@@ -4925,7 +4925,7 @@  discard block
 block discarded – undo
4925 4925
 		if (isset($this->sousprods) && is_array($this->sousprods)) {
4926 4926
 			foreach ($this->sousprods as $prod_name => $desc_product) {
4927 4927
 				if (is_array($desc_product)) {
4928
-					$this->fetch_prod_arbo($desc_product, "", $multiply, 1, $this->id, $ignore_stock_load);	// This set $this->res
4928
+					$this->fetch_prod_arbo($desc_product, "", $multiply, 1, $this->id, $ignore_stock_load); // This set $this->res
4929 4929
 				}
4930 4930
 			}
4931 4931
 		}
@@ -5080,9 +5080,9 @@  discard block
 block discarded – undo
5080 5080
 		$sql .= " WHERE p.rowid = pa.fk_product_fils";
5081 5081
 		$sql .= " AND pa.fk_product_pere = ".((int) $id);
5082 5082
 		$sql .= " AND pa.fk_product_fils <> ".((int) $id); // This should not happens, it is to avoid infinite loop if it happens
5083
-		$sql.= " ORDER BY pa.rang";
5083
+		$sql .= " ORDER BY pa.rang";
5084 5084
 
5085
-		dol_syslog(get_class($this).'::getChildsArbo id='.$id.' level='.$level. ' parents='.(is_array($parents)?implode(',', $parents):$parents), LOG_DEBUG);
5085
+		dol_syslog(get_class($this).'::getChildsArbo id='.$id.' level='.$level.' parents='.(is_array($parents) ?implode(',', $parents) : $parents), LOG_DEBUG);
5086 5086
 
5087 5087
 		if ($level == 1) {
5088 5088
 			$alreadyfound = array($id=>1); // We init array of found object to start of tree, so if we found it later (should not happened), we stop immediatly
@@ -5173,41 +5173,41 @@  discard block
 block discarded – undo
5173 5173
 		if (!empty($this->entity)) {
5174 5174
 			$tmpphoto = $this->show_photos('product', $conf->product->multidir_output[$this->entity], 1, 1, 0, 0, 0, 80, 0, 0, 0, 0, 1);
5175 5175
 			if ($this->nbphoto > 0) {
5176
-				$datas['photo'] = '<div class="photointooltip floatright">'."\n" . $tmpphoto . '</div>';
5176
+				$datas['photo'] = '<div class="photointooltip floatright">'."\n".$tmpphoto.'</div>';
5177 5177
 			}
5178 5178
 		}
5179 5179
 
5180 5180
 		if ($this->type == Product::TYPE_PRODUCT) {
5181 5181
 			$datas['picto'] = img_picto('', 'product').' <u class="paddingrightonly">'.$langs->trans("Product").'</u>';
5182 5182
 		} elseif ($this->type == Product::TYPE_SERVICE) {
5183
-			$datas['picto']= img_picto('', 'service').' <u class="paddingrightonly">'.$langs->trans("Service").'</u>';
5183
+			$datas['picto'] = img_picto('', 'service').' <u class="paddingrightonly">'.$langs->trans("Service").'</u>';
5184 5184
 		}
5185 5185
 		if (isset($this->status) && isset($this->status_buy)) {
5186
-			$datas['status']= ' '.$this->getLibStatut(5, 0) . ' '.$this->getLibStatut(5, 1);
5186
+			$datas['status'] = ' '.$this->getLibStatut(5, 0).' '.$this->getLibStatut(5, 1);
5187 5187
 		}
5188 5188
 
5189 5189
 		if (!empty($this->ref)) {
5190
-			$datas['ref']= '<br><b>'.$langs->trans('ProductRef').':</b> '.$this->ref;
5190
+			$datas['ref'] = '<br><b>'.$langs->trans('ProductRef').':</b> '.$this->ref;
5191 5191
 		}
5192 5192
 		if (!empty($this->label)) {
5193
-			$datas['label']= '<br><b>'.$langs->trans('ProductLabel').':</b> '.$this->label;
5193
+			$datas['label'] = '<br><b>'.$langs->trans('ProductLabel').':</b> '.$this->label;
5194 5194
 		}
5195 5195
 		if (!empty($this->description)) {
5196
-			$datas['description']= '<br><b>'.$langs->trans('ProductDescription').':</b> '.dolGetFirstLineofText($this->description, 5);
5196
+			$datas['description'] = '<br><b>'.$langs->trans('ProductDescription').':</b> '.dolGetFirstLineofText($this->description, 5);
5197 5197
 		}
5198 5198
 		if ($this->type == Product::TYPE_PRODUCT || getDolGlobalString('STOCK_SUPPORTS_SERVICES')) {
5199 5199
 			if (isModEnabled('productbatch')) {
5200 5200
 				$langs->load("productbatch");
5201
-				$datas['batchstatus']= "<br><b>".$langs->trans("ManageLotSerial").'</b>: '.$this->getLibStatut(0, 2);
5201
+				$datas['batchstatus'] = "<br><b>".$langs->trans("ManageLotSerial").'</b>: '.$this->getLibStatut(0, 2);
5202 5202
 			}
5203 5203
 		}
5204 5204
 		if (isModEnabled('barcode')) {
5205
-			$datas['barcode']= '<br><b>'.$langs->trans('BarCode').':</b> '.$this->barcode;
5205
+			$datas['barcode'] = '<br><b>'.$langs->trans('BarCode').':</b> '.$this->barcode;
5206 5206
 		}
5207 5207
 
5208 5208
 		if ($this->type == Product::TYPE_PRODUCT) {
5209 5209
 			if ($this->weight) {
5210
-				$datas['weight']= "<br><b>".$langs->trans("Weight").'</b>: '.$this->weight.' '.measuringUnitString(0, "weight", $this->weight_units);
5210
+				$datas['weight'] = "<br><b>".$langs->trans("Weight").'</b>: '.$this->weight.' '.measuringUnitString(0, "weight", $this->weight_units);
5211 5211
 			}
5212 5212
 			$labelsize = "";
5213 5213
 			if ($this->length) {
@@ -5220,7 +5220,7 @@  discard block
 block discarded – undo
5220 5220
 				$labelsize .= ($labelsize ? " - " : "")."<b>".$langs->trans("Height").'</b>: '.$this->height.' '.measuringUnitString(0, 'size', $this->height_units);
5221 5221
 			}
5222 5222
 			if ($labelsize) {
5223
-				$datas['size']= "<br>".$labelsize;
5223
+				$datas['size'] = "<br>".$labelsize;
5224 5224
 			}
5225 5225
 
5226 5226
 			$labelsurfacevolume = "";
@@ -5231,7 +5231,7 @@  discard block
 block discarded – undo
5231 5231
 				$labelsurfacevolume .= ($labelsurfacevolume ? " - " : "")."<b>".$langs->trans("Volume").'</b>: '.$this->volume.' '.measuringUnitString(0, 'volume', $this->volume_units);
5232 5232
 			}
5233 5233
 			if ($labelsurfacevolume) {
5234
-				$datas['surface']= "<br>" . $labelsurfacevolume;
5234
+				$datas['surface'] = "<br>".$labelsurfacevolume;
5235 5235
 			}
5236 5236
 		}
5237 5237
 		if (!empty($this->pmp) && $this->pmp) {
@@ -5261,9 +5261,9 @@  discard block
 block discarded – undo
5261 5261
 		}
5262 5262
 		// show categories for this record only in ajax to not overload lists
5263 5263
 		if (isModEnabled('categorie') && !$nofetch) {
5264
-			require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
5264
+			require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
5265 5265
 			$form = new Form($this->db);
5266
-			$datas['categories'] = '<br>' . $form->showCategories($this->id, Categorie::TYPE_PRODUCT, 1);
5266
+			$datas['categories'] = '<br>'.$form->showCategories($this->id, Categorie::TYPE_PRODUCT, 1);
5267 5267
 		}
5268 5268
 
5269 5269
 		return $datas;
@@ -5315,7 +5315,7 @@  discard block
 block discarded – undo
5315 5315
 				$label = $langs->trans("ShowProduct");
5316 5316
 				$linkclose .= ' alt="'.dol_escape_htmltag($label, 1, 1).'"';
5317 5317
 			}
5318
-			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1, 1).'"' :  ' title="tocomplete"');
5318
+			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1, 1).'"' : ' title="tocomplete"');
5319 5319
 			$linkclose .= $dataparams.' class="nowraponall '.$classfortooltip.($morecss ? ' '.$morecss : '').'"';
5320 5320
 		} else {
5321 5321
 			$linkclose = ' class="nowraponall'.($morecss ? ' '.$morecss : '').'"';
@@ -5492,7 +5492,7 @@  discard block
 block discarded – undo
5492 5492
 				$labelStatus = ($status == 1 ? $langs->transnoentitiesnoconv('ProductStatusOnBatch') : $langs->transnoentitiesnoconv('ProductStatusOnSerial'));
5493 5493
 				$labelStatusShort = ($status == 1 ? $langs->transnoentitiesnoconv('ProductStatusOnBatchShort') : $langs->transnoentitiesnoconv('ProductStatusOnSerialShort'));
5494 5494
 			}
5495
-		} elseif ( $type == 2 && $status == 2 ) {
5495
+		} elseif ($type == 2 && $status == 2) {
5496 5496
 			$labelStatus = $langs->transnoentitiesnoconv('ProductStatusOnSerial');
5497 5497
 			$labelStatusShort = $langs->transnoentitiesnoconv('ProductStatusOnSerialShort');
5498 5498
 		}
@@ -5703,7 +5703,7 @@  discard block
 block discarded – undo
5703 5703
 			$sql .= " AND w.statut IN (".$this->db->sanitize(implode(',', $warehouseStatus)).")";
5704 5704
 		}
5705 5705
 
5706
-		$sql .= " ORDER BY ps.reel ".(getDolGlobalString('DO_NOT_TRY_TO_DEFRAGMENT_STOCKS_WAREHOUSE')?'DESC':'ASC'); // Note : qty ASC is important for expedition card, to avoid stock fragmentation;
5706
+		$sql .= " ORDER BY ps.reel ".(getDolGlobalString('DO_NOT_TRY_TO_DEFRAGMENT_STOCKS_WAREHOUSE') ? 'DESC' : 'ASC'); // Note : qty ASC is important for expedition card, to avoid stock fragmentation;
5707 5707
 
5708 5708
 		dol_syslog(get_class($this)."::load_stock", LOG_DEBUG);
5709 5709
 		$result = $this->db->query($sql);
@@ -5784,7 +5784,7 @@  discard block
 block discarded – undo
5784 5784
 		if (isModEnabled("supplier_order")) {
5785 5785
 			$filterStatus = !getDolGlobalString('SUPPLIER_ORDER_STATUS_FOR_VIRTUAL_STOCK') ? '3,4' : $conf->global->SUPPLIER_ORDER_STATUS_FOR_VIRTUAL_STOCK;
5786 5786
 			if (isset($includedraftpoforvirtual)) {
5787
-				$filterStatus = '0,1,2,'.$filterStatus;	// 1,2 may have already been inside $filterStatus but it is better to have twice than missing $filterStatus does not include them
5787
+				$filterStatus = '0,1,2,'.$filterStatus; // 1,2 may have already been inside $filterStatus but it is better to have twice than missing $filterStatus does not include them
5788 5788
 			}
5789 5789
 			$result = $this->load_stats_commande_fournisseur(0, $filterStatus, 1, $dateofvirtualstock);
5790 5790
 			if ($result < 0) {
@@ -6180,7 +6180,7 @@  discard block
 block discarded – undo
6180 6180
 		if (getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM')) {
6181 6181
 			$dirsociete = array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']);
6182 6182
 			foreach ($dirsociete as $dirroot) {
6183
-				$res = dol_include_once($dirroot . getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM').'.php');
6183
+				$res = dol_include_once($dirroot.getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM').'.php');
6184 6184
 				if ($res) {
6185 6185
 					break;
6186 6186
 				}
@@ -6479,7 +6479,7 @@  discard block
 block discarded – undo
6479 6479
 		global $langs;
6480 6480
 
6481 6481
 		if (empty($this->duration_value)) {
6482
-			$this->errors[]='ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice';
6482
+			$this->errors[] = 'ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice';
6483 6483
 			return -1;
6484 6484
 		}
6485 6485
 
@@ -6516,7 +6516,7 @@  discard block
 block discarded – undo
6516 6516
 	 */
6517 6517
 	public function getKanbanView($option = '', $arraydata = null)
6518 6518
 	{
6519
-		global $langs,$conf;
6519
+		global $langs, $conf;
6520 6520
 
6521 6521
 		$selected = (empty($arraydata['selected']) ? 0 : $arraydata['selected']);
6522 6522
 
@@ -6557,7 +6557,7 @@  discard block
 block discarded – undo
6557 6557
 			$return .= '<br><span class="info-box-status opacitymedium">'.$langs->trans('PhysicalStock').' : <span class="bold">'.$this->stock_reel.'</span></span>';
6558 6558
 		}
6559 6559
 		if (method_exists($this, 'getLibStatut')) {
6560
-			$return .='<br><span class="info-box-status margintoponly">'.$this->getLibStatut(3, 1).' '.$this->getLibStatut(3, 0).'</span>';
6560
+			$return .= '<br><span class="info-box-status margintoponly">'.$this->getLibStatut(3, 1).' '.$this->getLibStatut(3, 0).'</span>';
6561 6561
 		}
6562 6562
 		$return .= '</div>';
6563 6563
 		$return .= '</div>';
Please login to merge, or discard this patch.
htdocs/partnership/partnership_list.php 2 patches
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -89,7 +89,9 @@  discard block
 block discarded – undo
89 89
 
90 90
 $managedfor	= getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR', 'thirdparty');
91 91
 
92
-if ($managedfor != 'member' && $sortfield == 'd.datefin') $sortfield = '';
92
+if ($managedfor != 'member' && $sortfield == 'd.datefin') {
93
+	$sortfield = '';
94
+}
93 95
 
94 96
 // Default sort order (if not yet defined by previous GETPOST)
95 97
 if (!$sortfield) {
@@ -155,10 +157,18 @@  discard block
 block discarded – undo
155 157
 //if ($user->socid > 0) accessforbidden();
156 158
 //if ($user->socid > 0) $socid = $user->socid;
157 159
 //$result = restrictedArea($user, 'partnership', $object->id);
158
-if (empty($conf->partnership->enabled)) accessforbidden();
159
-if (empty($permissiontoread)) accessforbidden();
160
-if ($object->id > 0 && !($object->fk_member > 0) && $managedfor == 'member') accessforbidden();
161
-if ($object->id > 0 && !($object->fk_soc > 0) && $managedfor == 'thirdparty') accessforbidden();
160
+if (empty($conf->partnership->enabled)) {
161
+	accessforbidden();
162
+}
163
+if (empty($permissiontoread)) {
164
+	accessforbidden();
165
+}
166
+if ($object->id > 0 && !($object->fk_member > 0) && $managedfor == 'member') {
167
+	accessforbidden();
168
+}
169
+if ($object->id > 0 && !($object->fk_soc > 0) && $managedfor == 'thirdparty') {
170
+	accessforbidden();
171
+}
162 172
 
163 173
 
164 174
 /*
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
 $error = 0;
89 89
 
90
-$managedfor	= getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR', 'thirdparty');
90
+$managedfor = getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR', 'thirdparty');
91 91
 
92 92
 if ($managedfor != 'member' && $sortfield == 'd.datefin') $sortfield = '';
93 93
 
@@ -797,7 +797,7 @@  discard block
 block discarded – undo
797 797
 print '<tr class="liste_titre">';
798 798
 if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
799 799
 	print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
800
-	$totalarray['nbfield']++;	// For the column action
800
+	$totalarray['nbfield']++; // For the column action
801 801
 }
802 802
 foreach ($object->fields as $key => $val) {
803 803
 	$cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']);
@@ -810,7 +810,7 @@  discard block
 block discarded – undo
810 810
 	} elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
811 811
 		$cssforfield .= ($cssforfield ? ' ' : '').'right';
812 812
 	}
813
-	$cssforfield = preg_replace('/small\s*/', '', $cssforfield);	// the 'small' css must not be used for the title label
813
+	$cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
814 814
 	if (!empty($arrayfields['t.'.$key]['checked'])) {
815 815
 		print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist']))."\n";
816 816
 		$totalarray['nbfield']++;
@@ -831,7 +831,7 @@  discard block
 block discarded – undo
831 831
 // Action column
832 832
 if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
833 833
 	print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
834
-	$totalarray['nbfield']++;	// For the column action
834
+	$totalarray['nbfield']++; // For the column action
835 835
 }
836 836
 print '</tr>'."\n";
837 837
 
Please login to merge, or discard this patch.