Completed
Branch develop (938e6e)
by
unknown
25:48
created
htdocs/compta/paiement_vat.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -305,7 +305,7 @@
 block discarded – undo
305 305
 
306 306
 		print "</tr>\n";
307 307
 		$total += $objp->amount;
308
-		$total_ttc += $objp->total_ttc;	// same than ->amount for vat object
308
+		$total_ttc += $objp->total_ttc; // same than ->amount for vat object
309 309
 		$totalrecu += $objp->amount;
310 310
 		$i++;
311 311
 	}
Please login to merge, or discard this patch.
htdocs/admin/remotestore/class/externalModules.class.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -139,9 +139,9 @@  discard block
 block discarded – undo
139 139
 		$this->url       = DOL_URL_ROOT.'/admin/modules.php?mode=marketplace';
140 140
 
141 141
 		// For dolistore modules
142
-		$this->dolistore_api_url = getDolGlobalString('MAIN_MODULE_DOLISTORE_API_SRV', 'https://www.dolistore.com/api/');	// 'https://www.dolistore.com/api/', 'https://admin2.dolibarr.org/api/index.php/marketplace/'
142
+		$this->dolistore_api_url = getDolGlobalString('MAIN_MODULE_DOLISTORE_API_SRV', 'https://www.dolistore.com/api/'); // 'https://www.dolistore.com/api/', 'https://admin2.dolibarr.org/api/index.php/marketplace/'
143 143
 		$this->dolistore_api_key = getDolGlobalString('MAIN_MODULE_DOLISTORE_API_KEY', 'dolistorepublicapi');
144
-		$this->shop_url  = getDolGlobalString('MAIN_MODULE_DOLISTORE_SHOP_URL', 'https://www.dolistore.com');
144
+		$this->shop_url = getDolGlobalString('MAIN_MODULE_DOLISTORE_SHOP_URL', 'https://www.dolistore.com');
145 145
 
146 146
 		// For community modules
147 147
 		$this->file_source_url = "https://raw.githubusercontent.com/Dolibarr/dolibarr-community-modules/refs/heads/main/index.yaml";
@@ -204,12 +204,12 @@  discard block
 block discarded – undo
204 204
 			$httpheader[] = 'Authorization: Basic '.base64_encode($basicAuthLogin.':'.$basicAuthPassword);
205 205
 		}
206 206
 
207
-		$url = $this->dolistore_api_url . (preg_match('/\/$/', $this->dolistore_api_url) ? '' : '/') . $resource;
207
+		$url = $this->dolistore_api_url.(preg_match('/\/$/', $this->dolistore_api_url) ? '' : '/').$resource;
208 208
 
209 209
 		$options['apikey'] = $this->dolistore_api_key;
210 210
 
211 211
 		if ($options) {
212
-			$url .= '?' . http_build_query($options);
212
+			$url .= '?'.http_build_query($options);
213 213
 		}
214 214
 
215 215
 		$response = getURLContent($url, 'GET', '', 1, $httpheader, array('https'), 0, -1, 5, 5);
@@ -251,13 +251,13 @@  discard block
 block discarded – undo
251 251
 		$modules = array();
252 252
 
253 253
 		if (!empty($this->cache_file) && file_exists($this->cache_file)) {
254
-			dol_syslog(__METHOD__ . " - Loading cache file: " . $this->cache_file, LOG_DEBUG);
254
+			dol_syslog(__METHOD__." - Loading cache file: ".$this->cache_file, LOG_DEBUG);
255 255
 
256 256
 			$content = file_get_contents($this->cache_file);
257 257
 			if ($content !== false) {
258 258
 				$modules = $this->readYaml($content);
259 259
 			} else {
260
-				dol_syslog(__METHOD__ . " - Error reading cache file", LOG_ERR);
260
+				dol_syslog(__METHOD__." - Error reading cache file", LOG_ERR);
261 261
 			}
262 262
 		}
263 263
 
@@ -285,20 +285,20 @@  discard block
 block discarded – undo
285 285
 		if (isset($resCategories['response']) && is_array($resCategories['response'])) {
286 286
 			$organized_tree = $resCategories['response'];
287 287
 		} else {
288
-			return $html ;
288
+			return $html;
289 289
 		}
290 290
 
291 291
 		$html = '';
292 292
 		foreach ($organized_tree as $key => $value) {
293 293
 			if ($value['label'] != "Versions" && $value['label'] != "Specials") {
294
-				$html .= '<li' . ($current == $value['rowid'] ? ' class="active"' : '') . '>';
295
-				$html .= '<a href="?mode=marketplace&categorie=' . $value['rowid'] . '">' . $value['label'] . '</a>';
294
+				$html .= '<li'.($current == $value['rowid'] ? ' class="active"' : '').'>';
295
+				$html .= '<a href="?mode=marketplace&categorie='.$value['rowid'].'">'.$value['label'].'</a>';
296 296
 				if (isset($value['children'])) {
297 297
 					$html .= '<ul>';
298 298
 					usort($value['children'], $this->buildSorter('position'));
299 299
 					foreach ($value['children'] as $key_children => $value_children) {
300
-						$html .= '<li' . ($current == $value_children['rowid'] ? ' class="active"' : '') . '>';
301
-						$html .= '<a href="?mode=marketplace&categorie=' . $value_children['rowid'] . '" title="' . dol_escape_htmltag(strip_tags($value_children['description'])) . '">' . $value_children['label'] . '</a>';
300
+						$html .= '<li'.($current == $value_children['rowid'] ? ' class="active"' : '').'>';
301
+						$html .= '<a href="?mode=marketplace&categorie='.$value_children['rowid'].'" title="'.dol_escape_htmltag(strip_tags($value_children['description'])).'">'.$value_children['label'].'</a>';
302 302
 						$html .= '</li>';
303 303
 					}
304 304
 					$html .= '</ul>';
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
 
324 324
 		$html       = "";
325 325
 		$last_month = dol_now() - (30 * 24 * 60 * 60);
326
-		$dolibarrversiontouse = DOL_VERSION;	// full string with version
326
+		$dolibarrversiontouse = DOL_VERSION; // full string with version
327 327
 
328 328
 		$this->products = array();
329 329
 
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
 		$this->no_page  = $options['no_page'] ?? 1;
333 333
 		$this->search    = $options['search'] ?? '';
334 334
 
335
-		$this->per_page = 11;	// We fix number of products per page to 11
335
+		$this->per_page = 11; // We fix number of products per page to 11
336 336
 
337 337
 		// Length of $search must be at least 2 characters
338 338
 		if (!empty($this->search) && strlen(str_replace(' ', '', (string) $this->search)) < 2) {
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
 		$fileProducts = array();
374 374
 		$fileProductsTotal = 0;
375 375
 		if (!empty($this->githubFileStatus) && getDolGlobalInt('MAIN_ENABLE_EXTERNALMODULES_COMMUNITY')) {
376
-			$fileProducts = $this->fetchModulesFromFile($data);			// Return an array with all modules from the cache filecontent in $data
376
+			$fileProducts = $this->fetchModulesFromFile($data); // Return an array with all modules from the cache filecontent in $data
377 377
 
378 378
 			$fileProducts = $this->adaptData($fileProducts, 'githubcommunity');
379 379
 
@@ -446,7 +446,7 @@  discard block
 block discarded – undo
446 446
 					$download_link .= img_picto('', 'file-code', 'class="size2x paddingright colorgrey"');
447 447
 					$download_link .= '</a>';
448 448
 
449
-					$urlview = $product["dolistore-download"];		// In a future, we will have the download to the zip file
449
+					$urlview = $product["dolistore-download"]; // In a future, we will have the download to the zip file
450 450
 					if ($urlview) {
451 451
 						$download_link .= '<a class="paddingleft paddingright" target="_blank" title="'.$langs->trans("View").'" href="'.$urlview.'" rel="noopener noreferrer">';
452 452
 						$download_link .= img_picto('', 'url', 'class="size2x"');
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
 					}
466 466
 				} elseif ($product['source'] === 'dolistore') {
467 467
 					$urlview = $this->shop_url.'/product.php?id='.((int) $product["id"]);
468
-					$urldownload = 'https://www.dolistore.com/_service_download.php?t=free&p=' . $product['id'];
468
+					$urldownload = 'https://www.dolistore.com/_service_download.php?t=free&p='.$product['id'];
469 469
 					$download_link = '<a class="paddingleft paddingright" target="_blank" title="'.$langs->trans("View").'" href="'.$urlview.'">';
470 470
 					$download_link .= img_picto('', 'url', 'class="size2x"');
471 471
 					$download_link .= '</a>';
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
 
528 528
 			// Logo
529 529
 			$html .= '<td class="center width150"><div class="newAppParent">';
530
-			$html .= $newapp.$images;	// No dol_escape_htmltag, it is already escape html
530
+			$html .= $newapp.$images; // No dol_escape_htmltag, it is already escape html
531 531
 			$html .= '</div></td>';
532 532
 
533 533
 			// Description
@@ -543,7 +543,7 @@  discard block
 block discarded – undo
543 543
 				$html .= '</small>';
544 544
 			}
545 545
 			$html .= '<br><small>';
546
-			$html .= $version;			// Version Dolibarr. No dol_escape_htmltag, it is already escape html
546
+			$html .= $version; // Version Dolibarr. No dol_escape_htmltag, it is already escape html
547 547
 			$html .= '</small>';
548 548
 			$html .= '</h2>';
549 549
 
@@ -603,7 +603,7 @@  discard block
 block discarded – undo
603 603
 
604 604
 		$this->numberOfProducts = count($this->products);
605 605
 
606
-		return $html ;
606
+		return $html;
607 607
 	}
608 608
 
609 609
 	/**
@@ -620,7 +620,7 @@  discard block
 block discarded – undo
620 620
 		 * @param array<string, mixed> $b
621 621
 		 * @return int
622 622
 		 */
623
-		function (array $a, array $b) use ($key) {
623
+		function(array $a, array $b) use ($key) {
624 624
 			$valA = isset($a[$key]) && is_scalar($a[$key]) ? (string) $a[$key] : '';
625 625
 			$valB = isset($b[$key]) && is_scalar($b[$key]) ? (string) $b[$key] : '';
626 626
 
@@ -781,7 +781,7 @@  discard block
 block discarded – undo
781 781
 				$pagelist .= '<li class="pagination">';
782 782
 				$pagelist .= '<label for="page_input">Page </label>';
783 783
 				if ($this->categorie != 0) {
784
-					$pagelist .= '<input type="hidden" name="categorie" value="' . $this->categorie . '">';
784
+					$pagelist .= '<input type="hidden" name="categorie" value="'.$this->categorie.'">';
785 785
 				}
786 786
 				$pagelist .= '<input type="text" id="page_input" name="no_page" value="'.($page).'" min="1" max="'.$nbpages.'" class="width40 page_input right" oninput="if(this.value > '.$nbpages.') this.value='.$nbpages.'">';
787 787
 				$pagelist .= ' / '.$nbpages;
@@ -831,17 +831,17 @@  discard block
 block discarded – undo
831 831
 		}
832 832
 
833 833
 		// Get the predefined error message or use a default one
834
-		$error_message = $error_messages[$request['status_code']] ?? 'Unexpected HTTP status: ' . $request['status_code'];
834
+		$error_message = $error_messages[$request['status_code']] ?? 'Unexpected HTTP status: '.$request['status_code'];
835 835
 
836 836
 		// Append error details if available
837 837
 		if (!empty($request['response']) && isset($request['response']['errors']) && is_array($request['response']['errors'])) {
838 838
 			foreach ($request['response']['errors'] as $error) {
839
-				$error_message .= ' - (Code ' . $error['code'] . '): ' . $error['message'];
839
+				$error_message .= ' - (Code '.$error['code'].'): '.$error['message'];
840 840
 			}
841 841
 		}
842 842
 
843 843
 		if (!empty($request['curl_error_msg'])) {
844
-			$error_message .= ' - ' . $request['curl_error_msg'];
844
+			$error_message .= ' - '.$request['curl_error_msg'];
845 845
 		}
846 846
 
847 847
 		// Return the formatted error message
@@ -869,7 +869,7 @@  discard block
 block discarded – undo
869 869
 		if (!file_exists($cache_file) || filemtime($cache_file) < (dol_now() - $cache_time)) {
870 870
 			// We get remote url
871 871
 			$addheaders = array();
872
-			$result = getURLContent($file_source_url, 'GET', '', 1, $addheaders);	// TODO Force timeout to 5 s on both connect and response.
872
+			$result = getURLContent($file_source_url, 'GET', '', 1, $addheaders); // TODO Force timeout to 5 s on both connect and response.
873 873
 			if (!empty($result) && $result['http_code'] == 200) {
874 874
 				$yaml = $result['content'];
875 875
 				file_put_contents($cache_file, $yaml);
@@ -975,7 +975,7 @@  discard block
 block discarded – undo
975 975
 				}
976 976
 
977 977
 				$adaptedPackage = [
978
-					'ref' => str_replace(' ', '', $package['modulename'] . '-' . $package['current_version'] . '@' .
978
+					'ref' => str_replace(' ', '', $package['modulename'].'-'.$package['current_version'].'@'.
979 979
 						(array_key_exists('author', $package) ? $package['author'] : 'unkownauthor')),
980 980
 					'label' => !empty($package['label'][substr($this->lang, 0, 2)])
981 981
 						? $package['label'][substr($this->lang, 0, 2)]
@@ -1091,7 +1091,7 @@  discard block
 block discarded – undo
1091 1091
 			 *
1092 1092
 			 * @return int
1093 1093
 			 */
1094
-			static function ($a, $b) {
1094
+			static function($a, $b) {
1095 1095
 				return strtotime($b['datec'] ?? '0') - strtotime($a['datec'] ?? '0');
1096 1096
 			}
1097 1097
 		);
@@ -1106,7 +1106,7 @@  discard block
 block discarded – undo
1106 1106
 				 *
1107 1107
 				 * @return bool
1108 1108
 				 */
1109
-				static function ($package) use ($options) {
1109
+				static function($package) use ($options) {
1110 1110
 					return stripos($package['label'], $options['search']) !== false || stripos($package['description'], $options['search']) !== false;
1111 1111
 				}
1112 1112
 			);
@@ -1122,7 +1122,7 @@  discard block
 block discarded – undo
1122 1122
 				 *
1123 1123
 				 * @return bool
1124 1124
 				 */
1125
-				static function ($package) use ($options) {
1125
+				static function($package) use ($options) {
1126 1126
 					return in_array($options['categorieid'], $package['category']);
1127 1127
 				}
1128 1128
 			);
Please login to merge, or discard this patch.
htdocs/comm/action/list.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -50,16 +50,16 @@  discard block
 block discarded – undo
50 50
 $langs->loadLangs(array("users", "companies", "agenda", "commercial", "other", "orders", "bills"));
51 51
 
52 52
 // Get Parameters
53
-$action 	= GETPOST('action', 'aZ09');
53
+$action = GETPOST('action', 'aZ09');
54 54
 $massaction = GETPOST('massaction', 'alpha');
55
-$confirm 	= GETPOST('confirm', 'alpha');
55
+$confirm = GETPOST('confirm', 'alpha');
56 56
 $cancel     = GETPOST('cancel', 'alpha');
57
-$toselect 	= GETPOST('toselect', 'array:int');
57
+$toselect = GETPOST('toselect', 'array:int');
58 58
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'actioncommlist'; // To manage different context of search
59 59
 $optioncss 	= GETPOST('optioncss', 'alpha');
60 60
 $mode = GETPOST('mode', 'aZ09');
61 61
 if (empty($mode) && preg_match('/show_/', $action)) {
62
-	$mode = $action;	// For backward compatibility
62
+	$mode = $action; // For backward compatibility
63 63
 }
64 64
 
65 65
 $disabledefaultvalues = GETPOSTINT('disabledefaultvalues');
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
 if (isModEnabled('category') && $user->hasRight('agenda', 'myactions', 'create')) {
429 429
 	$arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag");
430 430
 }
431
-if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete','preaffecttag'))) {
431
+if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) {
432 432
 	$arrayofmassactions = array();
433 433
 }
434 434
 $massactionbutton = $form->selectMassAction('', $arrayofmassactions);
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
 $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
472 472
 $sql .= $hookmanager->resPrint;
473 473
 
474
-$sql .= " WHERE a.entity IN (".getEntity('agenda').")";	// bookcal is a "virtual view" of agenda
474
+$sql .= " WHERE a.entity IN (".getEntity('agenda').")"; // bookcal is a "virtual view" of agenda
475 475
 // Condition on actioncode
476 476
 if (!empty($actioncode)) {
477 477
 	if (!getDolGlobalString('AGENDA_USE_EVENT_TYPE')) {
@@ -501,7 +501,7 @@  discard block
 block discarded – undo
501 501
 					 * @param string $value
502 502
 					 * @return	bool
503 503
 					 */
504
-					function ($value) {
504
+					function($value) {
505 505
 						return ((string) $value !== '-1');
506 506
 					}
507 507
 				);
@@ -597,9 +597,9 @@  discard block
 block discarded – undo
597 597
 
598 598
 // We must filter on assignment table
599 599
 if (($filtert != '-1' && $filtert != '-2') || $usergroup > 0) {
600
-	if ($filtert != '' && $filtert != '-1' && $filtert != '-2'  && $filtert != '-3') {
600
+	if ($filtert != '' && $filtert != '-1' && $filtert != '-2' && $filtert != '-3') {
601 601
 		$sql .= " AND (";
602
-		$sql .= " a.fk_user_action = ".((int) $filtert)." OR ";		// For old data compatibility (where owner was not assigned as contact)
602
+		$sql .= " a.fk_user_action = ".((int) $filtert)." OR "; // For old data compatibility (where owner was not assigned as contact)
603 603
 		$sql .= " EXISTS (SELECT ar.rowid FROM ".MAIN_DB_PREFIX."actioncomm_resources as ar WHERE ar.fk_actioncomm = a.id AND ar.element_type = 'user' AND ar.fk_element IN (".$db->sanitize($filtert)."))";
604 604
 		$sql .= ")";
605 605
 	} elseif ($filtert == '-3') {
@@ -1019,7 +1019,7 @@  discard block
 block discarded – undo
1019 1019
 	$event_owner_style = '';
1020 1020
 	// We decide to choose color of owner of event (event->userownerid is user id of owner, event->userassigned contains all users assigned to event)
1021 1021
 	if ($obj->fk_user_action > 0 && $cache_user_list[$obj->fk_user_action]->color != '') {
1022
-		$event_owner_style .= 'border-left: #' . $cache_user_list[$obj->fk_user_action]->color . ' 5px solid;';
1022
+		$event_owner_style .= 'border-left: #'.$cache_user_list[$obj->fk_user_action]->color.' 5px solid;';
1023 1023
 	}
1024 1024
 
1025 1025
 	// get event style for start and end date
@@ -1054,7 +1054,7 @@  discard block
 block discarded – undo
1054 1054
 	}
1055 1055
 	$event_start_date_css = $event_end_date_css = $event_more_class;
1056 1056
 
1057
-	print '<tr class="oddeven row-with-select ' . ($event_more_class != '' ? ' '.$event_more_class : '') . '">';
1057
+	print '<tr class="oddeven row-with-select '.($event_more_class != '' ? ' '.$event_more_class : '').'">';
1058 1058
 	// Action column
1059 1059
 	if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
1060 1060
 		print '<td class="nowrap center">';
@@ -1202,7 +1202,7 @@  discard block
 block discarded – undo
1202 1202
 				print implode(', ', $contactList);
1203 1203
 			}
1204 1204
 		} elseif ($obj->fk_contact > 0) { // keep for retrocompatibility with faraway events (no more used)
1205
-			$tmpcontact = new Contact($db);			// TODO Add a cache
1205
+			$tmpcontact = new Contact($db); // TODO Add a cache
1206 1206
 			$tmpcontact->fetch($obj->fk_contact);
1207 1207
 
1208 1208
 			print $contactstatic->getNomUrl(1, '', 0);
Please login to merge, or discard this patch.
htdocs/salaries/card.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -313,9 +313,9 @@  discard block
 block discarded – undo
313 313
 			// Create a line of payments
314 314
 			$paiement = new PaymentSalary($db);
315 315
 			$paiement->fk_salary    = $object->id;
316
-			$paiement->chid         = $object->id;	// deprecated
316
+			$paiement->chid         = $object->id; // deprecated
317 317
 			$paiement->datep        = $datep;
318
-			$paiement->datev		= $datev;
318
+			$paiement->datev = $datev;
319 319
 			$paiement->amounts      = array($object->id => $amount); // Tableau de montant
320 320
 			$paiement->fk_typepayment = $type_payment;
321 321
 			$paiement->num_payment  = GETPOST("num_payment", 'alphanohtml');
@@ -344,10 +344,10 @@  discard block
 block discarded – undo
344 344
 
345 345
 			if (GETPOST('saveandnew', 'alpha')) {
346 346
 				setEventMessages($langs->trans("RecordSaved"), null, 'mesgs');
347
-				header("Location: card.php?action=create&fk_project=" . urlencode((string) ($projectid)) . "&accountid=" . urlencode((string) ($accountid)) . '&paymenttype=' . urlencode((string) (GETPOSTINT('paymenttype'))) . '&datepday=' . GETPOSTINT("datepday") . '&datepmonth=' . GETPOSTINT("datepmonth") . '&datepyear=' . GETPOSTINT("datepyear"));
347
+				header("Location: card.php?action=create&fk_project=".urlencode((string) ($projectid))."&accountid=".urlencode((string) ($accountid)).'&paymenttype='.urlencode((string) (GETPOSTINT('paymenttype'))).'&datepday='.GETPOSTINT("datepday").'&datepmonth='.GETPOSTINT("datepmonth").'&datepyear='.GETPOSTINT("datepyear"));
348 348
 				exit;
349 349
 			} else {
350
-				header("Location: " . $_SERVER['PHP_SELF'] . '?id=' . $object->id);
350
+				header("Location: ".$_SERVER['PHP_SELF'].'?id='.$object->id);
351 351
 				exit;
352 352
 			}
353 353
 		} else {
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
 
638 638
 	// Auto create payment
639 639
 	print '<tr><td><label for="auto_create_paiement">'.$langs->trans('AutomaticCreationPayment').'</label></td>';
640
-	print '<td><input id="auto_create_paiement" name="auto_create_paiement" type="checkbox" ' . (empty($auto_create_paiement) ? '' : 'checked="checked"') . ' value="1"></td></tr>'."\n";	// Date payment
640
+	print '<td><input id="auto_create_paiement" name="auto_create_paiement" type="checkbox" '.(empty($auto_create_paiement) ? '' : 'checked="checked"').' value="1"></td></tr>'."\n"; // Date payment
641 641
 
642 642
 	// Bank
643 643
 	if (isModEnabled("bank")) {
@@ -901,7 +901,7 @@  discard block
 block discarded – undo
901 901
 				$morehtmlref .= '<br>'.$userstatic->getNomUrl(-1);
902 902
 			}
903 903
 		} else {
904
-			$morehtmlref .= '<br>' . $form->editfieldkey("", 'fk_user', $object->label, $object, $permissiontoadd, 'string', '', 0, 1);
904
+			$morehtmlref .= '<br>'.$form->editfieldkey("", 'fk_user', $object->label, $object, $permissiontoadd, 'string', '', 0, 1);
905 905
 
906 906
 			if (!empty($object->fk_user)) {
907 907
 				$userstatic = new User($db);
@@ -953,7 +953,7 @@  discard block
 block discarded – undo
953 953
 	$totalpaid = $object->getSommePaiement();
954 954
 
955 955
 	$object->totalpaid = $totalpaid;
956
-	$object->alreadypaid = $totalpaid;	// Same then $totalpaid because there is no amount of credit note or deposits for salary payments.
956
+	$object->alreadypaid = $totalpaid; // Same then $totalpaid because there is no amount of credit note or deposits for salary payments.
957 957
 
958 958
 	dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', '');
959 959
 
@@ -969,7 +969,7 @@  discard block
 block discarded – undo
969 969
 		print "</td></tr>";
970 970
 	} else {
971 971
 		print "<tr>";
972
-		print '<td class="titlefieldmiddle">' . $langs->trans("DateStartPeriod") . '</td><td>';
972
+		print '<td class="titlefieldmiddle">'.$langs->trans("DateStartPeriod").'</td><td>';
973 973
 		print dol_print_date($object->datesp, 'day');
974 974
 		print '</td></tr>';
975 975
 	}
@@ -980,15 +980,15 @@  discard block
 block discarded – undo
980 980
 		print "</td></tr>";
981 981
 	} else {
982 982
 		print "<tr>";
983
-		print '<td>' . $langs->trans("DateEndPeriod") . '</td><td>';
983
+		print '<td>'.$langs->trans("DateEndPeriod").'</td><td>';
984 984
 		print dol_print_date($object->dateep, 'day');
985 985
 		print '</td></tr>';
986 986
 	}
987 987
 
988 988
 	if ($action == 'edit') {
989
-		print '<tr><td class="fieldrequired">' . $langs->trans("Amount") . '</td><td><input name="amount" size="10" value="' . price($object->amount) . '"></td></tr>';
989
+		print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input name="amount" size="10" value="'.price($object->amount).'"></td></tr>';
990 990
 	} else {
991
-		print '<tr><td>' . $langs->trans("Amount") . '</td><td><span class="amount">' . price($object->amount, 0, $langs, 1, -1, -1, $conf->currency) . '</span></td></tr>';
991
+		print '<tr><td>'.$langs->trans("Amount").'</td><td><span class="amount">'.price($object->amount, 0, $langs, 1, -1, -1, $conf->currency).'</span></td></tr>';
992 992
 	}
993 993
 
994 994
 	// Default mode of payment
@@ -1173,7 +1173,7 @@  discard block
 block discarded – undo
1173 1173
 			if (empty($user->socid)) {
1174 1174
 				$canSendMail = true;
1175 1175
 
1176
-				print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=presend&token='.newToken().'&mode=init#formmailbeforetitle', '', $canSendMail);
1176
+				print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=presend&token='.newToken().'&mode=init#formmailbeforetitle', '', $canSendMail);
1177 1177
 			}
1178 1178
 		}
1179 1179
 
@@ -1189,12 +1189,12 @@  discard block
 block discarded – undo
1189 1189
 
1190 1190
 		// Transfer request
1191 1191
 		if ($object->status == $object::STATUS_UNPAID && ((price2num($object->amount) < 0 && $resteapayer < 0) || (price2num($object->amount) > 0 && $resteapayer > 0)) && $permissiontoadd) {
1192
-			print dolGetButtonAction('', $langs->trans('MakeTransferRequest'), 'default', DOL_URL_ROOT . '/salaries/virement_request.php?id=' . $object->id, '');
1192
+			print dolGetButtonAction('', $langs->trans('MakeTransferRequest'), 'default', DOL_URL_ROOT.'/salaries/virement_request.php?id='.$object->id, '');
1193 1193
 		}
1194 1194
 
1195 1195
 		// Emit payment
1196 1196
 		if ($object->status == $object::STATUS_UNPAID && ((price2num($object->amount) < 0 && $resteapayer < 0) || (price2num($object->amount) > 0 && $resteapayer > 0)) && $permissiontoadd) {
1197
-			print dolGetButtonAction('', $langs->trans('DoPayment'), 'default', DOL_URL_ROOT.'/salaries/paiement_salary.php?action=create&token='.newToken().'&id='. $object->id, '');
1197
+			print dolGetButtonAction('', $langs->trans('DoPayment'), 'default', DOL_URL_ROOT.'/salaries/paiement_salary.php?action=create&token='.newToken().'&id='.$object->id, '');
1198 1198
 		}
1199 1199
 
1200 1200
 		// Classify 'paid'
Please login to merge, or discard this patch.