Completed
Branch develop (96130d)
by
unknown
27:17
created
htdocs/modulebuilder/template/class/myobject.class.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -171,11 +171,11 @@  discard block
 block discarded – undo
171 171
 	/**
172 172
 	 * @var int Thirdparty ID
173 173
 	 */
174
-	public $socid;		// both socid and fk_soc are used
174
+	public $socid; // both socid and fk_soc are used
175 175
 	/**
176 176
 	 * @var int Thirdparty ID
177 177
 	 */
178
-	public $fk_soc;		// both socid and fk_soc are used
178
+	public $fk_soc; // both socid and fk_soc are used
179 179
 
180 180
 	/**
181 181
 	 * @var int Status
@@ -1277,13 +1277,13 @@  discard block
 block discarded – undo
1277 1277
 	 * To overload
1278 1278
 	 * @see CommonObjectLine
1279 1279
 	 */
1280
-	public $parent_element = '';		// Example: '' or 'myobject'
1280
+	public $parent_element = ''; // Example: '' or 'myobject'
1281 1281
 
1282 1282
 	/**
1283 1283
 	 * To overload
1284 1284
 	 * @see CommonObjectLine
1285 1285
 	 */
1286
-	public $fk_parent_attribute = '';	// Example: '' or 'fk_myobject'
1286
+	public $fk_parent_attribute = ''; // Example: '' or 'fk_myobject'
1287 1287
 
1288 1288
 	/**
1289 1289
 	 * @var int<0,1>	Does object support extrafields ? 0=No, 1=Yes
Please login to merge, or discard this patch.
htdocs/societe/index.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
 $sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
303 303
 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_extrafields as sef ON sef.fk_object=s.rowid";
304 304
 if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) {
305
-	$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity);
305
+	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = ".((int) $conf->entity);
306 306
 }
307 307
 // TODO Replace this
308 308
 if (!$user->hasRight('societe', 'client', 'voir')) {
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
 $sql .= $db->plimit($max, 0);
329 329
 
330 330
 //print $sql;
331
-$lastmodified="";
331
+$lastmodified = "";
332 332
 $result = $db->query($sql);
333 333
 if ($result) {
334 334
 	$num = $db->num_rows($result);
@@ -425,9 +425,9 @@  discard block
 block discarded – undo
425 425
 $sql .= ", sp.rowid as cid, sp.canvas as ccanvas, sp.email as cemail, sp.firstname, sp.lastname";
426 426
 $sql .= ", sp.address as caddress, sp.phone as cphone";
427 427
 $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."socpeople as sp";
428
-$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "socpeople_extrafields as spef ON spef.fk_object=sp.rowid";
428
+$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople_extrafields as spef ON spef.fk_object=sp.rowid";
429 429
 if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) {
430
-	$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity);
430
+	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = ".((int) $conf->entity);
431 431
 }
432 432
 // TODO Replace this
433 433
 if (!$user->hasRight('societe', 'client', 'voir')) {
Please login to merge, or discard this patch.
htdocs/product/class/product.class.php 1 patch
Spacing   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 	/**
158 158
 	 * @var string
159 159
 	 */
160
-	public $price_formated;			// used by takepos/ajax/ajax.php
160
+	public $price_formated; // used by takepos/ajax/ajax.php
161 161
 
162 162
 	/**
163 163
 	 * Selling price with tax
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 	/**
170 170
 	 * @var string
171 171
 	 */
172
-	public $price_ttc_formated;		// used by takepos/ajax/ajax.php
172
+	public $price_ttc_formated; // used by takepos/ajax/ajax.php
173 173
 
174 174
 	/**
175 175
 	 * Minimum price net
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
 	/**
521 521
 	 * @var ?int
522 522
 	 */
523
-	public $weight_units;	// scale -3, 0, 3, 6
523
+	public $weight_units; // scale -3, 0, 3, 6
524 524
 	/**
525 525
 	 * @var float|string
526 526
 	 */
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
 	/**
529 529
 	 * @var ?int
530 530
 	 */
531
-	public $length_units;	// scale -3, 0, 3, 6
531
+	public $length_units; // scale -3, 0, 3, 6
532 532
 	/**
533 533
 	 * @var float|string
534 534
 	 */
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
 	/**
537 537
 	 * @var ?int
538 538
 	 */
539
-	public $width_units;	// scale -3, 0, 3, 6
539
+	public $width_units; // scale -3, 0, 3, 6
540 540
 	/**
541 541
 	 * @var float|string|null
542 542
 	 */
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
 	/**
545 545
 	 * @var ?int
546 546
 	 */
547
-	public $height_units;	// scale -3, 0, 3, 6
547
+	public $height_units; // scale -3, 0, 3, 6
548 548
 	/**
549 549
 	 * @var float|string|null
550 550
 	 */
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
 	/**
553 553
 	 * @var ?int
554 554
 	 */
555
-	public $surface_units;	// scale -3, 0, 3, 6
555
+	public $surface_units; // scale -3, 0, 3, 6
556 556
 	/**
557 557
 	 * @var float|string|null
558 558
 	 */
@@ -560,7 +560,7 @@  discard block
 block discarded – undo
560 560
 	/**
561 561
 	 * @var ?int
562 562
 	 */
563
-	public $volume_units;	// scale -3, 0, 3, 6
563
+	public $volume_units; // scale -3, 0, 3, 6
564 564
 
565 565
 	/**
566 566
 	 * @var float|string|null
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
 	/**
570 570
 	 * @var ?int
571 571
 	 */
572
-	public $net_measure_units;	// scale -3, 0, 3, 6
572
+	public $net_measure_units; // scale -3, 0, 3, 6
573 573
 
574 574
 	/**
575 575
 	 * @var string
@@ -890,7 +890,7 @@  discard block
 block discarded – undo
890 890
 		'import_key'    => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'visible' => -2, 'notnull' => -1, 'index' => 0, 'position' => 1000),
891 891
 		//'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')),
892 892
 		//'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')),
893
-		'mandatory_period' => array('type' => 'integer', 'label' => 'mandatoryperiod', 'enabled' => 1, 'visible' => -1,  'notnull' => 1, 'default' => '0', 'index' => 1,  'position' => 1000),
893
+		'mandatory_period' => array('type' => 'integer', 'label' => 'mandatoryperiod', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'default' => '0', 'index' => 1, 'position' => 1000),
894 894
 		'stockable_product'	=>array('type' => 'integer', 'label' => 'stockable_product', 'enabled' => 1, 'visible' => 1, 'default' => '1', 'notnull' => 1, 'index' => 1, 'position' => 502),
895 895
 	);
896 896
 
@@ -1148,7 +1148,7 @@  discard block
 block discarded – undo
1148 1148
 					$sql .= ", fk_unit";
1149 1149
 					$sql .= ", mandatory_period";
1150 1150
 					$sql .= ", stockable_product";
1151
-					if (!empty($this->default_vat_code)) $sql.=", default_vat_code";
1151
+					if (!empty($this->default_vat_code)) $sql .= ", default_vat_code";
1152 1152
 					$sql .= ") VALUES (";
1153 1153
 					$sql .= "'".$this->db->idate($this->date_creation)."'";
1154 1154
 					$sql .= ", ".(!empty($this->entity) ? (int) $this->entity : (int) $conf->entity);
@@ -1181,7 +1181,7 @@  discard block
 block discarded – undo
1181 1181
 					$sql .= ", ".($this->fk_unit > 0 ? ((int) $this->fk_unit) : 'NULL');
1182 1182
 					$sql .= ", '".$this->db->escape((string) $this->mandatory_period)."'";
1183 1183
 					$sql .= ", ".((int) $this->stockable_product);
1184
-					if (!empty($this->default_vat_code)) $sql.=", '".$this->db->escape($this->default_vat_code)."'";
1184
+					if (!empty($this->default_vat_code)) $sql .= ", '".$this->db->escape($this->default_vat_code)."'";
1185 1185
 					$sql .= ")";
1186 1186
 					dol_syslog(get_class($this)."::Create", LOG_DEBUG);
1187 1187
 
@@ -1208,9 +1208,9 @@  discard block
 block discarded – undo
1208 1208
 
1209 1209
 							// update accountancy for this entity
1210 1210
 							if (!$error && getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) {
1211
-								$this->db->query("DELETE FROM " . $this->db->prefix() . "product_perentity WHERE fk_product = " .((int) $this->id) . " AND entity = " . ((int) $conf->entity));
1211
+								$this->db->query("DELETE FROM ".$this->db->prefix()."product_perentity WHERE fk_product = ".((int) $this->id)." AND entity = ".((int) $conf->entity));
1212 1212
 
1213
-								$sql = "INSERT INTO " . $this->db->prefix() . "product_perentity (";
1213
+								$sql = "INSERT INTO ".$this->db->prefix()."product_perentity (";
1214 1214
 								$sql .= " fk_product";
1215 1215
 								$sql .= ", entity";
1216 1216
 								$sql .= ", accountancy_code_buy";
@@ -1221,13 +1221,13 @@  discard block
 block discarded – undo
1221 1221
 								$sql .= ", accountancy_code_sell_export";
1222 1222
 								$sql .= ") VALUES (";
1223 1223
 								$sql .= $this->id;
1224
-								$sql .= ", " . ((int) $conf->entity);
1225
-								$sql .= ", '" . $this->db->escape($this->accountancy_code_buy) . "'";
1226
-								$sql .= ", '" . $this->db->escape($this->accountancy_code_buy_intra) . "'";
1227
-								$sql .= ", '" . $this->db->escape($this->accountancy_code_buy_export) . "'";
1228
-								$sql .= ", '" . $this->db->escape($this->accountancy_code_sell) . "'";
1229
-								$sql .= ", '" . $this->db->escape($this->accountancy_code_sell_intra) . "'";
1230
-								$sql .= ", '" . $this->db->escape($this->accountancy_code_sell_export) . "'";
1224
+								$sql .= ", ".((int) $conf->entity);
1225
+								$sql .= ", '".$this->db->escape($this->accountancy_code_buy)."'";
1226
+								$sql .= ", '".$this->db->escape($this->accountancy_code_buy_intra)."'";
1227
+								$sql .= ", '".$this->db->escape($this->accountancy_code_buy_export)."'";
1228
+								$sql .= ", '".$this->db->escape($this->accountancy_code_sell)."'";
1229
+								$sql .= ", '".$this->db->escape($this->accountancy_code_sell_intra)."'";
1230
+								$sql .= ", '".$this->db->escape($this->accountancy_code_sell_export)."'";
1231 1231
 								$sql .= ")";
1232 1232
 								$result = $this->db->query($sql);
1233 1233
 								if (!$result) {
@@ -1615,12 +1615,12 @@  discard block
 block discarded – undo
1615 1615
 			$sql .= ", note_public = ".(isset($this->note_public) ? "'".$this->db->escape($this->note_public)."'" : 'null');
1616 1616
 			$sql .= ", duration = '".$this->db->escape($this->duration_value.$this->duration_unit)."'";
1617 1617
 			if (!getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) {
1618
-				$sql .= ", accountancy_code_buy = '" . $this->db->escape($this->accountancy_code_buy) . "'";
1619
-				$sql .= ", accountancy_code_buy_intra = '" . $this->db->escape($this->accountancy_code_buy_intra) . "'";
1620
-				$sql .= ", accountancy_code_buy_export = '" . $this->db->escape($this->accountancy_code_buy_export) . "'";
1621
-				$sql .= ", accountancy_code_sell= '" . $this->db->escape($this->accountancy_code_sell) . "'";
1622
-				$sql .= ", accountancy_code_sell_intra= '" . $this->db->escape($this->accountancy_code_sell_intra) . "'";
1623
-				$sql .= ", accountancy_code_sell_export= '" . $this->db->escape($this->accountancy_code_sell_export) . "'";
1618
+				$sql .= ", accountancy_code_buy = '".$this->db->escape($this->accountancy_code_buy)."'";
1619
+				$sql .= ", accountancy_code_buy_intra = '".$this->db->escape($this->accountancy_code_buy_intra)."'";
1620
+				$sql .= ", accountancy_code_buy_export = '".$this->db->escape($this->accountancy_code_buy_export)."'";
1621
+				$sql .= ", accountancy_code_sell= '".$this->db->escape($this->accountancy_code_sell)."'";
1622
+				$sql .= ", accountancy_code_sell_intra= '".$this->db->escape($this->accountancy_code_sell_intra)."'";
1623
+				$sql .= ", accountancy_code_sell_export= '".$this->db->escape($this->accountancy_code_sell_export)."'";
1624 1624
 			}
1625 1625
 			$sql .= ", desiredstock = ".((isset($this->desiredstock) && is_numeric($this->desiredstock)) ? (float) $this->desiredstock : "null");
1626 1626
 			$sql .= ", cost_price = ".($this->cost_price != '' ? ((float) $this->cost_price) : 'null');
@@ -1655,9 +1655,9 @@  discard block
 block discarded – undo
1655 1655
 
1656 1656
 				// update accountancy for this entity
1657 1657
 				if (!$error && getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) {
1658
-					$this->db->query("DELETE FROM " . $this->db->prefix() . "product_perentity WHERE fk_product = " . ((int) $this->id) . " AND entity = " . ((int) $conf->entity));
1658
+					$this->db->query("DELETE FROM ".$this->db->prefix()."product_perentity WHERE fk_product = ".((int) $this->id)." AND entity = ".((int) $conf->entity));
1659 1659
 
1660
-					$sql = "INSERT INTO " . $this->db->prefix() . "product_perentity (";
1660
+					$sql = "INSERT INTO ".$this->db->prefix()."product_perentity (";
1661 1661
 					$sql .= " fk_product";
1662 1662
 					$sql .= ", entity";
1663 1663
 					$sql .= ", accountancy_code_buy";
@@ -1668,13 +1668,13 @@  discard block
 block discarded – undo
1668 1668
 					$sql .= ", accountancy_code_sell_export";
1669 1669
 					$sql .= ") VALUES (";
1670 1670
 					$sql .= ((int) $this->id);
1671
-					$sql .= ", " . ((int) $conf->entity);
1672
-					$sql .= ", '" . $this->db->escape($this->accountancy_code_buy) . "'";
1673
-					$sql .= ", '" . $this->db->escape($this->accountancy_code_buy_intra) . "'";
1674
-					$sql .= ", '" . $this->db->escape($this->accountancy_code_buy_export) . "'";
1675
-					$sql .= ", '" . $this->db->escape($this->accountancy_code_sell) . "'";
1676
-					$sql .= ", '" . $this->db->escape($this->accountancy_code_sell_intra) . "'";
1677
-					$sql .= ", '" . $this->db->escape($this->accountancy_code_sell_export) . "'";
1671
+					$sql .= ", ".((int) $conf->entity);
1672
+					$sql .= ", '".$this->db->escape($this->accountancy_code_buy)."'";
1673
+					$sql .= ", '".$this->db->escape($this->accountancy_code_buy_intra)."'";
1674
+					$sql .= ", '".$this->db->escape($this->accountancy_code_buy_export)."'";
1675
+					$sql .= ", '".$this->db->escape($this->accountancy_code_sell)."'";
1676
+					$sql .= ", '".$this->db->escape($this->accountancy_code_sell_intra)."'";
1677
+					$sql .= ", '".$this->db->escape($this->accountancy_code_sell_export)."'";
1678 1678
 					$sql .= ")";
1679 1679
 					$result = $this->db->query($sql);
1680 1680
 					if (!$result) {
@@ -1752,7 +1752,7 @@  discard block
 block discarded – undo
1752 1752
 								$error++;
1753 1753
 							} else {
1754 1754
 								// to keep old entries with the new dir
1755
-								require_once DOL_DOCUMENT_ROOT . '/ecm/class/ecmfiles.class.php';
1755
+								require_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php';
1756 1756
 								$ecmfiles = new EcmFiles($this->db);
1757 1757
 								$ecmfiles->updateAfterRename("produit/".dol_sanitizeFileName($this->oldcopy->ref), "produit/".dol_sanitizeFileName($this->ref));
1758 1758
 							}
@@ -2050,7 +2050,7 @@  discard block
 block discarded – undo
2050 2050
 				}
2051 2051
 			} elseif (isset($this->multilangs[$key])) {
2052 2052
 				if (empty($this->multilangs[$key]["label"])) {
2053
-					$this->errors[] = $key . ' : ' . $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label"));
2053
+					$this->errors[] = $key.' : '.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label"));
2054 2054
 					return -1;
2055 2055
 				}
2056 2056
 
@@ -2248,7 +2248,7 @@  discard block
 block discarded – undo
2248 2248
 	 */
2249 2249
 	private function getArrayForPriceCompare($level = 0)
2250 2250
 	{
2251
-		$testExit = array('multiprices','multiprices_ttc','multiprices_base_type','multiprices_min','multiprices_min_ttc','multiprices_tva_tx','multiprices_recuperableonly');
2251
+		$testExit = array('multiprices', 'multiprices_ttc', 'multiprices_base_type', 'multiprices_min', 'multiprices_min_ttc', 'multiprices_tva_tx', 'multiprices_recuperableonly');
2252 2252
 
2253 2253
 		foreach ($testExit as $field) {
2254 2254
 			if (!isset($this->$field)) {
@@ -2401,7 +2401,7 @@  discard block
 block discarded – undo
2401 2401
 							$price_base_type = $custprice_line->price_base_type;
2402 2402
 							$tva_tx = $custprice_line->tva_tx;
2403 2403
 							if ($custprice_line->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) {
2404
-								$tva_tx .= ' (' . $custprice_line->default_vat_code . ')';
2404
+								$tva_tx .= ' ('.$custprice_line->default_vat_code.')';
2405 2405
 							}
2406 2406
 							$tva_npr = $custprice_line->recuperableonly;
2407 2407
 							if (empty($tva_tx)) {
@@ -2470,7 +2470,7 @@  discard block
 block discarded – undo
2470 2470
 							$price_base_type = $custprice_line->price_base_type;
2471 2471
 							$tva_tx = $custprice_line->tva_tx;
2472 2472
 							if ($custprice_line->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) {
2473
-								$tva_tx .= ' (' . $custprice_line->default_vat_code . ')';
2473
+								$tva_tx .= ' ('.$custprice_line->default_vat_code.')';
2474 2474
 							}
2475 2475
 							$tva_npr = $custprice_line->recuperableonly;
2476 2476
 							if (empty($tva_tx)) {
@@ -2955,12 +2955,12 @@  discard block
 block discarded – undo
2955 2955
 
2956 2956
 		// For MultiCompany
2957 2957
 		// PMP per entity & Stocks Sharings stock_reel includes only stocks shared with this entity
2958
-		$separatedEntityPMP = false;	// Set to true to get the AWP from table llx_product_perentity instead of field 'pmp' into llx_product.
2959
-		$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.
2958
+		$separatedEntityPMP = false; // Set to true to get the AWP from table llx_product_perentity instead of field 'pmp' into llx_product.
2959
+		$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.
2960 2960
 		$visibleWarehousesEntities = $conf->entity;
2961 2961
 		if (getDolGlobalString('MULTICOMPANY_PRODUCT_SHARING_ENABLED')) {
2962 2962
 			if (getDolGlobalString('MULTICOMPANY_PMP_PER_ENTITY_ENABLED')) {
2963
-				$checkPMPPerEntity = $this->db->query("SELECT pmp FROM " . $this->db->prefix() . "product_perentity WHERE fk_product = ".((int) $id)." AND entity = ".(int) $conf->entity);
2963
+				$checkPMPPerEntity = $this->db->query("SELECT pmp FROM ".$this->db->prefix()."product_perentity WHERE fk_product = ".((int) $id)." AND entity = ".(int) $conf->entity);
2964 2964
 				if ($this->db->num_rows($checkPMPPerEntity) > 0) {
2965 2965
 					$separatedEntityPMP = true;
2966 2966
 				}
@@ -2968,7 +2968,7 @@  discard block
 block discarded – undo
2968 2968
 			global $mc;
2969 2969
 			$separatedStock = true;
2970 2970
 			if (isset($mc->sharings['stock']) && !empty($mc->sharings['stock'])) {
2971
-				$visibleWarehousesEntities .= "," . implode(",", $mc->sharings['stock']);
2971
+				$visibleWarehousesEntities .= ",".implode(",", $mc->sharings['stock']);
2972 2972
 			}
2973 2973
 		}
2974 2974
 		if ($separatedEntityPMP) {
@@ -2987,10 +2987,10 @@  discard block
 block discarded – undo
2987 2987
 		$sql .= " FROM ".$this->db->prefix()."product as p";
2988 2988
 		$sql .= " LEFT JOIN ".$this->db->prefix()."product_extrafields as pef ON pef.fk_object=p.rowid";
2989 2989
 		if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED') || $separatedEntityPMP) {
2990
-			$sql .= " LEFT JOIN " . $this->db->prefix() . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity);
2990
+			$sql .= " LEFT JOIN ".$this->db->prefix()."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity);
2991 2991
 		}
2992 2992
 		if ($separatedStock) {
2993
-			$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)."))";
2993
+			$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)."))";
2994 2994
 		}
2995 2995
 
2996 2996
 		if ($id) {
@@ -3158,15 +3158,15 @@  discard block
 block discarded – undo
3158 3158
 						$sql .= " WHERE entity IN (".getEntity('productprice').")";
3159 3159
 						$sql .= " AND price_level=".((int) $i);
3160 3160
 						$sql .= " AND fk_product = ".((int) $this->id);
3161
-						$sql .= " ORDER BY date_price DESC, rowid DESC";	// Get the most recent line
3162
-						$sql .= " LIMIT 1";									// Only the first one
3161
+						$sql .= " ORDER BY date_price DESC, rowid DESC"; // Get the most recent line
3162
+						$sql .= " LIMIT 1"; // Only the first one
3163 3163
 						$resql = $this->db->query($sql);
3164 3164
 						if ($resql) {
3165 3165
 							$result = $this->db->fetch_array($resql);
3166 3166
 
3167 3167
 							$this->multiprices[$i] = $result ? $result["price"] : null;
3168 3168
 							$this->multiprices_ttc[$i] = $result ? $result["price_ttc"] : null;
3169
-							$this->multiprices_min[$i] =  $result ? $result["price_min"] : null;
3169
+							$this->multiprices_min[$i] = $result ? $result["price_min"] : null;
3170 3170
 							$this->multiprices_min_ttc[$i] = $result ? $result["price_min_ttc"] : null;
3171 3171
 							$this->multiprices_base_type[$i] = $result ? $result["price_base_type"] : null;
3172 3172
 							// Next two fields are used only if PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL is on
@@ -3391,7 +3391,7 @@  discard block
 block discarded – undo
3391 3391
 				$obj = $this->db->fetch_object($result);
3392 3392
 				$this->stats_mo['customers_'.$role] = $obj->nb_customers ? $obj->nb_customers : 0;
3393 3393
 				$this->stats_mo['nb_'.$role] = $obj->nb ? $obj->nb : 0;
3394
-				$this->stats_mo['qty_'.$role] = $obj->qty ? price2num($obj->qty, 'MS') : 0;		// qty may be a float due to the SUM()
3394
+				$this->stats_mo['qty_'.$role] = $obj->qty ? price2num($obj->qty, 'MS') : 0; // qty may be a float due to the SUM()
3395 3395
 			} else {
3396 3396
 				$this->error = $this->db->error();
3397 3397
 				$error++;
@@ -4916,7 +4916,7 @@  discard block
 block discarded – undo
4916 4916
 				//Addition of a product with the highest rank +1
4917 4917
 				$sql = "INSERT INTO ".$this->db->prefix()."product_association(fk_product_pere,fk_product_fils,qty,incdec,rang)";
4918 4918
 				$sql .= " VALUES (".((int) $id_pere).", ".((int) $id_fils).", ".price2num($qty, 'MS').", ".((int) $incdec).", ".((int) $rank).")";
4919
-				if (! $this->db->query($sql)) {
4919
+				if (!$this->db->query($sql)) {
4920 4920
 					dol_print_error($this->db);
4921 4921
 					return -1;
4922 4922
 				} else {
@@ -5037,7 +5037,7 @@  discard block
 block discarded – undo
5037 5037
 				$sql = "UPDATE ".$this->db->prefix()."product_association";
5038 5038
 				$sql .= " SET rang = ".((int) $cpt);
5039 5039
 				$sql .= " WHERE rowid = ".((int) $objrank->rowid);
5040
-				if (! $this->db->query($sql)) {
5040
+				if (!$this->db->query($sql)) {
5041 5041
 					dol_print_error($this->db);
5042 5042
 					return -1;
5043 5043
 				}
@@ -5477,7 +5477,7 @@  discard block
 block discarded – undo
5477 5477
 		if (isset($this->sousprods) && is_array($this->sousprods)) {
5478 5478
 			foreach ($this->sousprods as $prod_name => $desc_product) {
5479 5479
 				if (is_array($desc_product)) {
5480
-					$this->fetch_prod_arbo($desc_product, "", $multiply, 1, $this->id, $ignore_stock_load);	// This set $this->res
5480
+					$this->fetch_prod_arbo($desc_product, "", $multiply, 1, $this->id, $ignore_stock_load); // This set $this->res
5481 5481
 				}
5482 5482
 			}
5483 5483
 		}
@@ -5632,7 +5632,7 @@  discard block
 block discarded – undo
5632 5632
 		$sql .= " AND pa.fk_product_fils <> ".((int) $id); // This should not happens, it is to avoid infinite loop if it happens
5633 5633
 		$sql .= " ORDER BY pa.rang";
5634 5634
 
5635
-		dol_syslog(get_class($this).'::getChildsArbo id='.$id.' level='.$level. ' parents='.(is_array($parents) ? implode(',', $parents) : $parents), LOG_DEBUG);
5635
+		dol_syslog(get_class($this).'::getChildsArbo id='.$id.' level='.$level.' parents='.(is_array($parents) ? implode(',', $parents) : $parents), LOG_DEBUG);
5636 5636
 
5637 5637
 		// Protection against infinite loop
5638 5638
 		if ($level > 30) {
@@ -5695,7 +5695,7 @@  discard block
 block discarded – undo
5695 5695
 			$parent[$this->label][$keyChild] = $valueChild;
5696 5696
 		}
5697 5697
 		foreach ($parent as $key => $value) {        // key=label, value is array of children
5698
-			$this->sousprods[$key] = $value;  // @phan-suppress-current-line PhanTypeMismatchProperty
5698
+			$this->sousprods[$key] = $value; // @phan-suppress-current-line PhanTypeMismatchProperty
5699 5699
 		}
5700 5700
 	}
5701 5701
 
@@ -5731,7 +5731,7 @@  discard block
 block discarded – undo
5731 5731
 		if (!empty($this->entity) && $permissiontoreadproduct) {
5732 5732
 			$tmpphoto = $this->show_photos('product', $conf->product->multidir_output[$this->entity], 1, 1, 0, 0, 0, 80, 0, 0, 0, 0, '1');
5733 5733
 			if ($this->nbphoto > 0) {
5734
-				$datas['photo'] = '<div class="photointooltip floatright">'."\n" . $tmpphoto . '</div>';
5734
+				$datas['photo'] = '<div class="photointooltip floatright">'."\n".$tmpphoto.'</div>';
5735 5735
 			}
5736 5736
 		}
5737 5737
 
@@ -5741,7 +5741,7 @@  discard block
 block discarded – undo
5741 5741
 			$datas['picto'] = img_picto('', 'service').' <u class="paddingrightonly">'.$langs->trans("Service").'</u>';
5742 5742
 		}
5743 5743
 		if (isset($this->status) && isset($this->status_buy)) {
5744
-			$datas['status'] = ' '.$this->getLibStatut(5, 0) . ' '.$this->getLibStatut(5, 1);
5744
+			$datas['status'] = ' '.$this->getLibStatut(5, 0).' '.$this->getLibStatut(5, 1);
5745 5745
 		}
5746 5746
 
5747 5747
 		if (!empty($this->ref)) {
@@ -5794,7 +5794,7 @@  discard block
 block discarded – undo
5794 5794
 					$labelsurfacevolume .= ($labelsurfacevolume ? " - " : "")."<b>".$langs->trans("Volume").'</b>: '.$this->volume.' '.measuringUnitString(0, 'volume', $this->volume_units);
5795 5795
 				}
5796 5796
 				if ($labelsurfacevolume) {
5797
-					$datas['surface'] = "<br>" . $labelsurfacevolume;
5797
+					$datas['surface'] = "<br>".$labelsurfacevolume;
5798 5798
 				}
5799 5799
 			}
5800 5800
 			if ($this->isService() && !empty($this->duration_value)) {
@@ -5836,9 +5836,9 @@  discard block
 block discarded – undo
5836 5836
 			}
5837 5837
 			// show categories for this record only in ajax to not overload lists
5838 5838
 			if (isModEnabled('category') && !$nofetch) {
5839
-				require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
5839
+				require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
5840 5840
 				$form = new Form($this->db);
5841
-				$datas['categories'] = '<br>' . $form->showCategories($this->id, Categorie::TYPE_PRODUCT, 1);
5841
+				$datas['categories'] = '<br>'.$form->showCategories($this->id, Categorie::TYPE_PRODUCT, 1);
5842 5842
 			}
5843 5843
 		}
5844 5844
 
@@ -6366,7 +6366,7 @@  discard block
 block discarded – undo
6366 6366
 		if (isModEnabled("supplier_order")) {
6367 6367
 			$filterStatus = getDolGlobalString('SUPPLIER_ORDER_STATUS_FOR_VIRTUAL_STOCK', '3,4');
6368 6368
 			if (isset($includedraftpoforvirtual)) {
6369
-				$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
6369
+				$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
6370 6370
 			}
6371 6371
 			$result = $this->load_stats_commande_fournisseur(0, $filterStatus, 1, $dateofvirtualstock);
6372 6372
 			if ($result < 0) {
@@ -6407,7 +6407,7 @@  discard block
 block discarded – undo
6407 6407
 		} elseif (getDolGlobalString('STOCK_CALCULATE_ON_VALIDATE_ORDER')) {
6408 6408
 			if (getDolGlobalString('STOCK_CALCULATE_ON_VALIDATE_ORDER_INCLUDE_DRAFT')) {	// By default, draft means "does not exist", so we do not include them by default, except if option is on
6409 6409
 				$tmpnewprod = dol_clone($this, 1);
6410
-				$result = $tmpnewprod->load_stats_commande(0, '0', 1);	// Get qty in draft orders
6410
+				$result = $tmpnewprod->load_stats_commande(0, '0', 1); // Get qty in draft orders
6411 6411
 				$this->stock_theorique += $tmpnewprod->stats_commande['qty'];
6412 6412
 			}
6413 6413
 		} elseif (getDolGlobalString('STOCK_CALCULATE_ON_BILL') && $weBillOrderOrShipmentReception == 'order') {
@@ -6424,7 +6424,7 @@  discard block
 block discarded – undo
6424 6424
 		} elseif (getDolGlobalString('STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER')) {	// Warning: stock change "on approval", not on validation !
6425 6425
 			if (getDolGlobalString('STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER_INCLUDE_DRAFT')) {	// By default, draft means "does not exist", so we do not include them by default, except if option is on
6426 6426
 				$tmpnewprod = dol_clone($this, 1);
6427
-				$result = $tmpnewprod->load_stats_commande_fournisseur(0, '0', 1);	// Get qty in draft orders
6427
+				$result = $tmpnewprod->load_stats_commande_fournisseur(0, '0', 1); // Get qty in draft orders
6428 6428
 				$this->stock_theorique += $this->stats_commande_fournisseur['qty'];
6429 6429
 			}
6430 6430
 			$this->stock_theorique -= $stock_reception_fournisseur;
@@ -6883,7 +6883,7 @@  discard block
 block discarded – undo
6883 6883
 		if (getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM')) {
6884 6884
 			$dirsociete = array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']);
6885 6885
 			foreach ($dirsociete as $dirroot) {
6886
-				$res = dol_include_once($dirroot . getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM').'.php');
6886
+				$res = dol_include_once($dirroot.getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM').'.php');
6887 6887
 				if ($res) {
6888 6888
 					break;
6889 6889
 				}
Please login to merge, or discard this patch.
htdocs/workstation/workstation_card.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
 $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
57 57
 $dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09');
58 58
 
59
-$groups	    = GETPOST('groups', 'array:int');
60
-$resources	= GETPOST('resources', 'array:int');
59
+$groups = GETPOST('groups', 'array:int');
60
+$resources = GETPOST('resources', 'array:int');
61 61
 //$lineid   = GETPOST('lineid', 'int');
62 62
 
63 63
 // Initialize a technical objects
@@ -90,10 +90,10 @@  discard block
 block discarded – undo
90 90
 
91 91
 // Permissions
92 92
 $permissiontoread = $user->hasRight('workstation', 'workstation', 'read');
93
-$permissiontoadd = $user->hasRight('workstation', 'workstation', 'write');      // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
93
+$permissiontoadd = $user->hasRight('workstation', 'workstation', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
94 94
 $permissiontodelete = $user->hasRight('workstation', 'workstation', 'delete') || ($permissiontoadd && isset($object->status) && $object->status == Workstation::STATUS_DISABLED);
95
-$permissionnote = $user->hasRight('workstation', 'workstation', 'write');      // Used by the include of actions_setnotes.inc.php
96
-$permissiondellink = $user->hasRight('workstation', 'workstation', 'write');      // Used by the include of actions_dellink.inc.php
95
+$permissionnote = $user->hasRight('workstation', 'workstation', 'write'); // Used by the include of actions_setnotes.inc.php
96
+$permissiondellink = $user->hasRight('workstation', 'workstation', 'write'); // Used by the include of actions_dellink.inc.php
97 97
 
98 98
 $upload_dir = rtrim(getMultidirOutput($object, '', 1), '/');
99 99
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
  */
108 108
 
109 109
 $parameters = array();
110
-$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action);   // Note that $action and $object may have been modified by some hooks
110
+$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
111 111
 if ($reshook < 0) {
112 112
 	setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
113 113
 }
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 		}
128 128
 	}
129 129
 
130
-	$triggermodname = 'WORKSTATION_WORKSTATION_MODIFY';    // Name of trigger action code to execute when we modify record
130
+	$triggermodname = 'WORKSTATION_WORKSTATION_MODIFY'; // Name of trigger action code to execute when we modify record
131 131
 
132 132
 	// Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen
133 133
 	include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
@@ -417,11 +417,11 @@  discard block
 block discarded – undo
417 417
 		$g = new UserGroup($db);
418 418
 		foreach ($object->usergroups as $id_group) {
419 419
 			$g->fetch($id_group);
420
-			$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories" style="background: #bbb">' . $g->getNomUrl(1, '', 0, 'categtextwhite') . '</li>';
420
+			$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories" style="background: #bbb">'.$g->getNomUrl(1, '', 0, 'categtextwhite').'</li>';
421 421
 		}
422 422
 
423
-		print '<tr><td>' . $langs->trans('Groups') . '</td><td>';
424
-		print '<div class="select2-container-multi-dolibarr"><ul class="select2-choices-dolibarr">' . implode(' ', $toprint) . '</ul></div>';
423
+		print '<tr><td>'.$langs->trans('Groups').'</td><td>';
424
+		print '<div class="select2-container-multi-dolibarr"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>';
425 425
 		print '</td></tr>';
426 426
 	}
427 427
 
@@ -431,11 +431,11 @@  discard block
 block discarded – undo
431 431
 		$r = new Dolresource($db);
432 432
 		foreach ($object->resources as $id_resource) {
433 433
 			$r->fetch($id_resource);
434
-			$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories" style="background: #bbb">' . $r->getNomUrl(1, '', '', 0, 'categtextwhite') . '</li>';
434
+			$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories" style="background: #bbb">'.$r->getNomUrl(1, '', '', 0, 'categtextwhite').'</li>';
435 435
 		}
436 436
 
437
-		print '<tr><td>' . $langs->trans('Machines') . '</td><td>';
438
-		print '<div class="select2-container-multi-dolibarr"><ul class="select2-choices-dolibarr">' . implode(' ', $toprint) . '</ul></div>';
437
+		print '<tr><td>'.$langs->trans('Machines').'</td><td>';
438
+		print '<div class="select2-container-multi-dolibarr"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>';
439 439
 		print '</td></tr>';
440 440
 	}
441 441
 
Please login to merge, or discard this patch.
htdocs/supplier_proposal/class/supplier_proposal.class.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	/**
177 177
 	 * @var string
178 178
 	 */
179
-	public $cond_reglement_doc;		// label doc
179
+	public $cond_reglement_doc; // label doc
180 180
 
181 181
 	/**
182 182
 	 * @var string
@@ -1188,7 +1188,7 @@  discard block
 block discarded – undo
1188 1188
 		$this->status = 0;
1189 1189
 		$this->statut = 0;
1190 1190
 
1191
-		if (!getDolGlobalString('SUPPLIER_PROPOSAL_ADDON') || !is_readable(DOL_DOCUMENT_ROOT."/core/modules/supplier_proposal/" . getDolGlobalString('SUPPLIER_PROPOSAL_ADDON').".php")) {
1191
+		if (!getDolGlobalString('SUPPLIER_PROPOSAL_ADDON') || !is_readable(DOL_DOCUMENT_ROOT."/core/modules/supplier_proposal/".getDolGlobalString('SUPPLIER_PROPOSAL_ADDON').".php")) {
1192 1192
 			$this->error = 'ErrorSetupNotComplete';
1193 1193
 			return -1;
1194 1194
 		}
@@ -1199,7 +1199,7 @@  discard block
 block discarded – undo
1199 1199
 		$this->date = $now;
1200 1200
 
1201 1201
 		// Set ref
1202
-		require_once DOL_DOCUMENT_ROOT."/core/modules/supplier_proposal/" . getDolGlobalString('SUPPLIER_PROPOSAL_ADDON').'.php';
1202
+		require_once DOL_DOCUMENT_ROOT."/core/modules/supplier_proposal/".getDolGlobalString('SUPPLIER_PROPOSAL_ADDON').'.php';
1203 1203
 		$obj = getDolGlobalString('SUPPLIER_PROPOSAL_ADDON');
1204 1204
 		$modSupplierProposal = new $obj();
1205 1205
 		'@phan-var-force ModeleNumRefSupplierProposal $modSupplierProposal';
@@ -1303,14 +1303,14 @@  discard block
 block discarded – undo
1303 1303
 				$this->status               = (int) $obj->status;
1304 1304
 				$this->datec                = $this->db->jdate($obj->datec); // TODO deprecated
1305 1305
 				$this->datev                = $this->db->jdate($obj->datev); // TODO deprecated
1306
-				$this->date_creation = $this->db->jdate($obj->datec);	// Creation date
1307
-				$this->date_modification = $this->db->jdate($obj->date_modification);	// Modification date
1306
+				$this->date_creation = $this->db->jdate($obj->datec); // Creation date
1307
+				$this->date_modification = $this->db->jdate($obj->date_modification); // Modification date
1308 1308
 				$this->date = $this->date_creation;
1309 1309
 				$this->date_validation = $this->db->jdate($obj->datev); // Validation date
1310 1310
 				$this->delivery_date = $this->db->jdate($obj->delivery_date);
1311 1311
 				$this->shipping_method_id = ($obj->fk_shipping_method > 0) ? $obj->fk_shipping_method : null;
1312 1312
 
1313
-				$this->last_main_doc    = $obj->last_main_doc;
1313
+				$this->last_main_doc = $obj->last_main_doc;
1314 1314
 				$this->mode_reglement_id    = $obj->fk_mode_reglement;
1315 1315
 				$this->mode_reglement_code  = $obj->mode_reglement_code;
1316 1316
 				$this->mode_reglement       = $obj->mode_reglement;
@@ -1385,7 +1385,7 @@  discard block
 block discarded – undo
1385 1385
 						$line->total_localtax1	= $objp->total_localtax1;
1386 1386
 						$line->total_localtax2	= $objp->total_localtax2;
1387 1387
 						$line->total_ttc        = $objp->total_ttc;
1388
-						$line->fk_fournprice 	= $objp->fk_fournprice;
1388
+						$line->fk_fournprice = $objp->fk_fournprice;
1389 1389
 						$marginInfos = getMarginInfos($objp->subprice, $objp->remise_percent, $objp->tva_tx, $objp->localtax1_tx, $objp->localtax2_tx, $line->fk_fournprice, $objp->pa_ht);
1390 1390
 						$line->pa_ht = $marginInfos[0];
1391 1391
 						$line->marge_tx			= $marginInfos[1];
@@ -1979,7 +1979,7 @@  discard block
 block discarded – undo
1979 1979
 
1980 1980
 			if (!$error) {
1981 1981
 				$this->status = self::STATUS_DRAFT;
1982
-				$this->statut = self::STATUS_DRAFT;	// deprecated
1982
+				$this->statut = self::STATUS_DRAFT; // deprecated
1983 1983
 				$this->db->commit();
1984 1984
 				return 1;
1985 1985
 			} else {
@@ -2398,7 +2398,7 @@  discard block
 block discarded – undo
2398 2398
 		$this->note_public = 'This is a comment (public)';
2399 2399
 		$this->note_private = 'This is a comment (private)';
2400 2400
 		// Lines
2401
-		$nbp = min(1000, GETPOSTINT('nblines') ? GETPOSTINT('nblines') : 5);	// We can force the nb of lines to test from command line (but not more than 1000)
2401
+		$nbp = min(1000, GETPOSTINT('nblines') ? GETPOSTINT('nblines') : 5); // We can force the nb of lines to test from command line (but not more than 1000)
2402 2402
 		$xnbp = 0;
2403 2403
 		while ($xnbp < $nbp) {
2404 2404
 			$line = new SupplierProposalLine($this->db);
@@ -2490,7 +2490,7 @@  discard block
 block discarded – undo
2490 2490
 		if (getDolGlobalString('SUPPLIER_PROPOSAL_ADDON')) {
2491 2491
 			$mybool = false;
2492 2492
 
2493
-			$file = getDolGlobalString('SUPPLIER_PROPOSAL_ADDON') . ".php";
2493
+			$file = getDolGlobalString('SUPPLIER_PROPOSAL_ADDON').".php";
2494 2494
 			$classname = getDolGlobalString('SUPPLIER_PROPOSAL_ADDON');
2495 2495
 
2496 2496
 			// Include file with class
@@ -2658,7 +2658,7 @@  discard block
 block discarded – undo
2658 2658
 			}
2659 2659
 		}
2660 2660
 		global $action;
2661
-		$hookmanager->initHooks(array($this->element . 'dao'));
2661
+		$hookmanager->initHooks(array($this->element.'dao'));
2662 2662
 		$parameters = array('id' => $this->id, 'getnomurl' => &$result);
2663 2663
 		$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
2664 2664
 		if ($reshook > 0) {
@@ -3342,7 +3342,7 @@  discard block
 block discarded – undo
3342 3342
 		$sql .= " ".price2num($this->localtax2_tx).",";
3343 3343
 		$sql .= " '".$this->db->escape($this->localtax1_type)."',";
3344 3344
 		$sql .= " '".$this->db->escape($this->localtax2_type)."',";
3345
-		$sql .= " ".price2num($this->subprice, 'MU') .",";
3345
+		$sql .= " ".price2num($this->subprice, 'MU').",";
3346 3346
 		$sql .= " ".((float) $this->remise_percent).",";
3347 3347
 		$sql .= " ".(isset($this->info_bits) ? ((int) $this->info_bits) : "null").",";
3348 3348
 		$sql .= " ".price2num($this->total_ht, 'MT').",";
Please login to merge, or discard this patch.