Completed
Branch develop (1d589f)
by
unknown
21:18
created
htdocs/asset/tpl/depreciation_options_edit.tpl.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 }
36 36
 
37 37
 if (!is_object($formadmin)) {
38
-	require_once DOL_DOCUMENT_ROOT . '/core/class/html.formadmin.class.php';
38
+	require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
39 39
 	$formadmin = new FormAdmin($db);
40 40
 }
41 41
 
@@ -69,19 +69,19 @@  discard block
 block discarded – undo
69 69
 				'mode_key' => $info[0],
70 70
 				'field_key' => $info[1],
71 71
 				'value' => $info[2],
72
-				'target' => 'block_' . $mode_key,
72
+				'target' => 'block_'.$mode_key,
73 73
 			);
74 74
 		}
75 75
 
76 76
 		$assetdepreciationoptions->setInfosForMode($mode_key, $class_type, true);
77
-		$prefix_html_name = $mode_key . '_';
77
+		$prefix_html_name = $mode_key.'_';
78 78
 
79
-		print '<div id="block_' . $mode_key . '">';
79
+		print '<div id="block_'.$mode_key.'">';
80 80
 		print load_fiche_titre($langs->trans($mode_info['label']), '', '');
81 81
 		print '<div class="fichecenter">';
82 82
 		print '<div class="fichehalfleft">';
83 83
 		print '<div class="underbanner clearboth"></div>';
84
-		print '<table class="border centpercent tableforfield">' . "\n";
84
+		print '<table class="border centpercent tableforfield">'."\n";
85 85
 		$mode_info['fields'] = dol_sort_array($mode_info['fields'], 'position');
86 86
 		foreach ($mode_info['fields'] as $field_key => $field_info) {
87 87
 			// Discard if extrafield is a hidden field on form
@@ -102,14 +102,14 @@  discard block
 block discarded – undo
102 102
 				print '<table class="border centpercent tableforfield">';
103 103
 			}
104 104
 
105
-			$html_name = $prefix_html_name . $field_key;
105
+			$html_name = $prefix_html_name.$field_key;
106 106
 			if (!empty($field_info['enabled_field'])) {
107 107
 				$info = explode(':', $field_info['enabled_field']);
108 108
 				$enabled_field_info[] = array(
109 109
 					'mode_key' => $info[0],
110 110
 					'field_key' => $info[1],
111 111
 					'value' => $info[2],
112
-					'target' => 'field_' . $html_name,
112
+					'target' => 'field_'.$html_name,
113 113
 				);
114 114
 			}
115 115
 
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
121 121
 				$more_class .= ' tdtop';
122 122
 			}
123 123
 
124
-			print '<tr class="field_' . $html_name . '" id="field_' . $html_name . '"><td';
125
-			print ' class="titlefieldcreate' . $more_class . '">';
124
+			print '<tr class="field_'.$html_name.'" id="field_'.$html_name.'"><td';
125
+			print ' class="titlefieldcreate'.$more_class.'">';
126 126
 			if (!empty($field_info['help'])) {
127 127
 				print $form->textwithpicto($langs->trans($field_info['label']), $langs->trans($field_info['help']));
128 128
 			} else {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -221,7 +221,7 @@
 block discarded – undo
221 221
 		}
222 222
 	});
223 223
 </script>
224
-SCRIPT;
224
+script;
225 225
 }
226 226
 
227 227
 ?>
Please login to merge, or discard this patch.
htdocs/asset/tpl/depreciation_view.tpl.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 		print '<div class="fichecenter">';
68 68
 		print '<div class="fichehalfleft">';
69 69
 		print '<div class="underbanner clearboth"></div>';
70
-		print '<table class="border centpercent tableforfield">' . "\n";
70
+		print '<table class="border centpercent tableforfield">'."\n";
71 71
 		$mode_info['fields'] = dol_sort_array($mode_info['fields'], 'position');
72 72
 		foreach ($mode_info['fields'] as $field_key => $field_info) {
73 73
 			if (!empty($field_info['enabled_field'])) {
@@ -94,11 +94,11 @@  discard block
 block discarded – undo
94 94
 				print '<table class="border centpercent tableforfield">';
95 95
 			}
96 96
 
97
-			$key = $mode_key . '_' . $field_key;
97
+			$key = $mode_key.'_'.$field_key;
98 98
 			$value = $assetdepreciationoptions->deprecation_options[$mode_key][$field_key];
99 99
 
100
-			print '<tr class="field_' . $key . '"><td';
101
-			print ' class="' . (empty($field_info['tdcss']) ? 'titlefield' : $field_info['tdcss']) . ' fieldname_' . $key;
100
+			print '<tr class="field_'.$key.'"><td';
101
+			print ' class="'.(empty($field_info['tdcss']) ? 'titlefield' : $field_info['tdcss']).' fieldname_'.$key;
102 102
 			if ($field_info['type'] == 'text' || $field_info['type'] == 'html') {
103 103
 				print ' tdtop';
104 104
 			}
@@ -113,12 +113,12 @@  discard block
 block discarded – undo
113 113
 				}
114 114
 			}
115 115
 			print '</td>';
116
-			print '<td class="valuefield fieldname_' . $key;
116
+			print '<td class="valuefield fieldname_'.$key;
117 117
 			if ($field_info['type'] == 'text') {
118 118
 				print ' wordbreak';
119 119
 			}
120 120
 			if (!empty($field_info['cssview'])) {
121
-				print ' ' . $field_info['cssview'];
121
+				print ' '.$field_info['cssview'];
122 122
 			}
123 123
 			print '">';
124 124
 			if (in_array($field_info['type'], array('text', 'html'))) {
@@ -126,15 +126,15 @@  discard block
 block discarded – undo
126 126
 			}
127 127
 			if ($field_key == 'lang') {
128 128
 				$langs->load("languages");
129
-				$labellang = ($value ? $langs->trans('Language_' . $value) : '');
129
+				$labellang = ($value ? $langs->trans('Language_'.$value) : '');
130 130
 				print picto_from_langcode($value, 'class="paddingrightonly saturatemedium opacitylow"');
131 131
 				print $labellang;
132 132
 			} else {
133 133
 				if (isset($field_info['copytoclipboard']) && $field_info['copytoclipboard'] == 2) {
134
-					$out = $assetdepreciationoptions->showOutputField($field_info, $field_key, $value, '', '', $mode_key . '_', 0);
134
+					$out = $assetdepreciationoptions->showOutputField($field_info, $field_key, $value, '', '', $mode_key.'_', 0);
135 135
 					print showValueWithClipboardCPButton($out, 0, $out);
136 136
 				} else {
137
-					print $assetdepreciationoptions->showOutputField($field_info, $field_key, $value, '', '', $mode_key . '_', 0);
137
+					print $assetdepreciationoptions->showOutputField($field_info, $field_key, $value, '', '', $mode_key.'_', 0);
138 138
 				}
139 139
 			}
140 140
 			if (in_array($field_info['type'], array('text', 'html'))) {
Please login to merge, or discard this patch.
htdocs/core/tpl/objectline_view.tpl.php 2 patches
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -397,9 +397,15 @@
 block discarded – undo
397 397
 		) {
398 398
 			$accountancy_category_asset = $conf->global->ASSET_ACCOUNTANCY_CATEGORY;
399 399
 			$filters = array();
400
-			if (!empty($product_static->accountancy_code_buy)) $filters[] = "account_number = '" . $this->db->escape($product_static->accountancy_code_buy) . "'";
401
-			if (!empty($product_static->accountancy_code_buy_intra)) $filters[] = "account_number = '" . $this->db->escape($product_static->accountancy_code_buy_intra) . "'";
402
-			if (!empty($product_static->accountancy_code_buy_export)) $filters[] = "account_number = '" . $this->db->escape($product_static->accountancy_code_buy_export) . "'";
400
+			if (!empty($product_static->accountancy_code_buy)) {
401
+				$filters[] = "account_number = '" . $this->db->escape($product_static->accountancy_code_buy) . "'";
402
+			}
403
+			if (!empty($product_static->accountancy_code_buy_intra)) {
404
+				$filters[] = "account_number = '" . $this->db->escape($product_static->accountancy_code_buy_intra) . "'";
405
+			}
406
+			if (!empty($product_static->accountancy_code_buy_export)) {
407
+				$filters[] = "account_number = '" . $this->db->escape($product_static->accountancy_code_buy_export) . "'";
408
+			}
403 409
 			$sql = "SELECT COUNT(*) AS found";
404 410
 			$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account";
405 411
 			$sql .= " WHERE pcg_type = '" . $this->db->escape($conf->global->ASSET_ACCOUNTANCY_CATEGORY) . "'";
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 			$discount = new DiscountAbsolute($this->db);
111 111
 			$discount->fetch($line->fk_remise_except);
112 112
 			print ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromCreditNote", $discount->getNomUrl(0));
113
-		} elseif ($line->description == '(DEPOSIT)' && $line->fk_remise_except > 0)	{
113
+		} elseif ($line->description == '(DEPOSIT)' && $line->fk_remise_except > 0) {
114 114
 			include_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
115 115
 			$discount = new DiscountAbsolute($this->db);
116 116
 			$discount->fetch($line->fk_remise_except);
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 			if (getDolGlobalString('INVOICE_ADD_DEPOSIT_DATE')) {
120 120
 				print ' ('.dol_print_date($discount->datec).')';
121 121
 			}
122
-		} elseif ($line->description == '(EXCESS RECEIVED)' && $objp->fk_remise_except > 0)	{
122
+		} elseif ($line->description == '(EXCESS RECEIVED)' && $objp->fk_remise_except > 0) {
123 123
 			include_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
124 124
 			$discount = new DiscountAbsolute($this->db);
125 125
 			$discount->fetch($line->fk_remise_except);
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 			// we need to fetch product associated to line for some test
194 194
 			if ($object->element == 'propal' || $object->element == 'order' || $object->element == 'facture' || $object->element == 'propal_supplier' || $object->element == 'supplier_proposal' || $object->element == 'commande') {
195 195
 				$res = $line->fetch_product();
196
-				if ($res  > 0  ) {
196
+				if ($res > 0) {
197 197
 					if ($line->product->isService() && $line->product->isMandatoryPeriod()) {
198 198
 						print '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSet").'</span></div>';
199 199
 					}
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 			}
286 286
 		}
287 287
 		if ($mysoc->useLocalTax(2)) {
288
-			if (( isset($seller->country_code) && isset($buyer->thirdparty->country_code) && $seller->country_code == $buyer->thirdparty->country_code) || $line->total_localtax2 || $seller->useLocalTax(2)) {
288
+			if ((isset($seller->country_code) && isset($buyer->thirdparty->country_code) && $seller->country_code == $buyer->thirdparty->country_code) || $line->total_localtax2 || $seller->useLocalTax(2)) {
289 289
 				$tooltiponprice .= '<br>'.$langs->transcountry("TotalLT2", $seller->country_code).'='.price($line->total_localtax2);
290 290
 			} else {
291 291
 				$tooltiponprice .= '<br>'.$langs->transcountry("TotalLT2", $seller->country_code).'=<span class="opacitymedium">'.$langs->trans($senderissupplier ? "NotUsedForThisVendor" : "NotUsedForThisCustomer").'</span>';
@@ -431,20 +431,20 @@  discard block
 block discarded – undo
431 431
 		) {
432 432
 			$accountancy_category_asset = $conf->global->ASSET_ACCOUNTANCY_CATEGORY;
433 433
 			$filters = array();
434
-			if (!empty($product_static->accountancy_code_buy)) $filters[] = "account_number = '" . $this->db->escape($product_static->accountancy_code_buy) . "'";
435
-			if (!empty($product_static->accountancy_code_buy_intra)) $filters[] = "account_number = '" . $this->db->escape($product_static->accountancy_code_buy_intra) . "'";
436
-			if (!empty($product_static->accountancy_code_buy_export)) $filters[] = "account_number = '" . $this->db->escape($product_static->accountancy_code_buy_export) . "'";
434
+			if (!empty($product_static->accountancy_code_buy)) $filters[] = "account_number = '".$this->db->escape($product_static->accountancy_code_buy)."'";
435
+			if (!empty($product_static->accountancy_code_buy_intra)) $filters[] = "account_number = '".$this->db->escape($product_static->accountancy_code_buy_intra)."'";
436
+			if (!empty($product_static->accountancy_code_buy_export)) $filters[] = "account_number = '".$this->db->escape($product_static->accountancy_code_buy_export)."'";
437 437
 			$sql = "SELECT COUNT(*) AS found";
438
-			$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account";
439
-			$sql .= " WHERE pcg_type = '" . $this->db->escape($conf->global->ASSET_ACCOUNTANCY_CATEGORY) . "'";
440
-			$sql .= " AND (" . implode(' OR ', $filters). ")";
438
+			$sql .= " FROM ".MAIN_DB_PREFIX."accounting_account";
439
+			$sql .= " WHERE pcg_type = '".$this->db->escape($conf->global->ASSET_ACCOUNTANCY_CATEGORY)."'";
440
+			$sql .= " AND (".implode(' OR ', $filters).")";
441 441
 			$resql_asset = $this->db->query($sql);
442 442
 			if (!$resql_asset) {
443
-				print 'Error SQL: ' . $this->db->lasterror();
443
+				print 'Error SQL: '.$this->db->lasterror();
444 444
 			} elseif ($obj = $this->db->fetch_object($resql_asset)) {
445 445
 				if (!empty($obj->found)) {
446
-					print '<a class="reposition" href="' . DOL_URL_ROOT . '/asset/card.php?action=create&token='.newToken().'&supplier_invoice_id='.$object->id.'">';
447
-					print img_edit_add() . '</a>';
446
+					print '<a class="reposition" href="'.DOL_URL_ROOT.'/asset/card.php?action=create&token='.newToken().'&supplier_invoice_id='.$object->id.'">';
447
+					print img_edit_add().'</a>';
448 448
 				}
449 449
 			}
450 450
 		}
Please login to merge, or discard this patch.
htdocs/reception/list.php 2 patches
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -349,8 +349,9 @@  discard block
 block discarded – undo
349 349
 
350 350
 							$rang = $i;
351 351
 							//there may already be rows from previous receptions
352
-							if (!empty($createbills_onebythird))
353
-								$rang = $TFactThirdNbLines[$rcp->socid];
352
+							if (!empty($createbills_onebythird)) {
353
+															$rang = $TFactThirdNbLines[$rcp->socid];
354
+							}
354 355
 
355 356
 							$result = $objecttmp->addline(
356 357
 								$desc,
@@ -380,8 +381,10 @@  discard block
 block discarded – undo
380 381
 
381 382
 							if ($result > 0) {
382 383
 								$lineid = $result;
383
-								if (!empty($createbills_onebythird)) //increment rang to keep order
384
+								if (!empty($createbills_onebythird)) {
385
+									//increment rang to keep order
384 386
 									$TFactThirdNbLines[$rcp->socid]++;
387
+								}
385 388
 							} else {
386 389
 								$lineid = 0;
387 390
 								$error++;
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 $search_date_delivery_endday = GETPOST('search_date_delivery_endday', 'int');
60 60
 $search_date_delivery_endmonth = GETPOST('search_date_delivery_endmonth', 'int');
61 61
 $search_date_delivery_endyear = GETPOST('search_date_delivery_endyear', 'int');
62
-$search_date_delivery_start = dol_mktime(0, 0, 0, $search_date_delivery_startmonth, $search_date_delivery_startday, $search_date_delivery_startyear);	// Use tzserver
62
+$search_date_delivery_start = dol_mktime(0, 0, 0, $search_date_delivery_startmonth, $search_date_delivery_startday, $search_date_delivery_startyear); // Use tzserver
63 63
 $search_date_delivery_end = dol_mktime(23, 59, 59, $search_date_delivery_endmonth, $search_date_delivery_endday, $search_date_delivery_endyear);
64 64
 $search_date_create_startday = GETPOST('search_date_create_startday', 'int');
65 65
 $search_date_create_startmonth = GETPOST('search_date_create_startmonth', 'int');
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 $search_date_create_endday = GETPOST('search_date_create_endday', 'int');
68 68
 $search_date_create_endmonth = GETPOST('search_date_create_endmonth', 'int');
69 69
 $search_date_create_endyear = GETPOST('search_date_create_endyear', 'int');
70
-$search_date_create_start = dol_mktime(0, 0, 0, $search_date_create_startmonth, $search_date_create_startday, $search_date_create_startyear);	// Use tzserver
70
+$search_date_create_start = dol_mktime(0, 0, 0, $search_date_create_startmonth, $search_date_create_startday, $search_date_create_startyear); // Use tzserver
71 71
 $search_date_create_end = dol_mktime(23, 59, 59, $search_date_create_endmonth, $search_date_create_endday, $search_date_create_endyear);
72 72
 $search_billed = GETPOST("search_billed", 'int');
73 73
 $sall = GETPOST('sall', 'alphanohtml');
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 		$TFactThirdNbLines = array();
222 222
 
223 223
 		$nb_bills_created = 0;
224
-		$lastid= 0;
224
+		$lastid = 0;
225 225
 		$lastref = '';
226 226
 
227 227
 		$db->begin();
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
 				// if the VAT reverse-charge is activated by default in supplier card to resume the information
350 350
 				$objecttmp->vat_reverse_charge = $soc->vat_reverse_charge;
351 351
 
352
-				$objecttmp->fk_project			= $rcp->fk_project;
352
+				$objecttmp->fk_project = $rcp->fk_project;
353 353
 				//$objecttmp->multicurrency_code = $rcp->multicurrency_code;
354 354
 				if (empty($createbills_onebythird)) {
355 355
 					$objecttmp->ref_supplier = $rcp->ref;
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
 					}
383 383
 				}
384 384
 
385
-				$res = $objecttmp->create($user);		// This should create the supplier invoice + links into $objecttmp->linked_objects + add a link to ->origin_id
385
+				$res = $objecttmp->create($user); // This should create the supplier invoice + links into $objecttmp->linked_objects + add a link to ->origin_id
386 386
 
387 387
 				//var_dump($objecttmp->error);exit;
388 388
 				if ($res > 0) {
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
 
556 556
 				$id = $objecttmp->id; // For builddoc action
557 557
 				$lastref = $objecttmp->ref; // generated ref
558
-				$object  =$objecttmp;
558
+				$object  = $objecttmp;
559 559
 
560 560
 				// Fac builddoc
561 561
 				$donotredirect = 1;
Please login to merge, or discard this patch.
htdocs/asset/tpl/depreciation_options_view.tpl.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 		print '<div class="fichecenter">';
68 68
 		print '<div class="fichehalfleft">';
69 69
 		print '<div class="underbanner clearboth"></div>';
70
-		print '<table class="border centpercent tableforfield">' . "\n";
70
+		print '<table class="border centpercent tableforfield">'."\n";
71 71
 		$mode_info['fields'] = dol_sort_array($mode_info['fields'], 'position');
72 72
 		foreach ($mode_info['fields'] as $field_key => $field_info) {
73 73
 			if (!empty($field_info['enabled_field'])) {
@@ -94,11 +94,11 @@  discard block
 block discarded – undo
94 94
 				print '<table class="border centpercent tableforfield">';
95 95
 			}
96 96
 
97
-			$key = $mode_key . '_' . $field_key;
97
+			$key = $mode_key.'_'.$field_key;
98 98
 			$value = $assetdepreciationoptions->deprecation_options[$mode_key][$field_key];
99 99
 
100
-			print '<tr class="field_' . $key . '"><td';
101
-			print ' class="' . (empty($field_info['tdcss']) ? 'titlefield' : $field_info['tdcss']) . ' fieldname_' . $key;
100
+			print '<tr class="field_'.$key.'"><td';
101
+			print ' class="'.(empty($field_info['tdcss']) ? 'titlefield' : $field_info['tdcss']).' fieldname_'.$key;
102 102
 			if ($field_info['type'] == 'text' || $field_info['type'] == 'html') {
103 103
 				print ' tdtop';
104 104
 			}
@@ -113,12 +113,12 @@  discard block
 block discarded – undo
113 113
 				}
114 114
 			}
115 115
 			print '</td>';
116
-			print '<td class="valuefield fieldname_' . $key;
116
+			print '<td class="valuefield fieldname_'.$key;
117 117
 			if ($field_info['type'] == 'text') {
118 118
 				print ' wordbreak';
119 119
 			}
120 120
 			if (!empty($field_info['cssview'])) {
121
-				print ' ' . $field_info['cssview'];
121
+				print ' '.$field_info['cssview'];
122 122
 			}
123 123
 			print '">';
124 124
 			if (in_array($field_info['type'], array('text', 'html'))) {
@@ -126,15 +126,15 @@  discard block
 block discarded – undo
126 126
 			}
127 127
 			if ($field_key == 'lang') {
128 128
 				$langs->load("languages");
129
-				$labellang = ($value ? $langs->trans('Language_' . $value) : '');
129
+				$labellang = ($value ? $langs->trans('Language_'.$value) : '');
130 130
 				print picto_from_langcode($value, 'class="paddingrightonly saturatemedium opacitylow"');
131 131
 				print $labellang;
132 132
 			} else {
133 133
 				if (isset($field_info['copytoclipboard']) && $field_info['copytoclipboard'] == 2) {
134
-					$out = $assetdepreciationoptions->showOutputField($field_info, $field_key, $value, '', '', $mode_key . '_', 0);
134
+					$out = $assetdepreciationoptions->showOutputField($field_info, $field_key, $value, '', '', $mode_key.'_', 0);
135 135
 					print showValueWithClipboardCPButton($out, 0, $out);
136 136
 				} else {
137
-					print $assetdepreciationoptions->showOutputField($field_info, $field_key, $value, '', '', $mode_key . '_', 0);
137
+					print $assetdepreciationoptions->showOutputField($field_info, $field_key, $value, '', '', $mode_key.'_', 0);
138 138
 				}
139 139
 			}
140 140
 			if (in_array($field_info['type'], array('text', 'html'))) {
Please login to merge, or discard this patch.
htdocs/accountancy/class/accountancyimport.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 				$amount = $credit;
107 107
 			}
108 108
 
109
-			return "'" . $this->db->escape(abs($amount)) . "'";
109
+			return "'".$this->db->escape(abs($amount))."'";
110 110
 		}
111 111
 
112 112
 		return "''";
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 				$sens = 'C';
135 135
 			}
136 136
 
137
-			return "'" . $this->db->escape($sens) . "'";
137
+			return "'".$this->db->escape($sens)."'";
138 138
 		}
139 139
 
140 140
 		return "''";
Please login to merge, or discard this patch.
htdocs/core/extrafieldsinimport.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 			case 'sellist':
49 49
 				$tmp = '';
50 50
 				$tmpparam = jsonOrUnserialize($obj->param); // $tmp may be array 'options' => array 'c_currencies:code_iso:code_iso' => null
51
-				if (is_array($tmpparam) && array_key_exists('options', $tmpparam) &&  $tmpparam['options'] && is_array($tmpparam['options'])) {
51
+				if (is_array($tmpparam) && array_key_exists('options', $tmpparam) && $tmpparam['options'] && is_array($tmpparam['options'])) {
52 52
 					$tmpkeys = array_keys($tmpparam['options']);
53 53
 					$tmp = array_shift($tmpkeys);
54 54
 				}
Please login to merge, or discard this patch.
htdocs/core/modules/modAccounting.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -353,7 +353,7 @@
 block discarded – undo
353 353
 			'b.montant'=>'rule-computeAmount',
354 354
 			'b.sens'=>'rule-computeDirection'
355 355
 		); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent)
356
-		$this->import_convertvalue_array[$r]=array(
356
+		$this->import_convertvalue_array[$r] = array(
357 357
 			'b.piece_num' => array('rule' => 'compute', 'classfile' => '/accountancy/class/accountancyimport.class.php', 'class' => 'AccountancyImport', 'method' => 'cleanValue', 'element' => 'Accountancy'),
358 358
 			'b.numero_compte'=>array('rule'=>'accountingaccount'),
359 359
 			'b.subledger_account'=>array('rule'=>'accountingaccount'),
Please login to merge, or discard this patch.
htdocs/variants/list.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,9 @@
 block discarded – undo
144 144
 	//$socid = $user->socid;
145 145
 	accessforbidden();
146 146
 }
147
-if (!$permissiontoread) accessforbidden();
147
+if (!$permissiontoread) {
148
+	accessforbidden();
149
+}
148 150
 
149 151
 
150 152
 /*
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
 $hasgroupby = true;
306 306
 $sql .= " GROUP BY ";
307 307
 foreach ($object->fields as $key => $val) {
308
-	$sql .= "t." . $key . ", ";
308
+	$sql .= "t.".$key.", ";
309 309
 }
310 310
 // Add fields from extrafields
311 311
 //if (!empty($extrafields->attributes[$object->table_element]['label'])) {
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 //}
316 316
 // Add where from hooks
317 317
 $parameters = array();
318
-$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object);    // Note that $action and $object may have been modified by hook
318
+$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook
319 319
 $sql .= $hookmanager->resPrint;
320 320
 $sql = preg_replace("/,\s*$/", "", $sql);
321 321
 
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
 if ($num == 1 && getDolGlobalString('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) {
381 381
 	$obj = $db->fetch_object($resql);
382 382
 	$id = $obj->rowid;
383
-	header("Location: " . dol_buildpath('/variants/card.php', 2) . '?id=' . $id);
383
+	header("Location: ".dol_buildpath('/variants/card.php', 2).'?id='.$id);
384 384
 	exit;
385 385
 }
386 386
 
@@ -607,7 +607,7 @@  discard block
 block discarded – undo
607 607
 	} 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'])) {
608 608
 		$cssforfield .= ($cssforfield ? ' ' : '').'right';
609 609
 	}
610
-	$cssforfield = preg_replace('/small\s*/', '', $cssforfield);	// the 'small' css must not be used for the title label
610
+	$cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
611 611
 	if (!empty($arrayfields['t.'.$key]['checked'])) {
612 612
 		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";
613 613
 		$totalarray['nbfield']++;
@@ -705,23 +705,23 @@  discard block
 block discarded – undo
705 705
 		foreach ($object->fields as $key => $val) {
706 706
 			$cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']);
707 707
 			if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) {
708
-				$cssforfield .= ($cssforfield ? ' ' : '') . 'center';
708
+				$cssforfield .= ($cssforfield ? ' ' : '').'center';
709 709
 			} elseif ($key == 'status') {
710
-				$cssforfield .= ($cssforfield ? ' ' : '') . 'center';
710
+				$cssforfield .= ($cssforfield ? ' ' : '').'center';
711 711
 			}
712 712
 
713 713
 			if (in_array($val['type'], array('timestamp'))) {
714
-				$cssforfield .= ($cssforfield ? ' ' : '') . 'nowrap';
714
+				$cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
715 715
 			} elseif ($key == 'ref') {
716
-				$cssforfield .= ($cssforfield ? ' ' : '') . 'nowrap';
716
+				$cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
717 717
 			}
718 718
 
719 719
 			if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('rowid', 'status')) && empty($val['arrayofkeyval'])) {
720
-				$cssforfield .= ($cssforfield ? ' ' : '') . 'right';
720
+				$cssforfield .= ($cssforfield ? ' ' : '').'right';
721 721
 			}
722 722
 			//if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100';
723 723
 
724
-			if (!empty($arrayfields['t.' . $key]['checked'])) {
724
+			if (!empty($arrayfields['t.'.$key]['checked'])) {
725 725
 				print '<td'.($cssforfield ? ' class="'.$cssforfield.(preg_match('/tdoverflow/', $cssforfield) ? ' classfortooltip' : '').'"' : '');
726 726
 				if (preg_match('/tdoverflow/', $cssforfield) && !is_numeric($object->$key)) {
727 727
 					print ' title="'.dol_escape_htmltag($object->$key).'"';
@@ -740,15 +740,15 @@  discard block
 block discarded – undo
740 740
 				}
741 741
 				if (!empty($val['isameasure']) && $val['isameasure'] == 1) {
742 742
 					if (!$i) {
743
-						$totalarray['pos'][$totalarray['nbfield']] = 't.' . $key;
743
+						$totalarray['pos'][$totalarray['nbfield']] = 't.'.$key;
744 744
 					}
745 745
 					if (!isset($totalarray['val'])) {
746 746
 						$totalarray['val'] = array();
747 747
 					}
748
-					if (!isset($totalarray['val']['t.' . $key])) {
749
-						$totalarray['val']['t.' . $key] = 0;
748
+					if (!isset($totalarray['val']['t.'.$key])) {
749
+						$totalarray['val']['t.'.$key] = 0;
750 750
 					}
751
-					$totalarray['val']['t.' . $key] += $object->$key;
751
+					$totalarray['val']['t.'.$key] += $object->$key;
752 752
 				}
753 753
 			}
754 754
 		}
@@ -795,14 +795,14 @@  discard block
 block discarded – undo
795 795
 		// Move
796 796
 		print '<td class="center linecolmove tdlineupdown">';
797 797
 		if ($i > 0) {
798
-			print '<a class="lineupdown" href="' . $_SERVER['PHP_SELF'] . '?action=up&amp;rowid=' . $obj->rowid . '">' . img_up('default', 0, 'imgupforline') . '</a>';
798
+			print '<a class="lineupdown" href="'.$_SERVER['PHP_SELF'].'?action=up&amp;rowid='.$obj->rowid.'">'.img_up('default', 0, 'imgupforline').'</a>';
799 799
 		}
800 800
 		if ($i < $num - 1) {
801
-			print '<a class="lineupdown" href="' . $_SERVER['PHP_SELF'] . '?action=down&amp;rowid=' . $obj->rowid . '">' . img_down('default', 0, 'imgdownforline') . '</a>';
801
+			print '<a class="lineupdown" href="'.$_SERVER['PHP_SELF'].'?action=down&amp;rowid='.$obj->rowid.'">'.img_down('default', 0, 'imgdownforline').'</a>';
802 802
 		}
803 803
 		print '</td>';
804 804
 
805
-		print '</tr>' . "\n";
805
+		print '</tr>'."\n";
806 806
 	}
807 807
 
808 808
 	$i++;
Please login to merge, or discard this patch.