Completed
Branch develop (c31049)
by
unknown
23:57
created
htdocs/core/actions_massactions.inc.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
 					if (getDolGlobalString('MAIL_MASS_ACTION_ADD_LAST_IF_MAIN_DOC_NOT_FOUND') && !empty($objectobj->last_main_doc)) {
434 434
 						$file_check_list[] = array(
435 435
 							'name' => basename($objectobj->last_main_doc),
436
-							'path' => DOL_DATA_ROOT . '/' . $objectobj->last_main_doc,
436
+							'path' => DOL_DATA_ROOT.'/'.$objectobj->last_main_doc,
437 437
 						);
438 438
 					}
439 439
 					foreach ($file_check_list as $file_check_arr) {
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
 				if ($fromtype === 'user') {
480 480
 					$from = dol_string_nospecial($user->getFullName($langs), ' ', array(",")).' <'.$user->email.'>';
481 481
 				} elseif ($fromtype === 'company') {
482
-					$from = getDolGlobalString('MAIN_INFO_SOCIETE_NOM') . ' <' . getDolGlobalString('MAIN_INFO_SOCIETE_MAIL').'>';
482
+					$from = getDolGlobalString('MAIN_INFO_SOCIETE_NOM').' <'.getDolGlobalString('MAIN_INFO_SOCIETE_MAIL').'>';
483 483
 				} elseif (preg_match('/user_aliases_(\d+)/', $fromtype, $reg)) {
484 484
 					$tmp = explode(',', $user->email_aliases);
485 485
 					$from = trim($tmp[((int) $reg[1] - 1)]);
@@ -503,25 +503,25 @@  discard block
 block discarded – undo
503 503
 
504 504
 				$sendtobcc = GETPOST('sendtoccc');
505 505
 				if ($objectclass == 'Propal') {
506
-					$sendtobcc .= (!getDolGlobalString('MAIN_MAIL_AUTOCOPY_PROPOSAL_TO') ? '' : (($sendtobcc ? ", " : "") . getDolGlobalString('MAIN_MAIL_AUTOCOPY_PROPOSAL_TO')));
506
+					$sendtobcc .= (!getDolGlobalString('MAIN_MAIL_AUTOCOPY_PROPOSAL_TO') ? '' : (($sendtobcc ? ", " : "").getDolGlobalString('MAIN_MAIL_AUTOCOPY_PROPOSAL_TO')));
507 507
 				}
508 508
 				if ($objectclass == 'Commande') {
509
-					$sendtobcc .= (!getDolGlobalString('MAIN_MAIL_AUTOCOPY_ORDER_TO') ? '' : (($sendtobcc ? ", " : "") . getDolGlobalString('MAIN_MAIL_AUTOCOPY_ORDER_TO')));
509
+					$sendtobcc .= (!getDolGlobalString('MAIN_MAIL_AUTOCOPY_ORDER_TO') ? '' : (($sendtobcc ? ", " : "").getDolGlobalString('MAIN_MAIL_AUTOCOPY_ORDER_TO')));
510 510
 				}
511 511
 				if ($objectclass == 'Facture') {
512
-					$sendtobcc .= (!getDolGlobalString('MAIN_MAIL_AUTOCOPY_INVOICE_TO') ? '' : (($sendtobcc ? ", " : "") . getDolGlobalString('MAIN_MAIL_AUTOCOPY_INVOICE_TO')));
512
+					$sendtobcc .= (!getDolGlobalString('MAIN_MAIL_AUTOCOPY_INVOICE_TO') ? '' : (($sendtobcc ? ", " : "").getDolGlobalString('MAIN_MAIL_AUTOCOPY_INVOICE_TO')));
513 513
 				}
514 514
 				if ($objectclass == 'SupplierProposal') {
515
-					$sendtobcc .= (!getDolGlobalString('MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO') ? '' : (($sendtobcc ? ", " : "") . getDolGlobalString('MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO')));
515
+					$sendtobcc .= (!getDolGlobalString('MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO') ? '' : (($sendtobcc ? ", " : "").getDolGlobalString('MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO')));
516 516
 				}
517 517
 				if ($objectclass == 'CommandeFournisseur') {
518
-					$sendtobcc .= (!getDolGlobalString('MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO') ? '' : (($sendtobcc ? ", " : "") . getDolGlobalString('MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO')));
518
+					$sendtobcc .= (!getDolGlobalString('MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO') ? '' : (($sendtobcc ? ", " : "").getDolGlobalString('MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO')));
519 519
 				}
520 520
 				if ($objectclass == 'FactureFournisseur') {
521
-					$sendtobcc .= (!getDolGlobalString('MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO') ? '' : (($sendtobcc ? ", " : "") . getDolGlobalString('MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO')));
521
+					$sendtobcc .= (!getDolGlobalString('MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO') ? '' : (($sendtobcc ? ", " : "").getDolGlobalString('MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO')));
522 522
 				}
523 523
 				if ($objectclass == 'Project') {
524
-					$sendtobcc .= (!getDolGlobalString('MAIN_MAIL_AUTOCOPY_PROJECT_TO') ? '' : (($sendtobcc ? ", " : "") . getDolGlobalString('MAIN_MAIL_AUTOCOPY_PROJECT_TO')));
524
+					$sendtobcc .= (!getDolGlobalString('MAIN_MAIL_AUTOCOPY_PROJECT_TO') ? '' : (($sendtobcc ? ", " : "").getDolGlobalString('MAIN_MAIL_AUTOCOPY_PROJECT_TO')));
525 525
 				}
526 526
 
527 527
 				// $listofqualifiedobj is array with key = object id and value is instance of qualified objects, for the current thirdparty (but thirdparty property is not loaded yet)
@@ -682,7 +682,7 @@  discard block
 block discarded – undo
682 682
 								$objectobj2->fk_element		= $objid2;
683 683
 								$objectobj2->elementtype	= $objectobj2->element;
684 684
 								if (getDolGlobalString('MAIN_MAIL_REPLACE_EVENT_TITLE_BY_EMAIL_SUBJECT')) {
685
-									$objectobj2->actionmsg2		= $subjectreplaced; // Short text
685
+									$objectobj2->actionmsg2 = $subjectreplaced; // Short text
686 686
 								}
687 687
 
688 688
 								$triggername = strtoupper(get_class($objectobj2)).'_SENTBYMAIL';
@@ -738,7 +738,7 @@  discard block
 block discarded – undo
738 738
 							} elseif (getDolGlobalString('MAIN_DISABLE_ALL_MAILS')) {
739 739
 								$resaction .= '<div class="warning">No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS</div>';
740 740
 							} else {
741
-								$resaction .= $langs->trans('ErrorFailedToSendMail', $from, (string) $sendto) . '<br><div class="error">(unhandled error)</div>';
741
+								$resaction .= $langs->trans('ErrorFailedToSendMail', $from, (string) $sendto).'<br><div class="error">(unhandled error)</div>';
742 742
 							}
743 743
 						}
744 744
 					}
@@ -1144,7 +1144,7 @@  discard block
 block discarded – undo
1144 1144
 				continue;
1145 1145
 			}
1146 1146
 
1147
-			if ($objectclass == 'Holiday' && ! in_array($objecttmp->statut, array(Holiday::STATUS_DRAFT, Holiday::STATUS_CANCELED, Holiday::STATUS_REFUSED))) {
1147
+			if ($objectclass == 'Holiday' && !in_array($objecttmp->statut, array(Holiday::STATUS_DRAFT, Holiday::STATUS_CANCELED, Holiday::STATUS_REFUSED))) {
1148 1148
 				$langs->load("errors");
1149 1149
 				$nbignored++;
1150 1150
 				$TMsg[] = '<div class="error">'.$langs->trans('ErrorLeaveRequestMustBeDraftCanceledOrRefusedToBeDeleted', $objecttmp->ref).'</div><br>';
@@ -1314,7 +1314,7 @@  discard block
 block discarded – undo
1314 1314
 		//For each valid categ type set common categ
1315 1315
 		if (!empty($to_affecttag_type_array)) {
1316 1316
 			foreach ($to_affecttag_type_array as $categ_type) {
1317
-				$contcats = GETPOST('contcats_' . $categ_type, 'array');
1317
+				$contcats = GETPOST('contcats_'.$categ_type, 'array');
1318 1318
 				//var_dump($toselect);exit;
1319 1319
 				foreach ($toselect as $toselectid) {
1320 1320
 					$result = $object->fetch($toselectid);
@@ -1576,7 +1576,7 @@  discard block
 block discarded – undo
1576 1576
 	$db->begin();
1577 1577
 
1578 1578
 	$objecttmp = new $objectclass($db);
1579
-	$e = new ExtraFields($db);// fetch optionals attributes and labels
1579
+	$e = new ExtraFields($db); // fetch optionals attributes and labels
1580 1580
 	$e->fetch_name_optionals_label($objecttmp->table_element);
1581 1581
 
1582 1582
 	$nbok = 0;
@@ -1710,12 +1710,12 @@  discard block
 block discarded – undo
1710 1710
 				continue;
1711 1711
 			}
1712 1712
 			if ($user->id == $objecttmp->fk_validator) {
1713
-				$objecttmp->oldcopy = dol_clone($objecttmp, 2);  // @phan-suppress-current-line PhanTypeMismatchProperty
1713
+				$objecttmp->oldcopy = dol_clone($objecttmp, 2); // @phan-suppress-current-line PhanTypeMismatchProperty
1714 1714
 
1715 1715
 				$objecttmp->date_valid = dol_now();
1716 1716
 				$objecttmp->fk_user_valid = $user->id;
1717 1717
 				$objecttmp->status = Holiday::STATUS_APPROVED;
1718
-				$objecttmp->statut = $objecttmp->status;	// deprecated
1718
+				$objecttmp->statut = $objecttmp->status; // deprecated
1719 1719
 
1720 1720
 				$verif = $objecttmp->approve($user);
1721 1721
 
@@ -1818,12 +1818,12 @@  discard block
 block discarded – undo
1818 1818
 }
1819 1819
 
1820 1820
 if (!$error && ($massaction == 'increaseholiday' || ($action == 'increaseholiday' && $confirm == 'yes')) && $permissiontoapprove && is_array($toselect)) {
1821
-	'@phan-var-force Holiday $holiday';  // Supposing that $holiday is set, it is needed.
1821
+	'@phan-var-force Holiday $holiday'; // Supposing that $holiday is set, it is needed.
1822 1822
 	$db->begin();
1823 1823
 	$objecttmp = new $objectclass($db);
1824 1824
 	$nbok = 0;
1825 1825
 	$typeholiday = GETPOSTINT('typeholiday');
1826
-	$nbdaysholidays = GETPOSTFLOAT('nbdaysholidays');	// May be 1.5
1826
+	$nbdaysholidays = GETPOSTFLOAT('nbdaysholidays'); // May be 1.5
1827 1827
 
1828 1828
 	if ($nbdaysholidays <= 0) {
1829 1829
 		setEventMessages($langs->trans("WrongAmount"), null, 'errors');
@@ -1883,7 +1883,7 @@  discard block
 block discarded – undo
1883 1883
 	// Check if current user is contact of the new project (necessary only if project is not public)
1884 1884
 	$iscontactofnewproject = 0;
1885 1885
 	if (empty($newproject->public)) {
1886
-		$tmps = $newproject->getProjectsAuthorizedForUser($user, 0, 1, 0, '(fk_statut:=:1)');	// We check only open project (cloning on closed is not allowed)
1886
+		$tmps = $newproject->getProjectsAuthorizedForUser($user, 0, 1, 0, '(fk_statut:=:1)'); // We check only open project (cloning on closed is not allowed)
1887 1887
 		$tmparray = explode(',', $tmps);
1888 1888
 		if (!in_array($newproject->id, $tmparray)) {
1889 1889
 			$iscontactofnewproject = 1;
@@ -1902,8 +1902,8 @@  discard block
 block discarded – undo
1902 1902
 
1903 1903
 			$defaultref = '';
1904 1904
 			$classnamemodtask = getDolGlobalString('PROJECT_TASK_ADDON', 'mod_task_simple');
1905
-			if (getDolGlobalString('PROJECT_TASK_ADDON') && is_readable(DOL_DOCUMENT_ROOT . "/core/modules/project/task/" . getDolGlobalString('PROJECT_TASK_ADDON') . ".php")) {
1906
-				require_once DOL_DOCUMENT_ROOT . "/core/modules/project/task/" . getDolGlobalString('PROJECT_TASK_ADDON') . '.php';
1905
+			if (getDolGlobalString('PROJECT_TASK_ADDON') && is_readable(DOL_DOCUMENT_ROOT."/core/modules/project/task/".getDolGlobalString('PROJECT_TASK_ADDON').".php")) {
1906
+				require_once DOL_DOCUMENT_ROOT."/core/modules/project/task/".getDolGlobalString('PROJECT_TASK_ADDON').'.php';
1907 1907
 				$modTask = new $classnamemodtask();
1908 1908
 				'@phan-var-force ModeleNumRefTask $modTask';
1909 1909
 				$defaultref = $modTask->getNextValue(null, $clone_task);
Please login to merge, or discard this patch.
htdocs/core/modules/facture/doc/pdf_crabe.modules.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 		$this->situationinvoice = false;
176 176
 
177 177
 		if ($mysoc === null) {
178
-			dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'. getCallerInfoString(), LOG_ERR);
178
+			dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'.getCallerInfoString(), LOG_ERR);
179 179
 			return;
180 180
 		}
181 181
 
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
 					if (!empty($conf->mycompany->multidir_output[$object->entity])) {
338 338
 						$logodir = $conf->mycompany->multidir_output[$object->entity];
339 339
 					}
340
-					$pagecount = $pdf->setSourceFile($logodir.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
340
+					$pagecount = $pdf->setSourceFile($logodir.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
341 341
 					$tplidx = $pdf->importPage(1);
342 342
 				}
343 343
 
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
 				// $pdf->GetY() here can't be used. It is bottom of the second address box but first one may be higher
452 452
 
453 453
 				// $tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks)
454
-				$tab_top = 90 + $top_shift;		// top_shift is an addition for linked objects or addons (0 in most cases)
454
+				$tab_top = 90 + $top_shift; // top_shift is an addition for linked objects or addons (0 in most cases)
455 455
 				$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
456 456
 
457 457
 				// You can add more thing under header here, if you increase $extra_under_address_shift too.
@@ -794,11 +794,11 @@  discard block
 block discarded – undo
794 794
 					if (!isset($this->tva[$vatrate])) {
795 795
 						$this->tva[$vatrate] = 0;
796 796
 					}
797
-					$this->tva[$vatrate] += $tvaligne;	// ->tva is abandoned, we use now ->tva_array that is more complete
797
+					$this->tva[$vatrate] += $tvaligne; // ->tva is abandoned, we use now ->tva_array that is more complete
798 798
 					$vatcode = $object->lines[$i]->vat_src_code;
799 799
 					if (getDolGlobalInt('PDF_INVOICE_SHOW_VAT_ANALYSIS')) {
800 800
 						if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['tot_ht'])) {
801
-							$this->tva_array[$vatrate . ($vatcode ? ' (' . $vatcode . ')' : '')]['tot_ht'] = 0;
801
+							$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['tot_ht'] = 0;
802 802
 						}
803 803
 						$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate' => $vatrate, 'vatcode' => $vatcode, 'amount' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne, 'tot_ht' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['tot_ht'] + $object->lines[$i]->total_ht);
804 804
 					} else {
@@ -888,7 +888,7 @@  discard block
 block discarded – undo
888 888
 				// Pagefoot
889 889
 				$this->_pagefoot($pdf, $object, $outputlangs, 0, $this->getHeightForQRInvoice($pdf->getPage(), $object, $langs));
890 890
 				if (method_exists($pdf, 'AliasNbPages')) {
891
-					$pdf->AliasNbPages();  // @phan-suppress-current-line PhanUndeclaredMethod
891
+					$pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod
892 892
 				}
893 893
 
894 894
 				// Add terms to sale
@@ -1205,7 +1205,7 @@  discard block
 block discarded – undo
1205 1205
 			foreach ($this->tva_array as $tvakey => $tvaval) {
1206 1206
 				$pdf->SetFont('', '', $default_font_size - 2);
1207 1207
 				$pdf->SetXY($this->marge_gauche, $posy);
1208
-				$titre = round((float) $tvakey, 2) . "%";
1208
+				$titre = round((float) $tvakey, 2)."%";
1209 1209
 				$pdf->MultiCell(25, 4, $titre, 0, 'L');
1210 1210
 
1211 1211
 				$pdf->SetFont('', '', $default_font_size - 2);
@@ -1247,7 +1247,7 @@  discard block
 block discarded – undo
1247 1247
 		}
1248 1248
 
1249 1249
 		$posxval = 52;
1250
-		$posxend = 110;	// End of x for text on left side
1250
+		$posxend = 110; // End of x for text on left side
1251 1251
 		if ($this->page_largeur < 210) { // To work with US executive format
1252 1252
 			$posxend -= 10;
1253 1253
 		}
@@ -1265,7 +1265,7 @@  discard block
 block discarded – undo
1265 1265
 			$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
1266 1266
 			$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
1267 1267
 
1268
-			$posy = $pdf->GetY() + 3;	// We need spaces for 2 lines payment conditions
1268
+			$posy = $pdf->GetY() + 3; // We need spaces for 2 lines payment conditions
1269 1269
 		}
1270 1270
 
1271 1271
 		// Show category of operations
@@ -1277,7 +1277,7 @@  discard block
 block discarded – undo
1277 1277
 
1278 1278
 			$pdf->SetFont('', '', $default_font_size - 2);
1279 1279
 			$pdf->SetXY($posxval, $posy);
1280
-			$categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation);
1280
+			$categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation);
1281 1281
 			$pdf->MultiCell($posxend - $posxval, 4, $categoryOfOperationLabel, 0, 'L');
1282 1282
 
1283 1283
 			$posy = $pdf->GetY() + 3; // for 2 lines
@@ -1429,7 +1429,7 @@  discard block
 block discarded – undo
1429 1429
 						include_once DOL_DOCUMENT_ROOT.'/core/lib/functions_be.lib.php';
1430 1430
 						$invoicePaymentKey = dolBECalculateStructuredCommunication($object->ref, $object->type);
1431 1431
 
1432
-						$pdf->MultiCell(100, 3, $outputlangs->transnoentities('StructuredCommunication').": " . $outputlangs->convToOutputCharset($invoicePaymentKey), 0, 'L', false);
1432
+						$pdf->MultiCell(100, 3, $outputlangs->transnoentities('StructuredCommunication').": ".$outputlangs->convToOutputCharset($invoicePaymentKey), 0, 'L', false);
1433 1433
 					}
1434 1434
 				}
1435 1435
 			}
@@ -1875,7 +1875,7 @@  discard block
 block discarded – undo
1875 1875
 		if (empty($hidetop)) {
1876 1876
 			// Show category of operations
1877 1877
 			if (getDolGlobalInt('INVOICE_CATEGORY_OF_OPERATION') == 1 && $this->categoryOfOperation >= 0) {
1878
-				$categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations") . ' : ' . $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation);
1878
+				$categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations").' : '.$outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation);
1879 1879
 				$pdf->SetXY($this->marge_gauche, $tab_top - 4);
1880 1880
 				$pdf->MultiCell(($pdf->GetStringWidth($categoryOfOperations)) + 4, 2, $categoryOfOperations);
1881 1881
 			}
@@ -2044,7 +2044,7 @@  discard block
 block discarded – undo
2044 2044
 		}
2045 2045
 		if ($this->situationinvoice) {
2046 2046
 			$outputlangs->loadLangs(array("other"));
2047
-			$title = $outputlangs->transnoentities("PDFInvoiceSituation") . " " . $outputlangs->transnoentities("NumberingShort") . $object->situation_counter . " -";
2047
+			$title = $outputlangs->transnoentities("PDFInvoiceSituation")." ".$outputlangs->transnoentities("NumberingShort").$object->situation_counter." -";
2048 2048
 		}
2049 2049
 		if (getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE') && is_object($outputlangsbis)) {
2050 2050
 			$title .= ' - ';
@@ -2279,7 +2279,7 @@  discard block
 block discarded – undo
2279 2279
 
2280 2280
 			$carac_client_name = is_object($thirdparty) ? pdfBuildThirdpartyName($thirdparty, $outputlangs) : '';
2281 2281
 
2282
-			$mode =  'target';
2282
+			$mode = 'target';
2283 2283
 			$carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), ($usecontact ? 1 : 0), $mode, $object);
2284 2284
 
2285 2285
 			// Show recipient
@@ -2334,7 +2334,7 @@  discard block
 block discarded – undo
2334 2334
 				if (!empty($carac_client_shipping)) {
2335 2335
 					$posy += $hautcadre;
2336 2336
 
2337
-					$hautcadre -= 10;	// Height for the shipping address does not need to be as high as main box
2337
+					$hautcadre -= 10; // Height for the shipping address does not need to be as high as main box
2338 2338
 
2339 2339
 					// Show shipping frame
2340 2340
 					$pdf->SetXY($posx + 2, $posy - 5);
Please login to merge, or discard this patch.
htdocs/core/modules/facture/doc/pdf_sponge.modules.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 		$this->watermark = '';
162 162
 
163 163
 		if ($mysoc === null) {
164
-			dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'. getCallerInfoString(), LOG_ERR);
164
+			dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'.getCallerInfoString(), LOG_ERR);
165 165
 			return;
166 166
 		}
167 167
 
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
 					if (!empty($conf->mycompany->multidir_output[$object->entity])) {
365 365
 						$logodir = $conf->mycompany->multidir_output[$object->entity];
366 366
 					}
367
-					$pagecount = $pdf->setSourceFile($logodir.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
367
+					$pagecount = $pdf->setSourceFile($logodir.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
368 368
 					$tplidx = $pdf->importPage(1);
369 369
 				}
370 370
 
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
 				// $pdf->GetY() here can't be used. It is bottom of the second address box but first one may be higher
462 462
 
463 463
 				// $this->tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks)
464
-				$this->tab_top = 90 + $top_shift + $shipp_shift;		// top_shift is an addition for linked objects or addons (0 in most cases)
464
+				$this->tab_top = 90 + $top_shift + $shipp_shift; // top_shift is an addition for linked objects or addons (0 in most cases)
465 465
 				$this->tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
466 466
 
467 467
 				// You can add more thing under header here, if you increase $extra_under_address_shift too.
@@ -847,7 +847,7 @@  discard block
 block discarded – undo
847 847
 								$extrafieldValue = $this->getExtrafieldContent($object->lines[$i], $extrafieldColKey, $outputlangs);
848 848
 								$this->printStdColumnContent($pdf, $curY, $extrafieldColKey, $extrafieldValue);
849 849
 
850
-								$this->setAfterColsLinePositionsData('options_' . $extrafieldColKey, $pdf->GetY(), $pdf->getPage());
850
+								$this->setAfterColsLinePositionsData('options_'.$extrafieldColKey, $pdf->GetY(), $pdf->getPage());
851 851
 							}
852 852
 						}
853 853
 					}
@@ -937,11 +937,11 @@  discard block
 block discarded – undo
937 937
 					if (!isset($this->tva[$vatrate])) {
938 938
 						$this->tva[$vatrate] = 0;
939 939
 					}
940
-					$this->tva[$vatrate] += $tvaligne;    // ->tva is abandoned, we use now ->tva_array that is more complete
940
+					$this->tva[$vatrate] += $tvaligne; // ->tva is abandoned, we use now ->tva_array that is more complete
941 941
 					$vatcode = $object->lines[$i]->vat_src_code;
942 942
 					if (getDolGlobalInt('PDF_INVOICE_SHOW_VAT_ANALYSIS')) {
943 943
 						if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['tot_ht'])) {
944
-							$this->tva_array[$vatrate . ($vatcode ? ' (' . $vatcode . ')' : '')]['tot_ht'] = 0;
944
+							$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['tot_ht'] = 0;
945 945
 						}
946 946
 						$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate' => $vatrate, 'vatcode' => $vatcode, 'amount' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne, 'tot_ht' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['tot_ht'] + $object->lines[$i]->total_ht);
947 947
 					} else {
@@ -1051,7 +1051,7 @@  discard block
 block discarded – undo
1051 1051
 
1052 1052
 				// Add number of pages in footer
1053 1053
 				if (method_exists($pdf, 'AliasNbPages')) {
1054
-					$pdf->AliasNbPages();  // @phan-suppress-current-line PhanUndeclaredMethod
1054
+					$pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod
1055 1055
 				}
1056 1056
 				// Add terms to sale
1057 1057
 				if (!empty($mysoc->termsofsale) && getDolGlobalInt('MAIN_PDF_ADD_TERMSOFSALE_INVOICE')) {
@@ -1305,7 +1305,7 @@  discard block
 block discarded – undo
1305 1305
 			foreach ($this->tva_array as $tvakey => $tvaval) {
1306 1306
 				$pdf->SetFont('', '', $default_font_size - 2);
1307 1307
 				$pdf->SetXY($this->marge_gauche, $posy);
1308
-				$titre = round((float) $tvakey, 2) . "%";
1308
+				$titre = round((float) $tvakey, 2)."%";
1309 1309
 				$pdf->MultiCell(25, 4, $titre, 0, 'L');
1310 1310
 
1311 1311
 				$pdf->SetFont('', '', $default_font_size - 2);
@@ -1346,8 +1346,8 @@  discard block
 block discarded – undo
1346 1346
 			$posy = $pdf->GetY() + 4;
1347 1347
 		}
1348 1348
 
1349
-		$posxval = 52;	// Position of values of properties shown on left side
1350
-		$posxend = 110;	// End of x for text on left side
1349
+		$posxval = 52; // Position of values of properties shown on left side
1350
+		$posxend = 110; // End of x for text on left side
1351 1351
 		if ($this->page_largeur < 210) { // To work with US executive format
1352 1352
 			$posxend -= 10;
1353 1353
 		}
@@ -1377,7 +1377,7 @@  discard block
 block discarded – undo
1377 1377
 
1378 1378
 			$pdf->SetFont('', '', $default_font_size - 2);
1379 1379
 			$pdf->SetXY($posxval, $posy);
1380
-			$categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation);
1380
+			$categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation);
1381 1381
 			$pdf->MultiCell($posxend - $posxval, 4, $categoryOfOperationLabel, 0, 'L');
1382 1382
 
1383 1383
 			$posy = $pdf->GetY() + 3; // for 2 lines
@@ -1555,7 +1555,7 @@  discard block
 block discarded – undo
1555 1555
 						include_once DOL_DOCUMENT_ROOT.'/core/lib/functions_be.lib.php';
1556 1556
 						$invoicePaymentKey = dolBECalculateStructuredCommunication($object->ref, $object->type);
1557 1557
 
1558
-						$pdf->MultiCell(100, 3, $outputlangs->transnoentities('StructuredCommunication').": " . $outputlangs->convToOutputCharset($invoicePaymentKey), 0, 'L', false);
1558
+						$pdf->MultiCell(100, 3, $outputlangs->transnoentities('StructuredCommunication').": ".$outputlangs->convToOutputCharset($invoicePaymentKey), 0, 'L', false);
1559 1559
 					}
1560 1560
 				}
1561 1561
 			}
@@ -2177,7 +2177,7 @@  discard block
 block discarded – undo
2177 2177
 		if (empty($hidetop)) {
2178 2178
 			// Show category of operations
2179 2179
 			if (getDolGlobalInt('INVOICE_CATEGORY_OF_OPERATION') == 1 && $this->categoryOfOperation >= 0) {
2180
-				$categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations") . ' : ' . $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation);
2180
+				$categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations").' : '.$outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation);
2181 2181
 				$pdf->SetXY($this->marge_gauche, $tab_top - 4);
2182 2182
 				$pdf->MultiCell(($pdf->GetStringWidth($categoryOfOperations)) + 4, 2, $categoryOfOperations);
2183 2183
 			}
@@ -2293,7 +2293,7 @@  discard block
 block discarded – undo
2293 2293
 		}
2294 2294
 		if ($this->situationinvoice) {
2295 2295
 			$outputlangs->loadLangs(array("other"));
2296
-			$title = $outputlangs->transnoentities("PDFInvoiceSituation") . " " . $outputlangs->transnoentities("NumberingShort") . $object->situation_counter . " -";
2296
+			$title = $outputlangs->transnoentities("PDFInvoiceSituation")." ".$outputlangs->transnoentities("NumberingShort").$object->situation_counter." -";
2297 2297
 		}
2298 2298
 		if (getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE') && is_object($outputlangsbis)) {
2299 2299
 			$title .= ' - ';
@@ -2583,7 +2583,7 @@  discard block
 block discarded – undo
2583 2583
 				if (!empty($carac_client_shipping)) {
2584 2584
 					$posy += $hautcadre;
2585 2585
 
2586
-					$hautcadre -= 10;	// Height for the shipping address does not need to be as high as main box
2586
+					$hautcadre -= 10; // Height for the shipping address does not need to be as high as main box
2587 2587
 
2588 2588
 					// Show shipping frame
2589 2589
 					$pdf->SetXY($posx + 2, $posy - 5);
Please login to merge, or discard this patch.
htdocs/core/multicompany_page.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 $title = $langs->trans("Multicompanies");
94 94
 
95 95
 // URL http://mydolibarr/core/multicompany_page?dol_use_jmobile=1 can be used for tests
96
-$head = '<!-- Multicompany selection -->'."\n";	// This is used by DoliDroid to know page is a multicompany selection page
96
+$head = '<!-- Multicompany selection -->'."\n"; // This is used by DoliDroid to know page is a multicompany selection page
97 97
 $arrayofjs = array();
98 98
 $arrayofcss = array();
99 99
 top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss);
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 
155 155
 	foreach ($listofentities as $entityid => $entitycursor) {
156 156
 		// Check if the user has the right to access the entity
157
-		if (getDolGlobalInt('MULTICOMPANY_TRANSVERSE_MODE')	&& !empty($user->entity) && $mc->checkRight($user->id, (string) $entityid) < 0) {
157
+		if (getDolGlobalInt('MULTICOMPANY_TRANSVERSE_MODE') && !empty($user->entity) && $mc->checkRight($user->id, (string) $entityid) < 0) {
158 158
 			continue;
159 159
 		}
160 160
 		$url = DOL_URL_ROOT.'/core/multicompany_page.php?action=switchentity&token='.newToken().'&entity='.((int) $entityid).($backtourl ? '&backtourl='.urlencode($backtourl) : '');
Please login to merge, or discard this patch.
htdocs/accountancy/bookkeeping/export.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -173,9 +173,9 @@  discard block
 block discarded – undo
173 173
 		$sql = "SELECT date_start, date_end";
174 174
 		$sql .= " FROM ".MAIN_DB_PREFIX."accounting_fiscalyear ";
175 175
 		if (getDolGlobalInt('ACCOUNTANCY_FISCALYEAR_DEFAULT')) {
176
-			$sql .= " WHERE rowid = " . getDolGlobalInt('ACCOUNTANCY_FISCALYEAR_DEFAULT');
176
+			$sql .= " WHERE rowid = ".getDolGlobalInt('ACCOUNTANCY_FISCALYEAR_DEFAULT');
177 177
 		} else {
178
-			$sql .= " WHERE date_start < '" . $db->idate(dol_now()) . "' and date_end > '" . $db->idate(dol_now()) . "'";
178
+			$sql .= " WHERE date_start < '".$db->idate(dol_now())."' and date_end > '".$db->idate(dol_now())."'";
179 179
 		}
180 180
 		$sql .= $db->plimit(1);
181 181
 		$res = $db->query($sql);
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 
228 228
 $accountancyexport = new AccountancyExport($db);
229 229
 $listofformat = $accountancyexport->getType();
230
-$formatexportset = getDolGlobalString('ACCOUNTING_EXPORT_MODELCSV');  // TODO: Verify if this should be int!
230
+$formatexportset = getDolGlobalString('ACCOUNTING_EXPORT_MODELCSV'); // TODO: Verify if this should be int!
231 231
 if (empty($listofformat[$formatexportset])) {
232 232
 	$formatexportset = 1;
233 233
 }
@@ -692,7 +692,7 @@  discard block
 block discarded – undo
692 692
 
693 693
 						if ($setfields) {
694 694
 							$sql = " UPDATE ".MAIN_DB_PREFIX."accounting_bookkeeping";
695
-							$sql .= " SET ".$setfields;		// $setfields is already a sanitized SQL string
695
+							$sql .= " SET ".$setfields; // $setfields is already a sanitized SQL string
696 696
 							$sql .= " WHERE rowid = ".((int) $movement->id);
697 697
 
698 698
 							$result = $db->query($sql);
@@ -732,7 +732,7 @@  discard block
 block discarded – undo
732 732
 		// Ajout directives pour resoudre bug IE
733 733
 		header('Cache-Control: Public, must-revalidate');
734 734
 		header('Pragma: public');
735
-		header('Content-Length: ' . dol_filesize($downloadFilePath));
735
+		header('Content-Length: '.dol_filesize($downloadFilePath));
736 736
 
737 737
 		readfileLowMemory($downloadFilePath);
738 738
 	} else {
@@ -805,7 +805,7 @@  discard block
 block discarded – undo
805 805
 	$form_question['formatexport'] = array(
806 806
 		'name' => 'formatexport',
807 807
 		'type' => 'select',
808
-		'label' => $langs->trans('Modelcsv'),		// TODO  Use Selectmodelcsv and show a select combo
808
+		'label' => $langs->trans('Modelcsv'), // TODO  Use Selectmodelcsv and show a select combo
809 809
 		'values' => $listofformat,
810 810
 		'default' => $formatexportset,
811 811
 		'morecss' => 'minwidth200 maxwidth200'
@@ -1328,7 +1328,7 @@  discard block
 block discarded – undo
1328 1328
 
1329 1329
 		$labeltoshowhtml = '';
1330 1330
 		$labeltoshowalt = '';
1331
-		if (($objectstatic instanceof CommonObject)  && in_array($line->doc_type, array('customer_invoice', 'supplier_invoice', 'expense_report'))) {
1331
+		if (($objectstatic instanceof CommonObject) && in_array($line->doc_type, array('customer_invoice', 'supplier_invoice', 'expense_report'))) {
1332 1332
 			if ($objectstatic->id > 0) {
1333 1333
 				$labeltoshowhtml .= $objectstatic->getNomUrl(1, '', 0, 0, '', 0, -1, 1);
1334 1334
 				$labeltoshowhtml .= $documentlink;
@@ -1340,8 +1340,8 @@  discard block
 block discarded – undo
1340 1340
 			$labeltoshowhtml .= $objectstatic->getNomUrl(1);
1341 1341
 			$labeltoshowalt .= $objectstatic->ref;
1342 1342
 			$bank_ref = strstr($line->doc_ref, '-');
1343
-			$labeltoshowhtml .= " " . $bank_ref;
1344
-			$labeltoshowalt .= " " . $bank_ref;
1343
+			$labeltoshowhtml .= " ".$bank_ref;
1344
+			$labeltoshowalt .= " ".$bank_ref;
1345 1345
 		} else {
1346 1346
 			$labeltoshowhtml .= $line->doc_ref;
1347 1347
 			$labeltoshowalt .= $line->doc_ref;
Please login to merge, or discard this patch.
htdocs/projet/tasks/time.php 1 patch
Spacing   +172 added lines, -172 removed lines patch added patch discarded remove patch
@@ -34,14 +34,14 @@  discard block
 block discarded – undo
34 34
 
35 35
 // Load Dolibarr environment
36 36
 require '../../main.inc.php';
37
-require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
38
-require_once DOL_DOCUMENT_ROOT . '/projet/class/task.class.php';
39
-require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
40
-require_once DOL_DOCUMENT_ROOT . '/core/lib/project.lib.php';
41
-require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
42
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
43
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php';
44
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formintervention.class.php';
37
+require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
38
+require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
39
+require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
40
+require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
41
+require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
42
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
43
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
44
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formintervention.class.php';
45 45
 
46 46
 /**
47 47
  * @var Conf $conf
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 	setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
181 181
 }
182 182
 
183
-include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php';
183
+include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
184 184
 
185 185
 // Purge search criteria
186 186
 if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers
@@ -361,10 +361,10 @@  discard block
 block discarded – undo
361 361
 }
362 362
 
363 363
 if ($action == 'confirm_deleteline' && $confirm == "yes" && ($user->hasRight('projet', 'time') || $user->hasRight('projet', 'all', 'creer'))) {
364
-	$object->fetchTimeSpent(GETPOSTINT('lineid'));    // load properties like $object->timespent_xxx
364
+	$object->fetchTimeSpent(GETPOSTINT('lineid')); // load properties like $object->timespent_xxx
365 365
 
366 366
 	if (in_array($object->timespent_fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) {
367
-		$result = $object->delTimeSpent($user);    // delete line with $object->timespent_id
367
+		$result = $object->delTimeSpent($user); // delete line with $object->timespent_id
368 368
 
369 369
 		if ($result < 0) {
370 370
 			$langs->load("errors");
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
 		if (count($tasksarray) > 0) {
385 385
 			$id = $tasksarray[0]->id;
386 386
 		} else {
387
-			header("Location: " . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . ($withproject ? '&withproject=1' : '') . (empty($mode) ? '' : '&mode=' . $mode));
387
+			header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject ? '&withproject=1' : '').(empty($mode) ? '' : '&mode='.$mode));
388 388
 			exit;
389 389
 		}
390 390
 	}
@@ -422,9 +422,9 @@  discard block
 block discarded – undo
422 422
 	if (!($projectstatic->thirdparty->id > 0)) {
423 423
 		setEventMessages($langs->trans("ThirdPartyRequiredToGenerateInvoice"), null, 'errors');
424 424
 	} else {
425
-		include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
426
-		include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
427
-		include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
425
+		include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
426
+		include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
427
+		include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
428 428
 
429 429
 		$tmpinvoice = new Facture($db);
430 430
 		$tmptimespent = new Task($db);
@@ -490,7 +490,7 @@  discard block
 block discarded – undo
490 490
 				$arrayoftasks = array();
491 491
 				foreach ($toselect as $key => $value) {
492 492
 					// Get userid, timepent
493
-					$object->fetchTimeSpent($value);    // $value is ID of 1 line in timespent table
493
+					$object->fetchTimeSpent($value); // $value is ID of 1 line in timespent table
494 494
 					$arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration;
495 495
 					$arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm);
496 496
 				}
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
 						}
564 564
 
565 565
 						// Add lines
566
-						$lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username) . ' : ' . $qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), (float) $remiseproject);
566
+						$lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username).' : '.$qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), (float) $remiseproject);
567 567
 						if ($lineid < 0) {
568 568
 							$error++;
569 569
 							setEventMessages(null, $tmpinvoice->errors, 'errors');
@@ -596,16 +596,16 @@  discard block
 block discarded – undo
596 596
 
597 597
 					$arrayoftasks[$object->timespent_id]['timespent'] = $object->timespent_duration;
598 598
 					$arrayoftasks[$object->timespent_id]['totalvaluetodivideby3600'] = $object->timespent_duration * $object->timespent_thm;
599
-					$arrayoftasks[$object->timespent_id]['note'] = $ftask->ref . ' - ' . $ftask->label . ' - ' . $username;
599
+					$arrayoftasks[$object->timespent_id]['note'] = $ftask->ref.' - '.$ftask->label.' - '.$username;
600 600
 					$arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $object->timespent_note);
601 601
 
602 602
 					if (!empty($withdetail)) {
603 603
 						if (!empty($object->timespent_withhour)) {
604
-							$arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date") . ': ' . dol_print_date($object->timespent_datehour));
604
+							$arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date").': '.dol_print_date($object->timespent_datehour));
605 605
 						} else {
606
-							$arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date") . ': ' . dol_print_date($object->timespent_date));
606
+							$arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date").': '.dol_print_date($object->timespent_date));
607 607
 						}
608
-						$arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Duration") . ': ' . convertSecondToTime($object->timespent_duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY));
608
+						$arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Duration").': '.convertSecondToTime($object->timespent_duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY));
609 609
 					}
610 610
 					$arrayoftasks[$object->timespent_id]['user'] = $object->timespent_fk_user;
611 611
 					$arrayoftasks[$object->timespent_id]['fk_product'] = $object->timespent_fk_product;
@@ -683,7 +683,7 @@  discard block
 block discarded – undo
683 683
 				$arrayoftasks = array();
684 684
 				foreach ($toselect as $key => $value) {
685 685
 					// Get userid, timepent
686
-					$object->fetchTimeSpent($value);        // Call method to get list of timespent for a timespent line id (We use the utility method found into Task object)
686
+					$object->fetchTimeSpent($value); // Call method to get list of timespent for a timespent line id (We use the utility method found into Task object)
687 687
 					// $object->id is now the task id
688 688
 					$arrayoftasks[$object->id][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration;
689 689
 					$arrayoftasks[$object->id][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm);
@@ -759,7 +759,7 @@  discard block
 block discarded – undo
759 759
 						// Add lines
760 760
 						$date_start = '';
761 761
 						$date_end = '';
762
-						$lineName = $ftask->ref . ' - ' . $ftask->label;
762
+						$lineName = $ftask->ref.' - '.$ftask->label;
763 763
 						$lineid = $tmpinvoice->addline($lineName, (float) $pu_ht_for_task, (float) price2num($qtyhour / $prodDurationHours, 'MS'), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), (float) $remiseproject, $date_start, $date_end, 0, 0, 0, 'HT', 0, 1, -1, 0, '', 0, 0, 0, $pa_ht);
764 764
 						if ($lineid < 0) {
765 765
 							$error++;
@@ -769,8 +769,8 @@  discard block
 block discarded – undo
769 769
 
770 770
 						if (!$error) {
771 771
 							// Update lineid into line of timespent
772
-							$sql = 'UPDATE ' . MAIN_DB_PREFIX . 'element_time SET invoice_line_id = ' . ((int) $lineid) . ', invoice_id = ' . ((int) $tmpinvoice->id);
773
-							$sql .= ' WHERE rowid IN (' . $db->sanitize(implode(',', $toselect)) . ')';
772
+							$sql = 'UPDATE '.MAIN_DB_PREFIX.'element_time SET invoice_line_id = '.((int) $lineid).', invoice_id = '.((int) $tmpinvoice->id);
773
+							$sql .= ' WHERE rowid IN ('.$db->sanitize(implode(',', $toselect)).')';
774 774
 							$result = $db->query($sql);
775 775
 							if (!$result) {
776 776
 								$error++;
@@ -806,12 +806,12 @@  discard block
 block discarded – undo
806 806
 	if (!($projectstatic->thirdparty->id > 0)) {
807 807
 		setEventMessages($langs->trans("ThirdPartyRequiredToGenerateIntervention"), null, 'errors');
808 808
 	} else {
809
-		include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
810
-		include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
811
-		include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
809
+		include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
810
+		include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
811
+		include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
812 812
 
813 813
 
814
-		require_once DOL_DOCUMENT_ROOT . '/fichinter/class/fichinter.class.php';
814
+		require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
815 815
 		$tmpinter = new Fichinter($db);
816 816
 		$tmptimespent = new Task($db);
817 817
 		$fuser = new User($db);
@@ -823,7 +823,7 @@  discard block
 block discarded – undo
823 823
 		$tmpinter->socid = $projectstatic->thirdparty->id;
824 824
 		$tmpinter->date = dol_mktime(GETPOSTINT('rehour'), GETPOSTINT('remin'), GETPOSTINT('resec'), GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'));
825 825
 		$tmpinter->fk_project = $projectstatic->id;
826
-		$tmpinter->description = $projectstatic->title . (!empty($projectstatic->description) ? '-' . $projectstatic->label : '');
826
+		$tmpinter->description = $projectstatic->title.(!empty($projectstatic->description) ? '-'.$projectstatic->label : '');
827 827
 
828 828
 		if ($interToUse) {
829 829
 			$tmpinter->fetch($interToUse);
@@ -856,7 +856,7 @@  discard block
 block discarded – undo
856 856
 				$qtyhourtext = convertSecondToTime($value['timespent'], 'all', $conf->global->MAIN_DURATION_OF_WORKDAY);
857 857
 
858 858
 				// Add lines
859
-				$lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label . (!empty($value['note']) ? ' - ' . $value['note'] : ''), (int) $value['date'], $value['timespent']);
859
+				$lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label.(!empty($value['note']) ? ' - '.$value['note'] : ''), (int) $value['date'], $value['timespent']);
860 860
 			}
861 861
 		}
862 862
 
@@ -887,9 +887,9 @@  discard block
 block discarded – undo
887 887
 //$result = $projectstatic->fetch($object->fk_project);
888 888
 $arrayofselected = is_array($toselect) ? $toselect : array();
889 889
 
890
-$title = $object->ref . ' - ' . $langs->trans("TimeSpent");
890
+$title = $object->ref.' - '.$langs->trans("TimeSpent");
891 891
 if (!empty($withproject)) {
892
-	$title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : '');
892
+	$title .= ' | '.$langs->trans("Project").(!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '');
893 893
 }
894 894
 $help_url = '';
895 895
 
@@ -938,13 +938,13 @@  discard block
 block discarded – undo
938 938
 
939 939
 			$param = ((!empty($mode) && $mode == 'mine') ? '&mode=mine' : '');
940 940
 			if ($search_user) {
941
-				$param .= '&search_user=' . ((int) $search_user);
941
+				$param .= '&search_user='.((int) $search_user);
942 942
 			}
943 943
 			if ($search_month) {
944
-				$param .= '&search_month=' . ((int) $search_month);
944
+				$param .= '&search_month='.((int) $search_month);
945 945
 			}
946 946
 			if ($search_year) {
947
-				$param .= '&search_year=' . ((int) $search_year);
947
+				$param .= '&search_year='.((int) $search_year);
948 948
 			}
949 949
 
950 950
 			// Project card
@@ -956,14 +956,14 @@  discard block
 block discarded – undo
956 956
 			$morehtmlref .= $projectstatic->title;
957 957
 			// Thirdparty
958 958
 			if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) {
959
-				$morehtmlref .= '<br>' . $projectstatic->thirdparty->getNomUrl(1, 'project');
959
+				$morehtmlref .= '<br>'.$projectstatic->thirdparty->getNomUrl(1, 'project');
960 960
 			}
961 961
 			$morehtmlref .= '</div>';
962 962
 
963 963
 			// Define a complementary filter for search of next/prev ref.
964 964
 			if (!$user->hasRight('projet', 'all', 'lire')) {
965 965
 				$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
966
-				$projectstatic->next_prev_filter = "rowid:IN:" . $db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
966
+				$projectstatic->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
967 967
 			}
968 968
 
969 969
 			dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param);
@@ -981,25 +981,25 @@  discard block
 block discarded – undo
981 981
 				print '</td>';
982 982
 				print '<td>';
983 983
 				if (getDolGlobalString('PROJECT_USE_OPPORTUNITIES')) {
984
-					print '<input type="checkbox" disabled name="usage_opportunity"' . (GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')) . '"> ';
984
+					print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> ';
985 985
 					$htmltext = $langs->trans("ProjectFollowOpportunity");
986 986
 					print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
987 987
 					print '<br>';
988 988
 				}
989 989
 				if (!getDolGlobalString('PROJECT_HIDE_TASKS')) {
990
-					print '<input type="checkbox" disabled name="usage_task"' . (GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')) . '"> ';
990
+					print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> ';
991 991
 					$htmltext = $langs->trans("ProjectFollowTasks");
992 992
 					print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
993 993
 					print '<br>';
994 994
 				}
995 995
 				if (!getDolGlobalString('PROJECT_HIDE_TASKS') && getDolGlobalString('PROJECT_BILL_TIME_SPENT')) {
996
-					print '<input type="checkbox" disabled name="usage_bill_time"' . (GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')) . '"> ';
996
+					print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> ';
997 997
 					$htmltext = $langs->trans("ProjectBillTimeDescription");
998 998
 					print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
999 999
 					print '<br>';
1000 1000
 				}
1001 1001
 				if (isModEnabled('eventorganization')) {
1002
-					print '<input type="checkbox" disabled name="usage_organize_event"' . (GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_organize_event ? ' checked="checked"' : '')) . '"> ';
1002
+					print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_organize_event ? ' checked="checked"' : '')).'"> ';
1003 1003
 					$htmltext = $langs->trans("EventOrganizationDescriptionLong");
1004 1004
 					print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
1005 1005
 				}
@@ -1007,14 +1007,14 @@  discard block
 block discarded – undo
1007 1007
 			}
1008 1008
 
1009 1009
 			// Budget
1010
-			print '<tr><td>' . $langs->trans("Budget") . '</td><td>';
1010
+			print '<tr><td>'.$langs->trans("Budget").'</td><td>';
1011 1011
 			if (!is_null($projectstatic->budget_amount) && strcmp($projectstatic->budget_amount, '')) {
1012
-				print '<span class="amount">' . price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency) . '</span>';
1012
+				print '<span class="amount">'.price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).'</span>';
1013 1013
 			}
1014 1014
 			print '</td></tr>';
1015 1015
 
1016 1016
 			// Date start - end project
1017
-			print '<tr><td>' . $langs->trans("Dates") . '</td><td>';
1017
+			print '<tr><td>'.$langs->trans("Dates").'</td><td>';
1018 1018
 			$start = dol_print_date($projectstatic->date_start, 'day');
1019 1019
 			print($start ? $start : '?');
1020 1020
 			$end = dol_print_date($projectstatic->date_end, 'day');
@@ -1026,7 +1026,7 @@  discard block
 block discarded – undo
1026 1026
 			print '</td></tr>';
1027 1027
 
1028 1028
 			// Visibility
1029
-			print '<tr><td class="titlefield">' . $langs->trans("Visibility") . '</td><td>';
1029
+			print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
1030 1030
 			if ($projectstatic->public) {
1031 1031
 				print img_picto($langs->trans('SharedProject'), 'world', 'class="paddingrightonly"');
1032 1032
 				print $langs->trans('SharedProject');
@@ -1040,7 +1040,7 @@  discard block
 block discarded – undo
1040 1040
 			$cols = 2;
1041 1041
 			$savobject = $object;
1042 1042
 			$object = $projectstatic;
1043
-			include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
1043
+			include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
1044 1044
 			$object = $savobject;
1045 1045
 
1046 1046
 			print '</table>';
@@ -1053,7 +1053,7 @@  discard block
 block discarded – undo
1053 1053
 
1054 1054
 			// Categories
1055 1055
 			if (isModEnabled('category')) {
1056
-				print '<tr><td class="valignmiddle">' . $langs->trans("Categories") . '</td><td>';
1056
+				print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
1057 1057
 				print $form->showCategories($projectstatic->id, 'project', 1);
1058 1058
 				print "</td></tr>";
1059 1059
 			}
@@ -1092,12 +1092,12 @@  discard block
 block discarded – undo
1092 1092
 
1093 1093
 				if (!empty($projectidforalltimes)) {
1094 1094
 					// We are on tab 'Time Spent' of project
1095
-					$backtourl = $_SERVER['PHP_SELF'] . '?projectid=' . $projectstatic->id . ($withproject ? '&withproject=1' : '');
1096
-					$linktocreatetimeUrl = $_SERVER['PHP_SELF'] . '?' . ($withproject ? 'withproject=1' : '') . '&projectid=' . $projectstatic->id . '&action=createtime&token=' . newToken() . $param . '&backtopage=' . urlencode($backtourl);
1095
+					$backtourl = $_SERVER['PHP_SELF'].'?projectid='.$projectstatic->id.($withproject ? '&withproject=1' : '');
1096
+					$linktocreatetimeUrl = $_SERVER['PHP_SELF'].'?'.($withproject ? 'withproject=1' : '').'&projectid='.$projectstatic->id.'&action=createtime&token='.newToken().$param.'&backtopage='.urlencode($backtourl);
1097 1097
 				} else {
1098 1098
 					// We are on tab 'Time Spent' of task
1099
-					$backtourl = $_SERVER['PHP_SELF'] . '?id=' . $object->id . ($withproject ? '&withproject=1' : '');
1100
-					$linktocreatetimeUrl = $_SERVER['PHP_SELF'] . '?' . ($withproject ? 'withproject=1' : '') . ($object->id > 0 ? '&id=' . $object->id : '&projectid=' . $projectstatic->id) . '&action=createtime&token=' . newToken() . $param . '&backtopage=' . urlencode($backtourl);
1099
+					$backtourl = $_SERVER['PHP_SELF'].'?id='.$object->id.($withproject ? '&withproject=1' : '');
1100
+					$linktocreatetimeUrl = $_SERVER['PHP_SELF'].'?'.($withproject ? 'withproject=1' : '').($object->id > 0 ? '&id='.$object->id : '&projectid='.$projectstatic->id).'&action=createtime&token='.newToken().$param.'&backtopage='.urlencode($backtourl);
1101 1101
 				}
1102 1102
 			} else {
1103 1103
 				$linktocreatetimeBtnStatus = -2;
@@ -1142,19 +1142,19 @@  discard block
 block discarded – undo
1142 1142
 		print dol_get_fiche_head($head, 'task_time', $langs->trans("Task"), -1, 'projecttask', 0, '', 'reposition');
1143 1143
 
1144 1144
 		if ($action == 'deleteline') {
1145
-			$urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($object->id > 0 ? "id=" . $object->id : 'projectid=' . $projectstatic->id) . '&lineid=' . GETPOSTINT("lineid") . ($withproject ? '&withproject=1' : '');
1145
+			$urlafterconfirm = $_SERVER["PHP_SELF"]."?".($object->id > 0 ? "id=".$object->id : 'projectid='.$projectstatic->id).'&lineid='.GETPOSTINT("lineid").($withproject ? '&withproject=1' : '');
1146 1146
 			print $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1);
1147 1147
 		}
1148 1148
 
1149 1149
 		$param = ($withproject ? '&withproject=1' : '');
1150
-		$param .= ($param ? '&' : '') . 'id=' . $object->id;        // ID of task
1151
-		$linkback = $withproject ? '<a href="' . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . '">' . $langs->trans("BackToList") . '</a>' : '';
1150
+		$param .= ($param ? '&' : '').'id='.$object->id; // ID of task
1151
+		$linkback = $withproject ? '<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>' : '';
1152 1152
 
1153 1153
 		if (!GETPOST('withproject') || empty($projectstatic->id)) {
1154 1154
 			$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1);
1155
-			$object->next_prev_filter = "fk_projet:IN:" . $db->sanitize($projectsListId);
1155
+			$object->next_prev_filter = "fk_projet:IN:".$db->sanitize($projectsListId);
1156 1156
 		} else {
1157
-			$object->next_prev_filter = "fk_projet:=:" . ((int) $projectstatic->id);
1157
+			$object->next_prev_filter = "fk_projet:=:".((int) $projectstatic->id);
1158 1158
 		}
1159 1159
 
1160 1160
 		$morehtmlref = '';
@@ -1162,12 +1162,12 @@  discard block
 block discarded – undo
1162 1162
 		// Project
1163 1163
 		if (empty($withproject)) {
1164 1164
 			$morehtmlref .= '<div class="refidno">';
1165
-			$morehtmlref .= $langs->trans("Project") . ': ';
1165
+			$morehtmlref .= $langs->trans("Project").': ';
1166 1166
 			$morehtmlref .= $projectstatic->getNomUrl(1);
1167 1167
 			$morehtmlref .= '<br>';
1168 1168
 
1169 1169
 			// Third party
1170
-			$morehtmlref .= $langs->trans("ThirdParty") . ': ';
1170
+			$morehtmlref .= $langs->trans("ThirdParty").': ';
1171 1171
 			if (!empty($projectstatic->thirdparty) && is_object($projectstatic->thirdparty)) {
1172 1172
 				$morehtmlref .= $projectstatic->thirdparty->getNomUrl(1);
1173 1173
 			}
@@ -1183,7 +1183,7 @@  discard block
 block discarded – undo
1183 1183
 		print '<table class="border centpercent tableforfield">';
1184 1184
 
1185 1185
 		// Task parent
1186
-		print '<tr><td>' . $langs->trans("ChildOfTask") . '</td><td>';
1186
+		print '<tr><td>'.$langs->trans("ChildOfTask").'</td><td>';
1187 1187
 		if ($object->fk_task_parent > 0) {
1188 1188
 			$tasktmp = new Task($db);
1189 1189
 			$tasktmp->fetch($object->fk_task_parent);
@@ -1192,7 +1192,7 @@  discard block
 block discarded – undo
1192 1192
 		print '</td></tr>';
1193 1193
 
1194 1194
 		// Date start - Date end task
1195
-		print '<tr><td class="titlefield">' . $langs->trans("DateStart") . ' - ' . $langs->trans("Deadline") . '</td><td>';
1195
+		print '<tr><td class="titlefield">'.$langs->trans("DateStart").' - '.$langs->trans("Deadline").'</td><td>';
1196 1196
 		$start = dol_print_date($object->date_start, 'dayhour');
1197 1197
 		print($start ? $start : '?');
1198 1198
 		$end = dol_print_date($object->date_end, 'dayhour');
@@ -1204,7 +1204,7 @@  discard block
 block discarded – undo
1204 1204
 		print '</td></tr>';
1205 1205
 
1206 1206
 		// Planned workload
1207
-		print '<tr><td>' . $langs->trans("PlannedWorkload") . '</td><td>';
1207
+		print '<tr><td>'.$langs->trans("PlannedWorkload").'</td><td>';
1208 1208
 		if ($object->planned_workload) {
1209 1209
 			print convertSecondToTime($object->planned_workload, 'allhourmin');
1210 1210
 		}
@@ -1219,21 +1219,21 @@  discard block
 block discarded – undo
1219 1219
 		print '<table class="border tableforfield centpercent">';
1220 1220
 
1221 1221
 		// Progress declared
1222
-		print '<tr><td class="titlefield">' . $langs->trans("ProgressDeclared") . '</td><td>';
1223
-		print $object->progress != '' ? $object->progress . ' %' : '';
1222
+		print '<tr><td class="titlefield">'.$langs->trans("ProgressDeclared").'</td><td>';
1223
+		print $object->progress != '' ? $object->progress.' %' : '';
1224 1224
 		print '</td></tr>';
1225 1225
 
1226 1226
 		// Progress calculated
1227
-		print '<tr><td>' . $langs->trans("ProgressCalculated") . '</td><td>';
1227
+		print '<tr><td>'.$langs->trans("ProgressCalculated").'</td><td>';
1228 1228
 		if ($object->planned_workload) {
1229 1229
 			$tmparray = $object->getSummaryOfTimeSpent();
1230 1230
 			if ($tmparray['total_duration'] > 0) {
1231
-				print round($tmparray['total_duration'] / $object->planned_workload * 100, 2) . ' %';
1231
+				print round($tmparray['total_duration'] / $object->planned_workload * 100, 2).' %';
1232 1232
 			} else {
1233 1233
 				print '0 %';
1234 1234
 			}
1235 1235
 		} else {
1236
-			print '<span class="opacitymedium">' . $langs->trans("WorkloadNotDefined") . '</span>';
1236
+			print '<span class="opacitymedium">'.$langs->trans("WorkloadNotDefined").'</span>';
1237 1237
 		}
1238 1238
 		print '</td>';
1239 1239
 
@@ -1249,7 +1249,7 @@  discard block
 block discarded – undo
1249 1249
 		print dol_get_fiche_end();
1250 1250
 	} else {
1251 1251
 		if ($action == 'deleteline') {
1252
-			$urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($object->id > 0 ? "id=" . $object->id : 'projectid=' . $projectstatic->id) . '&lineid=' . GETPOSTINT("lineid") . ($withproject ? '&withproject=1' : '');
1252
+			$urlafterconfirm = $_SERVER["PHP_SELF"]."?".($object->id > 0 ? "id=".$object->id : 'projectid='.$projectstatic->id).'&lineid='.GETPOSTINT("lineid").($withproject ? '&withproject=1' : '');
1253 1253
 			print $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1);
1254 1254
 		}
1255 1255
 	}
@@ -1263,7 +1263,7 @@  discard block
 block discarded – undo
1263 1263
 
1264 1264
 		if ($action == 'deleteline' && !empty($projectidforalltimes)) {
1265 1265
 			// We must use projectidprojectid if on list of timespent of project and id=taskid if on list of timespent of a task
1266
-			$urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($projectstatic->id > 0 ? 'projectid=' . $projectstatic->id : ($object->id > 0 ? "id=" . $object->id : '')) . '&lineid=' . GETPOSTINT('lineid') . ($withproject ? '&withproject=1' : '') . "&contextpage=" . urlencode($contextpage);
1266
+			$urlafterconfirm = $_SERVER["PHP_SELF"]."?".($projectstatic->id > 0 ? 'projectid='.$projectstatic->id : ($object->id > 0 ? "id=".$object->id : '')).'&lineid='.GETPOSTINT('lineid').($withproject ? '&withproject=1' : '')."&contextpage=".urlencode($contextpage);
1267 1267
 			$formconfirm = $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1);
1268 1268
 		}
1269 1269
 
@@ -1282,10 +1282,10 @@  discard block
 block discarded – undo
1282 1282
 		// Definition of fields for list
1283 1283
 		$arrayfields = array();
1284 1284
 		$arrayfields['t.element_date'] = array('label' => $langs->trans("Date"), 'checked' => '1');
1285
-		$arrayfields['p.fk_soc'] = array('label' => $langs->trans("ThirdParty"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1','checked' => '1');
1285
+		$arrayfields['p.fk_soc'] = array('label' => $langs->trans("ThirdParty"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1', 'checked' => '1');
1286 1286
 		$arrayfields['s.name_alias'] = array('label' => $langs->trans("AliasNameShort"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1');
1287 1287
 		if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) {	// Not a dedicated task
1288
-			if (! empty($allprojectforuser)) {
1288
+			if (!empty($allprojectforuser)) {
1289 1289
 				$arrayfields['p.project_ref'] = ['label' => $langs->trans('RefProject'), 'checked' => '1'];
1290 1290
 				$arrayfields['p.project_label'] = ['label' => $langs->trans('ProjectLabel'), 'checked' => '1'];
1291 1291
 			}
@@ -1301,83 +1301,83 @@  discard block
 block discarded – undo
1301 1301
 		$arrayfields['value'] = array('label' => $langs->trans("Value"), 'checked' => '1', 'enabled' => (string) (int) isModEnabled("salaries"));
1302 1302
 		$arrayfields['valuebilled'] = array('label' => $langs->trans("Billed"), 'checked' => '1', 'enabled' => (string) (int) (((getDolGlobalInt('PROJECT_HIDE_TASKS') || !getDolGlobalInt('PROJECT_BILL_TIME_SPENT')) ? 0 : 1) && $projectstatic->usage_bill_time));
1303 1303
 		// Extra fields
1304
-		include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_array_fields.tpl.php';
1304
+		include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
1305 1305
 
1306 1306
 		$arrayfields = dol_sort_array($arrayfields, 'position');
1307 1307
 		// '@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';  // dol_sort_array looses type for Phan
1308 1308
 
1309 1309
 		$param = '';
1310 1310
 		if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
1311
-			$param .= '&contextpage=' . urlencode($contextpage);
1311
+			$param .= '&contextpage='.urlencode($contextpage);
1312 1312
 		}
1313 1313
 		if ($limit > 0 && $limit != $conf->liste_limit) {
1314 1314
 			$param .= '&limit='.((int) $limit);
1315 1315
 		}
1316 1316
 		if ($search_month > 0) {
1317
-			$param .= '&search_month=' . urlencode((string) ($search_month));
1317
+			$param .= '&search_month='.urlencode((string) ($search_month));
1318 1318
 		}
1319 1319
 		if ($search_year > 0) {
1320
-			$param .= '&search_year=' . urlencode((string) ($search_year));
1320
+			$param .= '&search_year='.urlencode((string) ($search_year));
1321 1321
 		}
1322 1322
 		if (!empty($search_user)) { 	// We keep param if -1 because default value is forced to user id if not set
1323 1323
 			$param .= '&search_user='.urlencode($search_user);
1324 1324
 		}
1325 1325
 		if ($search_task_ref != '') {
1326
-			$param .= '&search_task_ref=' . urlencode($search_task_ref);
1326
+			$param .= '&search_task_ref='.urlencode($search_task_ref);
1327 1327
 		}
1328 1328
 		if ($search_company != '') {
1329
-			$param .= '&amp;$search_company=' . urlencode($search_company);
1329
+			$param .= '&amp;$search_company='.urlencode($search_company);
1330 1330
 		}
1331 1331
 		if ($search_company_alias != '') {
1332
-			$param .= '&amp;$search_company_alias=' . urlencode($search_company_alias);
1332
+			$param .= '&amp;$search_company_alias='.urlencode($search_company_alias);
1333 1333
 		}
1334 1334
 		if ($search_project_ref != '') {
1335
-			$param .= '&amp;$search_project_ref=' . urlencode($search_project_ref);
1335
+			$param .= '&amp;$search_project_ref='.urlencode($search_project_ref);
1336 1336
 		}
1337 1337
 		if ($search_project_label != '') {
1338
-			$param .= '&amp;$search_project_label=' . urlencode($search_project_label);
1338
+			$param .= '&amp;$search_project_label='.urlencode($search_project_label);
1339 1339
 		}
1340 1340
 		if ($search_task_label != '') {
1341
-			$param .= '&search_task_label=' . urlencode($search_task_label);
1341
+			$param .= '&search_task_label='.urlencode($search_task_label);
1342 1342
 		}
1343 1343
 		if ($search_note != '') {
1344
-			$param .= '&search_note=' . urlencode($search_note);
1344
+			$param .= '&search_note='.urlencode($search_note);
1345 1345
 		}
1346 1346
 		if ($search_duration != '') {
1347
-			$param .= '&amp;search_field2=' . urlencode((string) ($search_duration));
1347
+			$param .= '&amp;search_field2='.urlencode((string) ($search_duration));
1348 1348
 		}
1349 1349
 		if ($optioncss != '') {
1350
-			$param .= '&optioncss=' . urlencode($optioncss);
1350
+			$param .= '&optioncss='.urlencode($optioncss);
1351 1351
 		}
1352 1352
 		if ($search_date_startday) {
1353
-			$param .= '&search_date_startday=' . urlencode((string) ($search_date_startday));
1353
+			$param .= '&search_date_startday='.urlencode((string) ($search_date_startday));
1354 1354
 		}
1355 1355
 		if ($search_date_startmonth) {
1356
-			$param .= '&search_date_startmonth=' . urlencode((string) ($search_date_startmonth));
1356
+			$param .= '&search_date_startmonth='.urlencode((string) ($search_date_startmonth));
1357 1357
 		}
1358 1358
 		if ($search_date_startyear) {
1359
-			$param .= '&search_date_startyear=' . urlencode((string) ($search_date_startyear));
1359
+			$param .= '&search_date_startyear='.urlencode((string) ($search_date_startyear));
1360 1360
 		}
1361 1361
 		if ($search_date_endday) {
1362
-			$param .= '&search_date_endday=' . urlencode((string) ($search_date_endday));
1362
+			$param .= '&search_date_endday='.urlencode((string) ($search_date_endday));
1363 1363
 		}
1364 1364
 		if ($search_date_endmonth) {
1365
-			$param .= '&search_date_endmonth=' . urlencode((string) ($search_date_endmonth));
1365
+			$param .= '&search_date_endmonth='.urlencode((string) ($search_date_endmonth));
1366 1366
 		}
1367 1367
 		if ($search_date_endyear) {
1368
-			$param .= '&search_date_endyear=' . urlencode((string) ($search_date_endyear));
1368
+			$param .= '&search_date_endyear='.urlencode((string) ($search_date_endyear));
1369 1369
 		}
1370 1370
 		if ($search_timespent_starthour) {
1371
-			$param .= '&search_timespent_duration_starthour=' . urlencode((string) ($search_timespent_starthour));
1371
+			$param .= '&search_timespent_duration_starthour='.urlencode((string) ($search_timespent_starthour));
1372 1372
 		}
1373 1373
 		if ($search_timespent_startmin) {
1374
-			$param .= '&search_timespent_duration_startmin=' . urlencode((string) ($search_timespent_startmin));
1374
+			$param .= '&search_timespent_duration_startmin='.urlencode((string) ($search_timespent_startmin));
1375 1375
 		}
1376 1376
 		if ($search_timespent_endhour) {
1377
-			$param .= '&search_timespent_duration_endhour=' . urlencode((string) ($search_timespent_endhour));
1377
+			$param .= '&search_timespent_duration_endhour='.urlencode((string) ($search_timespent_endhour));
1378 1378
 		}
1379 1379
 		if ($search_timespent_endmin) {
1380
-			$param .= '&search_timespent_duration_endmin=' . urlencode((string) ($search_timespent_endmin));
1380
+			$param .= '&search_timespent_duration_endmin='.urlencode((string) ($search_timespent_endmin));
1381 1381
 		}
1382 1382
 
1383 1383
 		/*
@@ -1385,24 +1385,24 @@  discard block
 block discarded – undo
1385 1385
 		 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
1386 1386
 		 */
1387 1387
 		if ($id) {
1388
-			$param .= '&id=' . urlencode((string) ($id));
1388
+			$param .= '&id='.urlencode((string) ($id));
1389 1389
 		}
1390 1390
 		if ($projectid) {
1391
-			$param .= '&projectid=' . urlencode((string) ($projectid));
1391
+			$param .= '&projectid='.urlencode((string) ($projectid));
1392 1392
 		}
1393 1393
 		if ($withproject) {
1394
-			$param .= '&withproject=' . urlencode((string) ($withproject));
1394
+			$param .= '&withproject='.urlencode((string) ($withproject));
1395 1395
 		}
1396 1396
 		// Add $param from hooks
1397 1397
 		$parameters = array('param' => &$param);
1398 1398
 		$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
1399 1399
 		$param .= $hookmanager->resPrint;
1400 1400
 
1401
-		print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
1401
+		print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
1402 1402
 		if ($optioncss != '') {
1403
-			print '<input type="hidden" name="optioncss" value="' . $optioncss . '">';
1403
+			print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
1404 1404
 		}
1405
-		print '<input type="hidden" name="token" value="' . newToken() . '">';
1405
+		print '<input type="hidden" name="token" value="'.newToken().'">';
1406 1406
 		print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
1407 1407
 		if ($action == 'editline') {
1408 1408
 			print '<input type="hidden" name="action" value="updateline">';
@@ -1417,13 +1417,13 @@  discard block
 block discarded – undo
1417 1417
 		} else {
1418 1418
 			print '<input type="hidden" name="action" value="list">';
1419 1419
 		}
1420
-		print '<input type="hidden" name="sortfield" value="' . $sortfield . '">';
1421
-		print '<input type="hidden" name="sortorder" value="' . $sortorder . '">';
1420
+		print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
1421
+		print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
1422 1422
 
1423
-		print '<input type="hidden" name="id" value="' . $id . '">';
1424
-		print '<input type="hidden" name="projectid" value="' . $projectidforalltimes . '">';
1425
-		print '<input type="hidden" name="withproject" value="' . $withproject . '">';
1426
-		print '<input type="hidden" name="tab" value="' . $tab . '">';
1423
+		print '<input type="hidden" name="id" value="'.$id.'">';
1424
+		print '<input type="hidden" name="projectid" value="'.$projectidforalltimes.'">';
1425
+		print '<input type="hidden" name="withproject" value="'.$withproject.'">';
1426
+		print '<input type="hidden" name="tab" value="'.$tab.'">';
1427 1427
 		print '<input type="hidden" name="page_y" value="">';
1428 1428
 
1429 1429
 		// Form to convert time spent into invoice
@@ -1450,7 +1450,7 @@  discard block
 block discarded – undo
1450 1450
 					'onelineperperiod' => 'OneLinePerTimeSpentLine',
1451 1451
 				);
1452 1452
 				print $form->selectarray('generateinvoicemode', $tmparray, 'onelineperuser', 0, 0, 0, '', 1);
1453
-				print "\n" . '<script type="text/javascript">';
1453
+				print "\n".'<script type="text/javascript">';
1454 1454
 				print '
1455 1455
 				$(document).ready(function () {
1456 1456
 					setDetailVisibility();
@@ -1467,8 +1467,8 @@  discard block
 block discarded – undo
1467 1467
             		}
1468 1468
             	});
1469 1469
             			';
1470
-				print '</script>' . "\n";
1471
-				print '<span style="display:none" id="detail_time_duration"><input type="checkbox" value="detail" name="detail_time_duration"/>' . $langs->trans('AddDetailDateAndDuration') . '</span>';
1470
+				print '</script>'."\n";
1471
+				print '<span style="display:none" id="detail_time_duration"><input type="checkbox" value="detail" name="detail_time_duration"/>'.$langs->trans('AddDetailDateAndDuration').'</span>';
1472 1472
 				print '</td>';
1473 1473
 				print '</tr>';
1474 1474
 
@@ -1518,14 +1518,14 @@  discard block
 block discarded – undo
1518 1518
 
1519 1519
 				print '<br>';
1520 1520
 				print '<div class="center">';
1521
-				print '<input type="submit" class="button" id="createbills" name="createbills" value="' . $langs->trans('GenerateBill') . '">  ';
1522
-				print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="' . $langs->trans("Cancel") . '">';
1521
+				print '<input type="submit" class="button" id="createbills" name="createbills" value="'.$langs->trans('GenerateBill').'">  ';
1522
+				print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
1523 1523
 				print '</div>';
1524 1524
 				print '<br>';
1525 1525
 			} else {
1526
-				print '<div class="warning">' . $langs->trans("ThirdPartyRequiredToGenerateInvoice") . '</div>';
1526
+				print '<div class="warning">'.$langs->trans("ThirdPartyRequiredToGenerateInvoice").'</div>';
1527 1527
 				print '<div class="center">';
1528
-				print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="' . $langs->trans("Cancel") . '">';
1528
+				print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
1529 1529
 				print '</div>';
1530 1530
 				$massaction = '';
1531 1531
 			}
@@ -1538,7 +1538,7 @@  discard block
 block discarded – undo
1538 1538
 				print '<table class="noborder centpercent">';
1539 1539
 				print '<tr>';
1540 1540
 				print '<td class="titlefield">';
1541
-				print img_picto('', 'intervention', 'class="pictofixedwidth"') . $langs->trans('InterToUse');
1541
+				print img_picto('', 'intervention', 'class="pictofixedwidth"').$langs->trans('InterToUse');
1542 1542
 				print '</td>';
1543 1543
 				print '<td>';
1544 1544
 				$forminter = new FormIntervention($db);
@@ -1548,14 +1548,14 @@  discard block
 block discarded – undo
1548 1548
 				print '</table>';
1549 1549
 
1550 1550
 				print '<div class="center">';
1551
-				print '<input type="submit" class="button" id="createinter" name="createinter" value="' . $langs->trans('GenerateInter') . '">  ';
1552
-				print '<input type="submit" class="button" id="cancel" name="cancel" value="' . $langs->trans('Cancel') . '">';
1551
+				print '<input type="submit" class="button" id="createinter" name="createinter" value="'.$langs->trans('GenerateInter').'">  ';
1552
+				print '<input type="submit" class="button" id="cancel" name="cancel" value="'.$langs->trans('Cancel').'">';
1553 1553
 				print '</div>';
1554 1554
 				print '<br>';
1555 1555
 			} else {
1556
-				print '<div class="warning">' . $langs->trans("ThirdPartyRequiredToGenerateIntervention") . '</div>';
1556
+				print '<div class="warning">'.$langs->trans("ThirdPartyRequiredToGenerateIntervention").'</div>';
1557 1557
 				print '<div class="center">';
1558
-				print '<input type="submit" class="button" id="cancel" name="cancel" value="' . $langs->trans('Cancel') . '">';
1558
+				print '<input type="submit" class="button" id="cancel" name="cancel" value="'.$langs->trans('Cancel').'">';
1559 1559
 				print '</div>';
1560 1560
 				$massaction = '';
1561 1561
 			}
@@ -1625,14 +1625,14 @@  discard block
 block discarded – undo
1625 1625
 			$sql .= " AND t.fk_element =".((int) $object->id);
1626 1626
 		} elseif (!empty($projectidforalltimes)) {
1627 1627
 			// Limit on one project
1628
-			$sql .= " AND pt.fk_projet IN (" . $db->sanitize((string) $projectidforalltimes) . ")";
1628
+			$sql .= " AND pt.fk_projet IN (".$db->sanitize((string) $projectidforalltimes).")";
1629 1629
 		} elseif (!empty($allprojectforuser)) {
1630 1630
 			// Limit on on user
1631 1631
 			if (empty($search_user)) {
1632 1632
 				$search_user = $user->id;
1633 1633
 			}
1634 1634
 			if ($search_user > 0) {
1635
-				$sql .= " AND t.fk_user = " . ((int) $search_user);
1635
+				$sql .= " AND t.fk_user = ".((int) $search_user);
1636 1636
 			}
1637 1637
 		}
1638 1638
 
@@ -1685,13 +1685,13 @@  discard block
 block discarded – undo
1685 1685
 			if ($search_timespent_starthour || $search_timespent_startmin) {
1686 1686
 				$timespent_duration_start = $search_timespent_starthour * 60 * 60; // We store duration in seconds
1687 1687
 				$timespent_duration_start += ($search_timespent_startmin ? $search_timespent_startmin : 0) * 60; // We store duration in seconds
1688
-				$sql .= " AND t.element_duration >= " . $timespent_duration_start;
1688
+				$sql .= " AND t.element_duration >= ".$timespent_duration_start;
1689 1689
 			}
1690 1690
 
1691 1691
 			if ($search_timespent_endhour || $search_timespent_endmin) {
1692 1692
 				$timespent_duration_end = $search_timespent_endhour * 60 * 60; // We store duration in seconds
1693 1693
 				$timespent_duration_end += ($search_timespent_endmin ? $search_timespent_endmin : 0) * 60; // We store duration in seconds
1694
-				$sql .= " AND t.element_duration <= " . $timespent_duration_end;
1694
+				$sql .= " AND t.element_duration <= ".$timespent_duration_end;
1695 1695
 			}
1696 1696
 		}
1697 1697
 
@@ -1739,13 +1739,13 @@  discard block
 block discarded – undo
1739 1739
 
1740 1740
 		if ($num >= 0) {
1741 1741
 			if (!empty($projectidforalltimes)) {
1742
-				print '<!-- List of time spent for project -->' . "\n";
1742
+				print '<!-- List of time spent for project -->'."\n";
1743 1743
 
1744 1744
 				$title = $langs->trans("ListTaskTimeUserProject");
1745 1745
 
1746 1746
 				print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'clock', 0, $linktocreatetime, '', $limit, 0, 0, 1);
1747 1747
 			} else {
1748
-				print '<!-- List of time spent -->' . "\n";
1748
+				print '<!-- List of time spent -->'."\n";
1749 1749
 
1750 1750
 				$title = $langs->trans("ListTaskTimeForTask");
1751 1751
 
@@ -1767,26 +1767,26 @@  discard block
 block discarded – undo
1767 1767
 		 * Form to add a new line of time spent
1768 1768
 		 */
1769 1769
 		if ($action == 'createtime' && $user->hasRight('projet', 'time')) {
1770
-			print '<!-- table to add time spent -->' . "\n";
1770
+			print '<!-- table to add time spent -->'."\n";
1771 1771
 			if (!empty($id)) {
1772
-				print '<input type="hidden" name="taskid" value="' . $id . '">';
1772
+				print '<input type="hidden" name="taskid" value="'.$id.'">';
1773 1773
 			}
1774 1774
 
1775 1775
 			print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
1776 1776
 			print '<table class="noborder nohover centpercent">';
1777 1777
 
1778 1778
 			print '<tr class="liste_titre">';
1779
-			print '<td>' . $langs->trans("Date") . '</td>';
1779
+			print '<td>'.$langs->trans("Date").'</td>';
1780 1780
 			if (!empty($allprojectforuser)) {
1781
-				print '<td>' . $langs->trans("Project") . '</td>';
1781
+				print '<td>'.$langs->trans("Project").'</td>';
1782 1782
 			}
1783 1783
 			if (empty($id)) {
1784
-				print '<td>' . $langs->trans("Task") . '</td>';
1784
+				print '<td>'.$langs->trans("Task").'</td>';
1785 1785
 			}
1786
-			print '<td>' . $langs->trans("By") . '</td>';
1787
-			print '<td>' . $langs->trans("Note") . '</td>';
1788
-			print '<td>' . $langs->trans("NewTimeSpent") . '</td>';
1789
-			print '<td>' . $langs->trans("ProgressDeclared") . '</td>';
1786
+			print '<td>'.$langs->trans("By").'</td>';
1787
+			print '<td>'.$langs->trans("Note").'</td>';
1788
+			print '<td>'.$langs->trans("NewTimeSpent").'</td>';
1789
+			print '<td>'.$langs->trans("ProgressDeclared").'</td>';
1790 1790
 			if (!getDolGlobalString('PROJECT_HIDE_TASKS') && getDolGlobalString('PROJECT_BILL_TIME_SPENT')) {
1791 1791
 				print '<td></td>';
1792 1792
 
@@ -1840,14 +1840,14 @@  discard block
 block discarded – undo
1840 1840
 				print $form->select_dolusers((GETPOSTINT('userid') ? GETPOSTINT('userid') : $userid), 'userid', 0, null, 0, '', $contactsofproject, '0', 0, 0, '', 0, $langs->trans("ResourceNotAssignedToProject"), 'minwidth150imp maxwidth200');
1841 1841
 			} else {
1842 1842
 				if ($nboftasks) {
1843
-					print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . ' ' . $langs->trans('FirstAddRessourceToAllocateTime');
1843
+					print img_error($langs->trans('FirstAddRessourceToAllocateTime')).' '.$langs->trans('FirstAddRessourceToAllocateTime');
1844 1844
 				}
1845 1845
 			}
1846 1846
 			print '</td>';
1847 1847
 
1848 1848
 			// Note
1849 1849
 			print '<td>';
1850
-			print '<textarea name="timespent_note" class="maxwidth100onsmartphone" rows="' . ROWS_2 . '">' . (GETPOST('timespent_note') ? GETPOST('timespent_note') : '') . '</textarea>';
1850
+			print '<textarea name="timespent_note" class="maxwidth100onsmartphone" rows="'.ROWS_2.'">'.(GETPOST('timespent_note') ? GETPOST('timespent_note') : '').'</textarea>';
1851 1851
 			print '</td>';
1852 1852
 
1853 1853
 			// Duration - Time spent
@@ -1915,7 +1915,7 @@  discard block
 block discarded – undo
1915 1915
 		$selectedfields .= (is_array($arrayofmassactions) && count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
1916 1916
 
1917 1917
 		print '<div class="div-table-responsive">';
1918
-		print '<table class="tagtable nobottomiftotal liste' . ($moreforfilter ? " listwithfilterbefore" : "") . '">' . "\n";
1918
+		print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
1919 1919
 
1920 1920
 		// Fields title search
1921 1921
 		// --------------------------------------------------------------------
@@ -1940,20 +1940,20 @@  discard block
 block discarded – undo
1940 1940
 		}
1941 1941
 		// Thirdparty
1942 1942
 		if (!empty($arrayfields['p.fk_soc']['checked'])) {
1943
-			print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company" value="' . dol_escape_htmltag($search_company) . '"></td>';
1943
+			print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company" value="'.dol_escape_htmltag($search_company).'"></td>';
1944 1944
 		}
1945 1945
 
1946 1946
 		// Thirdparty alias
1947 1947
 		if (!empty($arrayfields['s.name_alias']['checked'])) {
1948
-			print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company_alias" value="' . dol_escape_htmltag($search_company_alias) . '"></td>';
1948
+			print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company_alias" value="'.dol_escape_htmltag($search_company_alias).'"></td>';
1949 1949
 		}
1950 1950
 
1951 1951
 		if (!empty($allprojectforuser)) {
1952 1952
 			if (!empty($arrayfields['p.project_ref']['checked'])) {
1953
-				print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_ref" value="' . dol_escape_htmltag($search_project_ref) . '"></td>';
1953
+				print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_ref" value="'.dol_escape_htmltag($search_project_ref).'"></td>';
1954 1954
 			}
1955 1955
 			if (!empty($arrayfields['p.project_label']['checked'])) {
1956
-				print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_label" value="' . dol_escape_htmltag($search_project_label) . '"></td>';
1956
+				print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_label" value="'.dol_escape_htmltag($search_project_label).'"></td>';
1957 1957
 			}
1958 1958
 		}
1959 1959
 		// Task
@@ -1971,7 +1971,7 @@  discard block
 block discarded – undo
1971 1971
 		}
1972 1972
 		// Note
1973 1973
 		if (!empty($arrayfields['t.note']['checked'])) {
1974
-			print '<td class="liste_titre"><input type="text" class="flat maxwidth75" name="search_note" value="' . dol_escape_htmltag($search_note) . '"></td>';
1974
+			print '<td class="liste_titre"><input type="text" class="flat maxwidth75" name="search_note" value="'.dol_escape_htmltag($search_note).'"></td>';
1975 1975
 		}
1976 1976
 		// Duration
1977 1977
 		if (!empty($arrayfields['t.element_duration']['checked'])) {
@@ -1982,7 +1982,7 @@  discard block
 block discarded – undo
1982 1982
 			if ($search_timespent_starthour || $search_timespent_startmin) {
1983 1983
 				$durationtouse_start = ($search_timespent_starthour * 3600 + $search_timespent_startmin * 60);
1984 1984
 			}
1985
-			print '<div class="nowraponall">' . $langs->trans('from') . ' ';
1985
+			print '<div class="nowraponall">'.$langs->trans('from').' ';
1986 1986
 			print $form->select_duration('search_timespent_duration_start', $durationtouse_start, 0, 'text', 0, 1);
1987 1987
 			print '</div>';
1988 1988
 
@@ -1990,7 +1990,7 @@  discard block
 block discarded – undo
1990 1990
 			if ($search_timespent_endhour || $search_timespent_endmin) {
1991 1991
 				$durationtouse_end = ($search_timespent_endhour * 3600 + $search_timespent_endmin * 60);
1992 1992
 			}
1993
-			print '<div class="nowraponall">' . $langs->trans('to') . ' ';
1993
+			print '<div class="nowraponall">'.$langs->trans('to').' ';
1994 1994
 			print $form->select_duration('search_timespent_duration_end', $durationtouse_end, 0, 'text', 0, 1);
1995 1995
 			print '</div>';
1996 1996
 
@@ -2006,7 +2006,7 @@  discard block
 block discarded – undo
2006 2006
 		}
2007 2007
 		// Value billed
2008 2008
 		if (!empty($arrayfields['valuebilled']['checked'])) {
2009
-			print '<td class="liste_titre center">' . $form->selectyesno('search_valuebilled', $search_valuebilled, 1, false, 1) . '</td>';
2009
+			print '<td class="liste_titre center">'.$form->selectyesno('search_valuebilled', $search_valuebilled, 1, false, 1).'</td>';
2010 2010
 		}
2011 2011
 
2012 2012
 		/*
@@ -2024,7 +2024,7 @@  discard block
 block discarded – undo
2024 2024
 			print $searchpicto;
2025 2025
 			print '</td>';
2026 2026
 		}
2027
-		print '</tr>' . "\n";
2027
+		print '</tr>'."\n";
2028 2028
 
2029 2029
 
2030 2030
 		$totalarray = array();
@@ -2142,7 +2142,7 @@  discard block
 block discarded – undo
2142 2142
 			if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
2143 2143
 				print '<td class="center nowraponall">';
2144 2144
 				if (($action == 'editline' || $action == 'splitline') && GETPOSTINT('lineid') == $task_time->rowid) {
2145
-					print '<input type="hidden" name="lineid" value="' . GETPOSTINT('lineid') . '">';
2145
+					print '<input type="hidden" name="lineid" value="'.GETPOSTINT('lineid').'">';
2146 2146
 					print '<input type="submit" class="button buttongen smallpaddingimp margintoponlyshort marginbottomonlyshort button-save" name="save" value="'.$langs->trans("Save").'">';
2147 2147
 					print '<br>';
2148 2148
 					print '<input type="submit" class="button buttongen smallpaddingimp margintoponlyshort marginbottomonlyshort button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
@@ -2153,7 +2153,7 @@  discard block
 block discarded – undo
2153 2153
 						print '</a>';
2154 2154
 
2155 2155
 						if (getDolGlobalString('PROJECT_ALLOW_SPLIT_TIMESPENT')) {
2156
-							print '<a class="reposition editfielda paddingleft" href="' . $_SERVER["PHP_SELF"] . '?action=splitline&token=' . newToken() . '&lineid=' . $task_time->rowid . $param . ((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '') . '">';
2156
+							print '<a class="reposition editfielda paddingleft" href="'.$_SERVER["PHP_SELF"].'?action=splitline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">';
2157 2157
 							print img_split('', 'class="pictofixedwidth paddingleft"');
2158 2158
 							print '</a>';
2159 2159
 						}
@@ -2171,12 +2171,12 @@  discard block
 block discarded – undo
2171 2171
 
2172 2172
 							// Disable select if task not billable or already invoiced
2173 2173
 							$disabled = (intval($task_time->billable) != 1 || $invoiced);
2174
-							$ctrl = '<input '.($disabled ? 'disabled' : '').' id="cb' . $task_time->rowid . '" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="' . $task_time->rowid . '"' . ($selected ? ' checked="checked"' : '') . '>';
2174
+							$ctrl = '<input '.($disabled ? 'disabled' : '').' id="cb'.$task_time->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$task_time->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
2175 2175
 							if ($disabled) {
2176 2176
 								// If disabled, a dbl-click very close outside the control
2177 2177
 								// will re-enable it, so that user is not blocked if needed.
2178
-								print '<span id="cbsp'. $task_time->rowid . '">'.$ctrl.'</span>';
2179
-								print '<script>$("#cbsp' . $task_time->rowid . '").dblclick(()=>{ $("#cb' . $task_time->rowid . '").removeAttr("disabled") })</script>';
2178
+								print '<span id="cbsp'.$task_time->rowid.'">'.$ctrl.'</span>';
2179
+								print '<script>$("#cbsp'.$task_time->rowid.'").dblclick(()=>{ $("#cb'.$task_time->rowid.'").removeAttr("disabled") })</script>';
2180 2180
 							} else {
2181 2181
 								print $ctrl;
2182 2182
 							}
@@ -2299,7 +2299,7 @@  discard block
 block discarded – undo
2299 2299
 					}
2300 2300
 				}
2301 2301
 			} elseif ($action !== 'createtime') {
2302
-				print '<input type="hidden" name="taskid" value="' . $id . '">';
2302
+				print '<input type="hidden" name="taskid" value="'.$id.'">';
2303 2303
 			}
2304 2304
 
2305 2305
 			// Task label
@@ -2328,9 +2328,9 @@  discard block
 block discarded – undo
2328 2328
 					}
2329 2329
 					if (count($contactsoftask) > 0) {
2330 2330
 						print img_object('', 'user', 'class="pictofixedwidth hideonsmartphone"');
2331
-						print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, null, 0, '', $contactsoftask, '0', 0, 0, '', 0, '', 'minwidth100 maxwidth100');	// maxwidth must be lowed than minwidth of the td
2331
+						print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, null, 0, '', $contactsoftask, '0', 0, 0, '', 0, '', 'minwidth100 maxwidth100'); // maxwidth must be lowed than minwidth of the td
2332 2332
 					} else {
2333
-						print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime');
2333
+						print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime');
2334 2334
 					}
2335 2335
 				} else {
2336 2336
 					$userstatic->id = $task_time->fk_user;
@@ -2352,7 +2352,7 @@  discard block
 block discarded – undo
2352 2352
 			if (!empty($arrayfields['t.note']['checked'])) {
2353 2353
 				if ($action == 'editline' && GETPOSTINT('lineid') == $task_time->rowid) {
2354 2354
 					print '<td class="small">';
2355
-					print '<textarea name="timespent_note_line" width="95%" rows="' . ROWS_2 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>';
2355
+					print '<textarea name="timespent_note_line" width="95%" rows="'.ROWS_2.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>';
2356 2356
 					print '</td>';
2357 2357
 				} else {
2358 2358
 					print '<td class="small tdoverflowmax150 classfortooltip" title="'.dol_string_onlythesehtmltags(dol_htmlentitiesbr($task_time->note)).'">';
@@ -2363,7 +2363,7 @@  discard block
 block discarded – undo
2363 2363
 					$totalarray['nbfield']++;
2364 2364
 				}
2365 2365
 			} elseif ($action == 'editline' && GETPOSTINT('lineid') == $task_time->rowid) {
2366
-				print '<input type="hidden" name="timespent_note_line" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">';
2366
+				print '<input type="hidden" name="timespent_note_line" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">';
2367 2367
 			}
2368 2368
 
2369 2369
 			// Time spent
@@ -2424,7 +2424,7 @@  discard block
 block discarded – undo
2424 2424
 				$value = price2num($task_time->thm * $task_time->element_duration / 3600, 'MT', 1);
2425 2425
 
2426 2426
 				print '<td class="nowraponall right">';
2427
-				print '<span class="amount" title="' . $langs->trans("THM") . ': ' . price($task_time->thm) . '">';
2427
+				print '<span class="amount" title="'.$langs->trans("THM").': '.price($task_time->thm).'">';
2428 2428
 				print price($value, 1, $langs, 1, -1, -1, $conf->currency);
2429 2429
 				print '</span>';
2430 2430
 				print '</td>';
@@ -2480,7 +2480,7 @@  discard block
 block discarded – undo
2480 2480
 							}
2481 2481
 						}
2482 2482
 					} else {
2483
-						print '<span class="opacitymedium">' . $langs->trans("NA") . '</span>';
2483
+						print '<span class="opacitymedium">'.$langs->trans("NA").'</span>';
2484 2484
 					}
2485 2485
 				}
2486 2486
 				print '</td>';
@@ -2514,7 +2514,7 @@  discard block
 block discarded – undo
2514 2514
 						print '</a>';
2515 2515
 
2516 2516
 						if (getDolGlobalString('PROJECT_ALLOW_SPLIT_TIMESPENT')) {
2517
-							print '<a class="reposition editfielda paddingleft" href="' . $_SERVER["PHP_SELF"] . '?action=splitline&token=' . newToken() . '&lineid=' . $task_time->rowid . $param . ((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '') . '">';
2517
+							print '<a class="reposition editfielda paddingleft" href="'.$_SERVER["PHP_SELF"].'?action=splitline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">';
2518 2518
 							print img_split('', 'class="pictofixedwidth paddingleft"');
2519 2519
 							print '</a>';
2520 2520
 						}
@@ -2532,12 +2532,12 @@  discard block
 block discarded – undo
2532 2532
 
2533 2533
 							// Disable select if task not billable or already invoiced
2534 2534
 							$disabled = (intval($task_time->billable) != 1 || $invoiced);
2535
-							$ctrl = '<input '.($disabled ? 'disabled' : '').' id="cb' . $task_time->rowid . '" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="' . $task_time->rowid . '"' . ($selected ? ' checked="checked"' : '') . '>';
2535
+							$ctrl = '<input '.($disabled ? 'disabled' : '').' id="cb'.$task_time->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$task_time->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
2536 2536
 							if ($disabled) {
2537 2537
 								// If disabled, a dbl-click very close outside the control
2538 2538
 								// will re-enable it, so that user is not blocked if needed.
2539
-								print '<span id="cbsp'. $task_time->rowid . '">'.$ctrl.'</span>';
2540
-								print '<script>$("#cbsp' . $task_time->rowid . '").dblclick(()=>{ $("#cb' . $task_time->rowid . '").removeAttr("disabled") })</script>';
2539
+								print '<span id="cbsp'.$task_time->rowid.'">'.$ctrl.'</span>';
2540
+								print '<script>$("#cbsp'.$task_time->rowid.'").dblclick(()=>{ $("#cb'.$task_time->rowid.'").removeAttr("disabled") })</script>';
2541 2541
 							} else {
2542 2542
 								print $ctrl;
2543 2543
 							}
@@ -2636,7 +2636,7 @@  discard block
 block discarded – undo
2636 2636
 							print img_object('', 'user', 'class="hideonsmartphone"');
2637 2637
 							print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, null, 0, '', $contactsoftask);
2638 2638
 						} else {
2639
-							print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime');
2639
+							print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime');
2640 2640
 						}
2641 2641
 					} else {
2642 2642
 						$userstatic->id = $task_time->fk_user;
@@ -2653,13 +2653,13 @@  discard block
 block discarded – undo
2653 2653
 				if (!empty($arrayfields['t.note']['checked'])) {
2654 2654
 					print '<td class="tdoverflowmax300">';
2655 2655
 					if ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) {
2656
-						print '<textarea name="timespent_note_line" width="95%" rows="' . ROWS_2 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>';
2656
+						print '<textarea name="timespent_note_line" width="95%" rows="'.ROWS_2.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>';
2657 2657
 					} else {
2658 2658
 						print dol_nl2br($task_time->note);
2659 2659
 					}
2660 2660
 					print '</td>';
2661 2661
 				} elseif ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) {
2662
-					print '<input type="hidden" name="timespent_note_line" rows="' . ROWS_2 . '" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">';
2662
+					print '<input type="hidden" name="timespent_note_line" rows="'.ROWS_2.'" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">';
2663 2663
 				}
2664 2664
 
2665 2665
 				// Time spent
@@ -2801,7 +2801,7 @@  discard block
 block discarded – undo
2801 2801
 							print img_object('', 'user', 'class="hideonsmartphone"');
2802 2802
 							print $form->select_dolusers($task_time->fk_user, 'userid_line_2', 0, null, 0, '', $contactsoftask);
2803 2803
 						} else {
2804
-							print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime');
2804
+							print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime');
2805 2805
 						}
2806 2806
 					} else {
2807 2807
 						$userstatic->id = $task_time->fk_user;
@@ -2818,13 +2818,13 @@  discard block
 block discarded – undo
2818 2818
 				if (!empty($arrayfields['t.note']['checked'])) {
2819 2819
 					print '<td class="small tdoverflowmax300"">';
2820 2820
 					if ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) {
2821
-						print '<textarea name="timespent_note_line_2" width="95%" rows="' . ROWS_2 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>';
2821
+						print '<textarea name="timespent_note_line_2" width="95%" rows="'.ROWS_2.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>';
2822 2822
 					} else {
2823 2823
 						print dol_nl2br($task_time->note);
2824 2824
 					}
2825 2825
 					print '</td>';
2826 2826
 				} elseif ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) {
2827
-					print '<input type="hidden" name="timespent_note_line_2" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">';
2827
+					print '<input type="hidden" name="timespent_note_line_2" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">';
2828 2828
 				}
2829 2829
 
2830 2830
 				// Time spent
@@ -2898,14 +2898,14 @@  discard block
 block discarded – undo
2898 2898
 				$i++;
2899 2899
 				if ($i == 1) {
2900 2900
 					if ($num < $limit && empty($offset)) {
2901
-						print '<td class="left">' . $langs->trans("Total") . '</td>';
2901
+						print '<td class="left">'.$langs->trans("Total").'</td>';
2902 2902
 					} else {
2903 2903
 						print '<td class="left">'.$form->textwithpicto($langs->trans("Total"), $langs->trans("Totalforthispage")).'</td>';
2904 2904
 					}
2905 2905
 				} elseif (isset($totalarray['totaldurationfield']) && $totalarray['totaldurationfield'] == $i) {
2906
-					print '<td class="right">' . convertSecondToTime($totalarray['totalduration'], 'allhourmin') . '</td>';
2906
+					print '<td class="right">'.convertSecondToTime($totalarray['totalduration'], 'allhourmin').'</td>';
2907 2907
 				} elseif (isset($totalarray['totalvaluefield']) && $totalarray['totalvaluefield'] == $i) {
2908
-					print '<td class="right">' . price($totalarray['totalvalue']) . '</td>';
2908
+					print '<td class="right">'.price($totalarray['totalvalue']).'</td>';
2909 2909
 					//} elseif ($totalarray['totalvaluebilledfield'] == $i) { print '<td class="center">'.price($totalarray['totalvaluebilled']).'</td>';
2910 2910
 				} else {
2911 2911
 					print '<td></td>';
@@ -2921,8 +2921,8 @@  discard block
 block discarded – undo
2921 2921
 					$totalnboffields++;
2922 2922
 				}
2923 2923
 			}
2924
-			print '<tr class="oddeven"><td colspan="' . $totalnboffields . '">';
2925
-			print '<span class="opacitymedium">' . $langs->trans("None") . '</span>';
2924
+			print '<tr class="oddeven"><td colspan="'.$totalnboffields.'">';
2925
+			print '<span class="opacitymedium">'.$langs->trans("None").'</span>';
2926 2926
 			print '</td></tr>';
2927 2927
 		}
2928 2928
 
Please login to merge, or discard this patch.
htdocs/compta/facture/class/facture.class.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
 			$this->mode_reglement_id = 0;
506 506
 		}
507 507
 		$this->status = self::STATUS_DRAFT;
508
-		$this->statut = self::STATUS_DRAFT;	// deprecated
508
+		$this->statut = self::STATUS_DRAFT; // deprecated
509 509
 
510 510
 		if (!empty($this->multicurrency_code)) {
511 511
 			// Multicurrency (test on $this->multicurrency_tx because we should take the default rate of multicurrency_code only if not using original rate)
@@ -591,7 +591,7 @@  discard block
 block discarded – undo
591 591
 			if (!empty($_facrec->frequency)) {  // Invoice are created on same thirdparty than template when there is a recurrence, but not necessarily when there is no recurrence.
592 592
 				$this->socid = $_facrec->socid;
593 593
 			}
594
-			$this->entity            = $_facrec->entity; // Invoice created in same entity than template
594
+			$this->entity = $_facrec->entity; // Invoice created in same entity than template
595 595
 
596 596
 			// Fields coming from GUI.
597 597
 			// @TODO Value of template should be used as default value on the form on the GUI, and we should here always use the value from GUI
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
 				$this->mode_reglement_id = 0;
631 631
 			}
632 632
 			$this->status = self::STATUS_DRAFT;
633
-			$this->statut = self::STATUS_DRAFT;	// deprecated
633
+			$this->statut = self::STATUS_DRAFT; // deprecated
634 634
 
635 635
 			$this->linked_objects = $_facrec->linkedObjectsIds;
636 636
 			// We do not add link to template invoice or next invoice will be linked to all generated invoices
@@ -876,7 +876,7 @@  discard block
 block discarded – undo
876 876
 
877 877
 						// Complete vat rate with code
878 878
 						$vatrate = $newinvoiceline->tva_tx;
879
-						if ($newinvoiceline->vat_src_code && ! preg_match('/\(.*\)/', (string) $vatrate)) {
879
+						if ($newinvoiceline->vat_src_code && !preg_match('/\(.*\)/', (string) $vatrate)) {
880 880
 							$vatrate .= ' ('.$newinvoiceline->vat_src_code.')';
881 881
 						}
882 882
 
@@ -1079,7 +1079,7 @@  discard block
 block discarded – undo
1079 1079
 						($_facrec->lines[$i]->date_end_fill == 1 && $previousdaynextdatewhen) ? $previousdaynextdatewhen : '',
1080 1080
 						0,
1081 1081
 						$tva_npr,
1082
-						0,  // fk_remise_except
1082
+						0, // fk_remise_except
1083 1083
 						'HT',
1084 1084
 						0,
1085 1085
 						$_facrec->lines[$i]->product_type,
@@ -1092,8 +1092,8 @@  discard block
 block discarded – undo
1092 1092
 						$buyprice,
1093 1093
 						$_facrec->lines[$i]->label,
1094 1094
 						empty($_facrec->lines[$i]->array_options) ? null : $_facrec->lines[$i]->array_options,
1095
-						100,	// situation percent is undefined on recurring invoice lines
1096
-						0,  // fk_prev_id
1095
+						100, // situation percent is undefined on recurring invoice lines
1096
+						0, // fk_prev_id
1097 1097
 						$_facrec->lines[$i]->fk_unit,
1098 1098
 						$_facrec->lines[$i]->multicurrency_subprice,
1099 1099
 						$_facrec->lines[$i]->ref_ext,
@@ -1185,7 +1185,7 @@  discard block
 block discarded – undo
1185 1185
 
1186 1186
 		$facture->fk_facture_source = $this->fk_facture_source;
1187 1187
 		$facture->type 			    = $this->type;
1188
-		$facture->subtype 			= $this->subtype;
1188
+		$facture->subtype = $this->subtype;
1189 1189
 		$facture->socid 		    = $this->socid;
1190 1190
 		$facture->date              = $this->date;
1191 1191
 		$facture->date_pointoftax   = $this->date_pointoftax;
@@ -1202,7 +1202,7 @@  discard block
 block discarded – undo
1202 1202
 
1203 1203
 		$facture->origin            = $this->origin;
1204 1204
 		$facture->origin_id         = $this->origin_id;
1205
-		$facture->fk_account         = $this->fk_account;
1205
+		$facture->fk_account = $this->fk_account;
1206 1206
 
1207 1207
 		$facture->lines = $this->lines; // Array of lines of invoice
1208 1208
 		$facture->situation_counter = $this->situation_counter;
@@ -1469,8 +1469,8 @@  discard block
 block discarded – undo
1469 1469
 		$this->fk_account = $object->fk_account;
1470 1470
 		$this->cond_reglement_id    = $object->cond_reglement_id;
1471 1471
 		$this->mode_reglement_id    = $object->mode_reglement_id;
1472
-		$this->fk_incoterms    		= $object->fk_incoterms;
1473
-		$this->location_incoterms	= $object->location_incoterms;
1472
+		$this->fk_incoterms = $object->fk_incoterms;
1473
+		$this->location_incoterms = $object->location_incoterms;
1474 1474
 		$this->availability_id      = $object->availability_id;
1475 1475
 		$this->demand_reason_id     = $object->demand_reason_id;
1476 1476
 		$this->delivery_date        = $object->delivery_date;
@@ -1678,7 +1678,7 @@  discard block
 block discarded – undo
1678 1678
 	{
1679 1679
 		global $conf, $langs, $hookmanager, $action;
1680 1680
 
1681
-		if (! in_array($origin->element, array('propal', 'commande'))) {
1681
+		if (!in_array($origin->element, array('propal', 'commande'))) {
1682 1682
 			$origin->error = 'ErrorCanOnlyAutomaticallyGenerateADepositFromProposalOrOrder';
1683 1683
 			return null;
1684 1684
 		}
@@ -1688,7 +1688,7 @@  discard block
 block discarded – undo
1688 1688
 			return null;
1689 1689
 		}
1690 1690
 
1691
-		require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
1691
+		require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
1692 1692
 
1693 1693
 		if ($date > (dol_get_last_hour(dol_now('tzuserrel')) + getDolGlobalInt('INVOICE_MAX_FUTURE_DELAY'))) {
1694 1694
 			$origin->error = 'ErrorDateIsInFuture';
@@ -1732,7 +1732,7 @@  discard block
 block discarded – undo
1732 1732
 		$deposit->pos_source = $origin->pos_source;
1733 1733
 		$deposit->model_pdf = 'crabe';
1734 1734
 
1735
-		$modelByTypeConfName = 'FACTURE_ADDON_PDF_' . $deposit->type;
1735
+		$modelByTypeConfName = 'FACTURE_ADDON_PDF_'.$deposit->type;
1736 1736
 
1737 1737
 		if (getDolGlobalString($modelByTypeConfName)) {
1738 1738
 			$deposit->model_pdf = getDolGlobalString($modelByTypeConfName);
@@ -1792,10 +1792,10 @@  discard block
 block discarded – undo
1792 1792
 					$descriptions[$key] = '';
1793 1793
 				}
1794 1794
 				$TTotalByTva[$key] += $line->total_ttc;
1795
-				$descriptions[$key] .= '<li>' . (!empty($line->product_ref) ? $line->product_ref . ' - ' : '');
1796
-				$descriptions[$key] .= (!empty($line->product_label) ? $line->product_label . ' - ' : '');
1797
-				$descriptions[$key] .= $langs->trans('Qty') . ' : ' . $line->qty;
1798
-				$descriptions[$key] .= ' - ' . $langs->trans('TotalHT') . ' : ' . price($line->total_ht) . '</li>';
1795
+				$descriptions[$key] .= '<li>'.(!empty($line->product_ref) ? $line->product_ref.' - ' : '');
1796
+				$descriptions[$key] .= (!empty($line->product_label) ? $line->product_label.' - ' : '');
1797
+				$descriptions[$key] .= $langs->trans('Qty').' : '.$line->qty;
1798
+				$descriptions[$key] .= ' - '.$langs->trans('TotalHT').' : '.price($line->total_ht).'</li>';
1799 1799
 			}
1800 1800
 
1801 1801
 			foreach ($TTotalByTva as $tva => &$total) {
@@ -1819,10 +1819,10 @@  discard block
 block discarded – undo
1819 1819
 				$totalamount += $lines[$i]->total_ht; // Fixme : is it not for the customer ? Shouldn't we take total_ttc ?
1820 1820
 				$tva_tx = $lines[$i]->tva_tx;
1821 1821
 				$amountdeposit[$tva_tx] += ((float) $lines[$i]->total_ht * (float) $origin->deposit_percent) / 100;
1822
-				$descriptions[$tva_tx] .= '<li>' . (!empty($lines[$i]->product_ref) ? $lines[$i]->product_ref . ' - ' : '');
1823
-				$descriptions[$tva_tx] .= (!empty($lines[$i]->product_label) ? $lines[$i]->product_label . ' - ' : '');
1824
-				$descriptions[$tva_tx] .= $langs->trans('Qty') . ' : ' . $lines[$i]->qty;
1825
-				$descriptions[$tva_tx] .= ' - ' . $langs->trans('TotalHT') . ' : ' . price($lines[$i]->total_ht) . '</li>';
1822
+				$descriptions[$tva_tx] .= '<li>'.(!empty($lines[$i]->product_ref) ? $lines[$i]->product_ref.' - ' : '');
1823
+				$descriptions[$tva_tx] .= (!empty($lines[$i]->product_label) ? $lines[$i]->product_label.' - ' : '');
1824
+				$descriptions[$tva_tx] .= $langs->trans('Qty').' : '.$lines[$i]->qty;
1825
+				$descriptions[$tva_tx] .= ' - '.$langs->trans('TotalHT').' : '.price($lines[$i]->total_ht).'</li>';
1826 1826
 			}
1827 1827
 
1828 1828
 			if ($totalamount == 0) {
@@ -1837,11 +1837,11 @@  discard block
 block discarded – undo
1837 1837
 				continue;
1838 1838
 			}
1839 1839
 
1840
-			$descline = '(DEPOSIT) ('. $origin->deposit_percent .'%) - '.$origin->ref;
1840
+			$descline = '(DEPOSIT) ('.$origin->deposit_percent.'%) - '.$origin->ref;
1841 1841
 
1842 1842
 			// Hidden conf
1843 1843
 			if (getDolGlobalString('INVOICE_DEPOSIT_VARIABLE_MODE_DETAIL_LINES_IN_DESCRIPTION') && !empty($descriptions[$tva])) {
1844
-				$descline .= '<ul>' . $descriptions[$tva] . '</ul>';
1844
+				$descline .= '<ul>'.$descriptions[$tva].'</ul>';
1845 1845
 			}
1846 1846
 
1847 1847
 			$addlineResult = $deposit->addline(
@@ -2221,9 +2221,9 @@  discard block
 block discarded – undo
2221 2221
 				$this->id = $obj->rowid;
2222 2222
 				$this->entity = $obj->entity;
2223 2223
 
2224
-				$this->ref					= $obj->ref;
2225
-				$this->ref_client			= $obj->ref_client;
2226
-				$this->ref_customer			= $obj->ref_client;
2224
+				$this->ref = $obj->ref;
2225
+				$this->ref_client = $obj->ref_client;
2226
+				$this->ref_customer = $obj->ref_client;
2227 2227
 				$this->ref_ext				= $obj->ref_ext;
2228 2228
 				$this->type					= $obj->type;
2229 2229
 				$this->subtype				= $obj->subtype;
@@ -2249,7 +2249,7 @@  discard block
 block discarded – undo
2249 2249
 				$this->fk_project = $obj->fk_project;
2250 2250
 				$this->project = null; // Clear if another value was already set by fetch_projet
2251 2251
 
2252
-				$this->statut = $obj->status;	// deprecated
2252
+				$this->statut = $obj->status; // deprecated
2253 2253
 				$this->status = $obj->status;
2254 2254
 
2255 2255
 				$this->date_lim_reglement = $this->db->jdate($obj->dlr);
@@ -2265,7 +2265,7 @@  discard block
 block discarded – undo
2265 2265
 				$this->fk_fac_rec_source	= $obj->fk_fac_rec_source;
2266 2266
 				$this->note = $obj->note_private; // deprecated
2267 2267
 				$this->note_private = $obj->note_private;
2268
-				$this->note_public			= $obj->note_public;
2268
+				$this->note_public = $obj->note_public;
2269 2269
 				$this->user_creation_id     = $obj->fk_user_author;
2270 2270
 				$this->user_validation_id   = $obj->fk_user_valid;
2271 2271
 				$this->user_modification_id = $obj->fk_user_modif;
@@ -2379,7 +2379,7 @@  discard block
 block discarded – undo
2379 2379
 				$line->ref              = $objp->product_ref; // Ref product
2380 2380
 				$line->product_ref      = $objp->product_ref; // Ref product
2381 2381
 				$line->libelle          = $objp->product_label; // deprecated
2382
-				$line->product_label 	= $objp->product_label; // Label product
2382
+				$line->product_label = $objp->product_label; // Label product
2383 2383
 				$line->product_barcode  = $objp->product_barcode; // Barcode number product
2384 2384
 				$line->product_desc     = $objp->product_desc; // Description product
2385 2385
 				$line->fk_product_type  = $objp->fk_product_type; // Type of product
@@ -3276,10 +3276,10 @@  discard block
 block discarded – undo
3276 3276
 		if ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !$user->hasRight('facture', 'creer'))
3277 3277
 		|| (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !$user->hasRight('facture', 'invoice_advance', 'validate'))) {
3278 3278
 			$this->error = 'Permission denied';
3279
-			dol_syslog(get_class($this)."::validate ".$this->error.' MAIN_USE_ADVANCED_PERMS=' . getDolGlobalString('MAIN_USE_ADVANCED_PERMS'), LOG_ERR);
3279
+			dol_syslog(get_class($this)."::validate ".$this->error.' MAIN_USE_ADVANCED_PERMS='.getDolGlobalString('MAIN_USE_ADVANCED_PERMS'), LOG_ERR);
3280 3280
 			return -1;
3281 3281
 		}
3282
-		if ((preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) &&	// empty should not happened, but when it occurs, the test save life
3282
+		if ((preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) && // empty should not happened, but when it occurs, the test save life
3283 3283
 			getDolGlobalString('FAC_FORCE_DATE_VALIDATION')						// If option enabled, we force invoice date
3284 3284
 		) {
3285 3285
 			$this->date = dol_now();
@@ -3464,7 +3464,7 @@  discard block
 block discarded – undo
3464 3464
 					for ($i = 0; $i < $cpt; $i++) {
3465 3465
 						if ($this->lines[$i]->fk_product > 0) {
3466 3466
 							$mouvP = new MouvementStock($this->db);
3467
-							$mouvP->origin = &$this;	// deprecated
3467
+							$mouvP->origin = &$this; // deprecated
3468 3468
 							$mouvP->setOrigin($this->element, $this->id);
3469 3469
 
3470 3470
 							// We decrease stock for product
@@ -3658,7 +3658,7 @@  discard block
 block discarded – undo
3658 3658
 			// Set new ref and define current status
3659 3659
 			if (!$error) {
3660 3660
 				$this->ref = $num;
3661
-				$this->statut = self::STATUS_VALIDATED;	// deprecated
3661
+				$this->statut = self::STATUS_VALIDATED; // deprecated
3662 3662
 				$this->status = self::STATUS_VALIDATED;
3663 3663
 				$this->date_validation = $now;
3664 3664
 				$i = 0;
@@ -3813,7 +3813,7 @@  discard block
 block discarded – undo
3813 3813
 
3814 3814
 			if ($error == 0) {
3815 3815
 				$old_statut = $this->status;
3816
-				$this->statut = self::STATUS_DRAFT;	// deprecated
3816
+				$this->statut = self::STATUS_DRAFT; // deprecated
3817 3817
 				$this->status = self::STATUS_DRAFT;
3818 3818
 
3819 3819
 				// Call trigger
@@ -4351,8 +4351,8 @@  discard block
 block discarded – undo
4351 4351
 				$rangmax = $this->line_max($fk_parent_line);
4352 4352
 				$this->line->rang = $rangmax + 1;
4353 4353
 			}
4354
-			$apply_abs_price_on_credit_note=false;
4355
-			if ($this->type == self::TYPE_CREDIT_NOTE  && !getDolGlobalInt('FACTURE_ENABLE_NEGATIVE_LINES') && !getDolGlobalInt('INVOICE_KEEP_DISCOUNT_LINES_AS_IN_ORIGIN')) {
4354
+			$apply_abs_price_on_credit_note = false;
4355
+			if ($this->type == self::TYPE_CREDIT_NOTE && !getDolGlobalInt('FACTURE_ENABLE_NEGATIVE_LINES') && !getDolGlobalInt('INVOICE_KEEP_DISCOUNT_LINES_AS_IN_ORIGIN')) {
4356 4356
 				$apply_abs_price_on_credit_note = true;
4357 4357
 			}
4358 4358
 
@@ -4785,7 +4785,7 @@  discard block
 block discarded – undo
4785 4785
 		}
4786 4786
 
4787 4787
 		if (!empty($addon)) {
4788
-			dol_syslog("Call getNextNumRef with ".$addonConstName." = " . getDolGlobalString('FACTURE_ADDON').", thirdparty=".$soc->name.", type=".$soc->typent_code.", mode=".$mode, LOG_DEBUG);
4788
+			dol_syslog("Call getNextNumRef with ".$addonConstName." = ".getDolGlobalString('FACTURE_ADDON').", thirdparty=".$soc->name.", type=".$soc->typent_code.", mode=".$mode, LOG_DEBUG);
4789 4789
 
4790 4790
 			$mybool = false;
4791 4791
 
@@ -5253,7 +5253,7 @@  discard block
 block discarded – undo
5253 5253
 
5254 5254
 		if (empty($option) || $option != 'nolines') {
5255 5255
 			// Lines
5256
-			$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)
5256
+			$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)
5257 5257
 			$xnbp = 0;
5258 5258
 			while ($xnbp < $nbp) {
5259 5259
 				$line = new FactureLigne($this->db);
@@ -5881,14 +5881,14 @@  discard block
 block discarded – undo
5881 5881
 		if (!empty($paymentmode) && $paymentmode != 'all') {
5882 5882
 			$sql .= ", ".MAIN_DB_PREFIX."c_paiement as cp";
5883 5883
 		}
5884
-		$sql .= " WHERE f.paye = 0";	// Only unpaid
5885
-		$sql .= " AND f.fk_statut = ".self::STATUS_VALIDATED;	// Only validated status
5884
+		$sql .= " WHERE f.paye = 0"; // Only unpaid
5885
+		$sql .= " AND f.fk_statut = ".self::STATUS_VALIDATED; // Only validated status
5886 5886
 		if ($datetouse == 'invoicedate') {
5887 5887
 			$sql .= " AND f.datef = '".$this->db->idate($tmpidate, 'gmt')."'";
5888 5888
 		} else {
5889 5889
 			$sql .= " AND f.date_lim_reglement = '".$this->db->idate($tmpidate, 'gmt')."'";
5890 5890
 		}
5891
-		$sql .= " AND f.entity IN (".getEntity('facture', 0).")";	// One batch process only one company (no sharing)
5891
+		$sql .= " AND f.entity IN (".getEntity('facture', 0).")"; // One batch process only one company (no sharing)
5892 5892
 		if (!empty($paymentmode) && $paymentmode != 'all') {
5893 5893
 			$sql .= " AND f.fk_mode_reglement = cp.id AND cp.code = '".$this->db->escape($paymentmode)."'";
5894 5894
 		}
@@ -6107,7 +6107,7 @@  discard block
 block discarded – undo
6107 6107
 								$actioncomm->create($user);
6108 6108
 							}
6109 6109
 
6110
-							$this->db->commit();	// We always commit
6110
+							$this->db->commit(); // We always commit
6111 6111
 						}
6112 6112
 
6113 6113
 						if ($errormesg) {
@@ -6149,7 +6149,7 @@  discard block
 block discarded – undo
6149 6149
 		// get date of last validated invoices of same type
6150 6150
 		$sql  = "SELECT datef";
6151 6151
 		$sql .= " FROM ".MAIN_DB_PREFIX."facture";
6152
-		$sql .= " WHERE type = " . (int) $this->type ;
6152
+		$sql .= " WHERE type = ".(int) $this->type;
6153 6153
 		$sql .= " AND date_valid IS NOT NULL";
6154 6154
 		$sql .= " AND entity IN (".getEntity('invoice').")";
6155 6155
 		$sql .= " ORDER BY datef DESC LIMIT 1";
Please login to merge, or discard this patch.
htdocs/compta/facture/card.php 1 patch
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -91,14 +91,14 @@  discard block
 block discarded – undo
91 91
 }
92 92
 
93 93
 // General $Variables
94
-$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('facid'));    // For backward compatibility
94
+$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('facid')); // For backward compatibility
95 95
 $ref = GETPOST('ref', 'alpha');
96 96
 $socid = GETPOSTINT('socid');
97 97
 $action = GETPOST('action', 'aZ09');
98 98
 $confirm = GETPOST('confirm', 'alpha');
99 99
 $cancel = GETPOST('cancel', 'alpha');
100
-$backtopage = GETPOST('backtopage', 'alpha');					// if not set, a default page will be used
101
-$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');	// if not set, $backtopage will be used
100
+$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used
101
+$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used
102 102
 $lineid = GETPOSTINT('lineid');
103 103
 $userid = GETPOSTINT('userid');
104 104
 $search_ref = GETPOST('sf_ref', 'alpha') ? GETPOST('sf_ref', 'alpha') : GETPOST('search_ref', 'alpha');
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 					setEventMessages('', $warningMsgLineList, 'warnings');
268 268
 				}
269 269
 
270
-				header("Location: " . $_SERVER['PHP_SELF'] . '?facid=' . $result);
270
+				header("Location: ".$_SERVER['PHP_SELF'].'?facid='.$result);
271 271
 				exit();
272 272
 			} else {
273 273
 				$langs->load("errors");
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
 		// Validation
359 359
 		$object->fetch($id);
360 360
 
361
-		if ((preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) &&	// empty should not happened, but when it occurs, the test save life
361
+		if ((preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) && // empty should not happened, but when it occurs, the test save life
362 362
 			getDolGlobalString('FAC_FORCE_DATE_VALIDATION')								// If option enabled, we force invoice date
363 363
 		) {
364 364
 			$object->date = dol_now();
@@ -1089,7 +1089,7 @@  discard block
 block discarded – undo
1089 1089
 			$error++;
1090 1090
 		}
1091 1091
 
1092
-		$dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver');	// If we enter the 02 january, we need to save the 02 january for server
1092
+		$dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server
1093 1093
 		$date_pointoftax = dol_mktime(0, 0, 0, GETPOSTINT('date_pointoftaxmonth'), GETPOSTINT('date_pointoftaxday'), GETPOSTINT('date_pointoftaxyear'), 'tzserver');
1094 1094
 
1095 1095
 		// Replacement invoice
@@ -1121,7 +1121,7 @@  discard block
 block discarded – undo
1121 1121
 				$object->note_private		= trim(GETPOST('note_private', 'restricthtml'));
1122 1122
 				$object->ref_client			= GETPOST('ref_client', 'alphanohtml');
1123 1123
 				$object->ref_customer		= GETPOST('ref_client', 'alphanohtml');
1124
-				$object->model_pdf          = GETPOST('model', 'alphanohtml');
1124
+				$object->model_pdf = GETPOST('model', 'alphanohtml');
1125 1125
 				$object->fk_project			= GETPOSTINT('projectid');
1126 1126
 				$object->cond_reglement_id	= GETPOSTINT('cond_reglement_id');
1127 1127
 				$object->mode_reglement_id	= GETPOSTINT('mode_reglement_id');
@@ -1182,9 +1182,9 @@  discard block
 block discarded – undo
1182 1182
 				$object->note_private		= trim(GETPOST('note_private', 'restricthtml'));
1183 1183
 				$object->ref_client			= GETPOST('ref_client', 'alphanohtml');
1184 1184
 				$object->ref_customer		= GETPOST('ref_client', 'alphanohtml');
1185
-				$object->model_pdf          = GETPOST('model');
1185
+				$object->model_pdf = GETPOST('model');
1186 1186
 				$object->fk_project			= GETPOSTINT('projectid');
1187
-				$object->cond_reglement_id	= 0;		// No payment term for a credit note
1187
+				$object->cond_reglement_id	= 0; // No payment term for a credit note
1188 1188
 				$object->mode_reglement_id	= GETPOSTINT('mode_reglement_id');
1189 1189
 				$object->fk_account         = GETPOSTINT('fk_account');
1190 1190
 				//$object->remise_absolue		= price2num(GETPOST('remise_absolue'), 'MU');
@@ -1507,7 +1507,7 @@  discard block
 block discarded – undo
1507 1507
 				$object->note_public		= trim(GETPOST('note_public', 'restricthtml'));
1508 1508
 				$object->note_private       = trim(GETPOST('note_private', 'restricthtml'));
1509 1509
 				$object->ref_client			= GETPOST('ref_client');
1510
-				$object->ref_customer		= GETPOST('ref_client');
1510
+				$object->ref_customer = GETPOST('ref_client');
1511 1511
 				$object->model_pdf          = GETPOST('model');
1512 1512
 				$object->fk_project			= GETPOSTINT('projectid');
1513 1513
 				$object->cond_reglement_id	= (GETPOSTINT('type') == 3 ? 1 : GETPOST('cond_reglement_id'));
@@ -1571,7 +1571,7 @@  discard block
 block discarded – undo
1571 1571
 						$element = $subelement = 'expedition';
1572 1572
 					}
1573 1573
 
1574
-					$object->origin = $origin;		// deprecated
1574
+					$object->origin = $origin; // deprecated
1575 1575
 					$object->origin_type = $origin;
1576 1576
 					$object->origin_id = $originid;
1577 1577
 
@@ -1606,7 +1606,7 @@  discard block
 block discarded – undo
1606 1606
 						dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines or deposit lines");
1607 1607
 						$result = $srcobject->fetch($object->origin_id);
1608 1608
 
1609
-						$i = -1;  // Ensure initialised for static analysis, but with invalid idx.
1609
+						$i = -1; // Ensure initialised for static analysis, but with invalid idx.
1610 1610
 						// If deposit invoice - down payment with 1 line (fixed amount or percent)
1611 1611
 						if (GETPOST('type') == Facture::TYPE_DEPOSIT && in_array($typeamount, array('amount', 'variable'))) {
1612 1612
 							// Define the array $amountdeposit
@@ -2009,7 +2009,7 @@  discard block
 block discarded – undo
2009 2009
 				if (!empty($origin) && !empty($originid)) {
2010 2010
 					include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
2011 2011
 
2012
-					$object->origin = $origin;		// deprecated
2012
+					$object->origin = $origin; // deprecated
2013 2013
 					$object->origin_type = $origin;
2014 2014
 					$object->origin_id = $originid;
2015 2015
 
@@ -2035,7 +2035,7 @@  discard block
 block discarded – undo
2035 2035
 						$line->fk_prev_id = $line->id;
2036 2036
 						$line->fetch_optionals();
2037 2037
 						if (getDolGlobalInt('INVOICE_USE_SITUATION') == 2) {
2038
-							$line->situation_percent = 0;  // New situation percent must be 0 (No cumulative)
2038
+							$line->situation_percent = 0; // New situation percent must be 0 (No cumulative)
2039 2039
 						} else {
2040 2040
 							$line->situation_percent = $line->get_prev_progress($object->id); // get good progress including credit note
2041 2041
 						}
@@ -2152,7 +2152,7 @@  discard block
 block discarded – undo
2152 2152
 		} else {
2153 2153
 			$db->rollback();
2154 2154
 			$action = 'create';
2155
-			$_GET["origin"] = $_POST["origin"];		// Keep GET and POST here ?
2155
+			$_GET["origin"] = $_POST["origin"]; // Keep GET and POST here ?
2156 2156
 			$_GET["originid"] = $_POST["originid"]; // Keep GET and POST here ?
2157 2157
 			setEventMessages($object->error, $object->errors, 'errors');
2158 2158
 		}
@@ -2710,7 +2710,7 @@  discard block
 block discarded – undo
2710 2710
 		// Define special_code for special lines
2711 2711
 		$special_code = GETPOSTINT('special_code');
2712 2712
 		if ($special_code == 3) {
2713
-			$special_code = 0;	// Options should not exists on invoices
2713
+			$special_code = 0; // Options should not exists on invoices
2714 2714
 		}
2715 2715
 
2716 2716
 		$line = new FactureLigne($db);
@@ -3157,7 +3157,7 @@  discard block
 block discarded – undo
3157 3157
 
3158 3158
 
3159 3159
 	if ($action == 'update_extras' && $usercancreate) {
3160
-		$object->oldcopy = dol_clone($object, 2);  // @phan-suppress-current-line PhanTypeMismatchProperty
3160
+		$object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty
3161 3161
 		$attribute_name = GETPOST('attribute', 'restricthtml');
3162 3162
 
3163 3163
 		// Fill array 'array_options' with data from add form
@@ -3274,7 +3274,7 @@  discard block
 block discarded – undo
3274 3274
 	$fk_account = GETPOSTINT('fk_account');
3275 3275
 
3276 3276
 	// Load objectsrc
3277
-	$objectsrc = null;  // Initialise
3277
+	$objectsrc = null; // Initialise
3278 3278
 	//$remise_absolue = 0;
3279 3279
 	if (!empty($origin) && !empty($originid)) {
3280 3280
 		// Parse element/subelement (ex: project_task)
@@ -3285,7 +3285,7 @@  discard block
 block discarded – undo
3285 3285
 			$subelement = $regs[2];
3286 3286
 		}
3287 3287
 
3288
-		$dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver');	// If we enter the 02 january, we need to save the 02 january for server
3288
+		$dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server
3289 3289
 		$date_pointoftax = dol_mktime(0, 0, 0, GETPOSTINT('date_pointoftaxmonth'), GETPOSTINT('date_pointoftaxday'), GETPOSTINT('date_pointoftaxyear'), 'tzserver');
3290 3290
 
3291 3291
 		if ($element == 'project') {
@@ -3363,8 +3363,8 @@  discard block
 block discarded – undo
3363 3363
 				$fk_account         = (!empty($expesrc->fk_account) ? $expesrc->fk_account : (!empty($soc->fk_account) ? $soc->fk_account : 0));
3364 3364
 
3365 3365
 				if (isModEnabled('multicurrency')) {
3366
-					$currency_code 	= (!empty($expesrc->multicurrency_code) ? $expesrc->multicurrency_code : (!empty($soc->multicurrency_code) ? $soc->multicurrency_code : $objectsrc->multicurrency_code));
3367
-					$currency_tx 	= (!empty($expesrc->multicurrency_tx) ? $expesrc->multicurrency_tx : (!empty($soc->multicurrency_tx) ? $soc->multicurrency_tx : $objectsrc->multicurrency_tx));
3366
+					$currency_code = (!empty($expesrc->multicurrency_code) ? $expesrc->multicurrency_code : (!empty($soc->multicurrency_code) ? $soc->multicurrency_code : $objectsrc->multicurrency_code));
3367
+					$currency_tx = (!empty($expesrc->multicurrency_tx) ? $expesrc->multicurrency_tx : (!empty($soc->multicurrency_tx) ? $soc->multicurrency_tx : $objectsrc->multicurrency_tx));
3368 3368
 				}
3369 3369
 
3370 3370
 				//Replicate extrafields
@@ -3457,7 +3457,7 @@  discard block
 block discarded – undo
3457 3457
 	print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="POST" id="formtocreate" name="formtocreate">';
3458 3458
 	print '<input type="hidden" name="token" value="'.newToken().'">';
3459 3459
 	print '<input type="hidden" name="action" id="formtocreateaction" value="add">';
3460
-	print '<input type="hidden" name="changecompany" value="0">';	// will be set to 1 by javascript so we know post is done after a company change
3460
+	print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change
3461 3461
 	if ($soc->id > 0) {
3462 3462
 		print '<input type="hidden" name="socid" value="'.$soc->id.'">'."\n";
3463 3463
 	}
@@ -3984,8 +3984,8 @@  discard block
 block discarded – undo
3984 3984
 		if ($socid > 0) {
3985 3985
 			print '<tr><td>'.$langs->trans('DiscountStillRemaining').'</td><td colspan="2">';
3986 3986
 
3987
-			$thirdparty = $soc;	// used by object_discounts.tpl.php
3988
-			$discount_type = 0;	// used by object_discounts.tpl.php
3987
+			$thirdparty = $soc; // used by object_discounts.tpl.php
3988
+			$discount_type = 0; // used by object_discounts.tpl.php
3989 3989
 			$backtopage = $_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.urlencode((string) (GETPOST('origin'))).'&originid='.urlencode((string) (GETPOSTINT('originid')));
3990 3990
 			include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php';
3991 3991
 
@@ -4026,7 +4026,7 @@  discard block
 block discarded – undo
4026 4026
 			if (empty($retained_warranty)) {
4027 4027
 				if ($objectsrc !== null && property_exists($objectsrc, 'retained_warranty') && !empty($objectsrc->retained_warranty)) { // use previous situation value
4028 4028
 					// Facture->retained_warranty  (does not exist on Expedition)
4029
-					$retained_warranty = $objectsrc->retained_warranty;  // @phan-suppress-current-line PhanUndeclaredProperty
4029
+					$retained_warranty = $objectsrc->retained_warranty; // @phan-suppress-current-line PhanUndeclaredProperty
4030 4030
 				}
4031 4031
 			}
4032 4032
 			$retained_warranty_js_default = !empty($retained_warranty) ? $retained_warranty : getDolGlobalString('INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT');
@@ -4521,7 +4521,7 @@  discard block
 block discarded – undo
4521 4521
 		$nbMandated = 0;
4522 4522
 		foreach ($object->lines as $line) {
4523 4523
 			$res = $line->fetch_product();
4524
-			if ($res  > 0) {
4524
+			if ($res > 0) {
4525 4525
 				if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) {
4526 4526
 					$nbMandated++;
4527 4527
 					break;
@@ -4733,7 +4733,7 @@  discard block
 block discarded – undo
4733 4733
 	}
4734 4734
 	// Ref customer
4735 4735
 	$morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_customer, $object, (int) $usercancreate, 'string', '', 0, 1);
4736
-	$morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_customer, $object, (int) $usercancreate, 'string'.(getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1);
4736
+	$morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_customer, $object, (int) $usercancreate, 'string'.(getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1);
4737 4737
 	// Thirdparty
4738 4738
 	$morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1, 'customer');
4739 4739
 	if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $object->thirdparty->id > 0) {
@@ -5163,45 +5163,45 @@  discard block
 block discarded – undo
5163 5163
 		}
5164 5164
 		print '<tr>';
5165 5165
 		// Amount HT
5166
-		print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>';
5167
-		print '<td class="nowrap amountcard right">' . price($sign * $object->total_ht, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
5166
+		print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>';
5167
+		print '<td class="nowrap amountcard right">'.price($sign * $object->total_ht, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
5168 5168
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
5169 5169
 			// Multicurrency Amount HT
5170
-			print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
5170
+			print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
5171 5171
 		}
5172 5172
 		print '</tr>';
5173 5173
 
5174 5174
 		print '<tr>';
5175 5175
 		// Amount VAT
5176
-		print '<td>' . $langs->trans('AmountVAT') . '</td>';
5177
-		print '<td class="nowrap amountcard right">' . price($sign * $object->total_tva, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
5176
+		print '<td>'.$langs->trans('AmountVAT').'</td>';
5177
+		print '<td class="nowrap amountcard right">'.price($sign * $object->total_tva, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
5178 5178
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
5179 5179
 			// Multicurrency Amount VAT
5180
-			print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
5180
+			print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
5181 5181
 		}
5182 5182
 		print '</tr>';
5183 5183
 
5184 5184
 		// Amount Local Taxes
5185 5185
 		if (($mysoc->localtax1_assuj == "1" && $mysoc->useLocalTax(1)) || $object->total_localtax1 != 0) {
5186 5186
 			print '<tr>';
5187
-			print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
5188
-			print '<td class="nowrap amountcard right">' . price($sign * $object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
5187
+			print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>';
5188
+			print '<td class="nowrap amountcard right">'.price($sign * $object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
5189 5189
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
5190 5190
 				$object->multicurrency_total_localtax1 = (float) price2num($object->total_localtax1 * $object->multicurrency_tx, 'MT');
5191 5191
 
5192
-				print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
5192
+				print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
5193 5193
 			}
5194 5194
 			print '</tr>';
5195 5195
 		}
5196 5196
 
5197 5197
 		if (($mysoc->localtax2_assuj == "1" && $mysoc->useLocalTax(2)) || $object->total_localtax2 != 0) {
5198 5198
 			print '<tr>';
5199
-			print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>';
5200
-			print '<td class="nowrap amountcard right">' . price($sign * $object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
5199
+			print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>';
5200
+			print '<td class="nowrap amountcard right">'.price($sign * $object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
5201 5201
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
5202 5202
 				$object->multicurrency_total_localtax2 = (float) price2num($object->total_localtax2 * $object->multicurrency_tx, 'MT');
5203 5203
 
5204
-				print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
5204
+				print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
5205 5205
 			}
5206 5206
 			print '</tr>';
5207 5207
 		}
@@ -5261,11 +5261,11 @@  discard block
 block discarded – undo
5261 5261
 
5262 5262
 		print '<tr>';
5263 5263
 		// Amount TTC
5264
-		print '<td>' . $langs->trans('AmountTTC') . '</td>';
5265
-		print '<td class="nowrap amountcard right">' . price($sign * $object->total_ttc, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
5264
+		print '<td>'.$langs->trans('AmountTTC').'</td>';
5265
+		print '<td class="nowrap amountcard right">'.price($sign * $object->total_ttc, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
5266 5266
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
5267 5267
 			// Multicurrency Amount TTC
5268
-			print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_ttc, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
5268
+			print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_ttc, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
5269 5269
 		}
5270 5270
 		print '</tr>';
5271 5271
 
@@ -5896,10 +5896,10 @@  discard block
 block discarded – undo
5896 5896
 							if (!$objectidnext && $object->is_last_in_cycle()) {
5897 5897
 								if ($usercanunvalidate) {
5898 5898
 									unset($params['attr']['title']);
5899
-									print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'] . '?facid=' . $object->id . '&action=modif&token=' . newToken(), '', true, $params);
5899
+									print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=modif&token='.newToken(), '', true, $params);
5900 5900
 								} else {
5901 5901
 									$params['attr']['title'] = $langs->trans('NotEnoughPermissions');
5902
-									print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'] . '?facid=' . $object->id . '&action=modif&token=' . newToken(), '', false, $params);
5902
+									print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=modif&token='.newToken(), '', false, $params);
5903 5903
 								}
5904 5904
 							} elseif (!$object->is_last_in_cycle()) {
5905 5905
 								$params['attr']['title'] = $langs->trans('NotLastInCycle');
@@ -5941,7 +5941,7 @@  discard block
 block discarded – undo
5941 5941
 					$langs->load("contracts");
5942 5942
 
5943 5943
 					if ($usercancreatecontract) {
5944
-						print '<a class="butAction" href="' . DOL_URL_ROOT . '/contrat/card.php?action=create&amp;origin=' . $object->element . '&amp;originid=' . $object->id . '&amp;socid=' . $object->socid . '">' . $langs->trans('AddContract') . '</a>';
5944
+						print '<a class="butAction" href="'.DOL_URL_ROOT.'/contrat/card.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid.'">'.$langs->trans('AddContract').'</a>';
5945 5945
 					}
5946 5946
 				}
5947 5947
 			}
@@ -6167,7 +6167,7 @@  discard block
 block discarded – undo
6167 6167
 			if ($usercandelete || ($usercancreate && $isErasable == 1)) {	// isErasable = 1 means draft with temporary ref (draft can always be deleted with no need of permissions)
6168 6168
 				$enableDelete = false;
6169 6169
 				$deleteHref = '#';
6170
-				if ($isErasable > 0 && ! $objectidnext) {
6170
+				if ($isErasable > 0 && !$objectidnext) {
6171 6171
 					$deleteHref = $_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=delete&token='.newToken();
6172 6172
 					$enableDelete = true;
6173 6173
 				}
Please login to merge, or discard this patch.
htdocs/product/class/html.formproduct.class.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 		} else {
265 265
 			if (!empty($this->cache_warehouses[$tab['parent_id']])) {
266 266
 				if (getDolGlobalInt('MAIN_WAREHOUSE_LIST_DISPLAY_MODE') !== 2 || (getDolGlobalInt('MAIN_WAREHOUSE_LIST_DISPLAY_MODE') === 2 && empty($this->cache_warehouses[$tab['parent_id']]['parent_id']))) {
267
-					$final_label = $this->cache_warehouses[$tab['parent_id']]['label'] . ' >> ' . $final_label;
267
+					$final_label = $this->cache_warehouses[$tab['parent_id']]['label'].' >> '.$final_label;
268 268
 				}
269 269
 
270 270
 				return $this->get_parent_path($this->cache_warehouses[$tab['parent_id']], $final_label);
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
 	{
305 305
 		global $conf, $langs, $user, $hookmanager;
306 306
 
307
-		dol_syslog(get_class($this)."::selectWarehouses " . (is_array($selected) ? 'selected is array' : $selected) . ", $htmlname, $filterstatus, $empty, $disabled, $fk_product, $empty_label, $showstock, $forcecombo, $morecss", LOG_DEBUG);
307
+		dol_syslog(get_class($this)."::selectWarehouses ".(is_array($selected) ? 'selected is array' : $selected).", $htmlname, $filterstatus, $empty, $disabled, $fk_product, $empty_label, $showstock, $forcecombo, $morecss", LOG_DEBUG);
308 308
 
309 309
 		$out = '';
310 310
 		if ((!getDolGlobalString('ENTREPOT_EXTRA_STATUS')) && ($filterstatus === "warehouseinternal")) {
@@ -633,7 +633,7 @@  discard block
 block discarded – undo
633 633
 			$return .= '</select>';
634 634
 		}
635 635
 
636
-		$return .= ajax_combobox($name, array(), 0, 0, 'resolve', $placeholderID);	// avoid to have hidden value if scale = -1 (eg DM size)
636
+		$return .= ajax_combobox($name, array(), 0, 0, 'resolve', $placeholderID); // avoid to have hidden value if scale = -1 (eg DM size)
637 637
 
638 638
 		return $return;
639 639
 	}
@@ -839,7 +839,7 @@  discard block
 block discarded – undo
839 839
 		}
840 840
 
841 841
 		if (empty($hookmanager)) {
842
-			include_once DOL_DOCUMENT_ROOT . '/core/class/hookmanager.class.php';
842
+			include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
843 843
 			$hookmanager = new HookManager($this->db);
844 844
 		}
845 845
 		$hookmanager->initHooks(array('productdao'));
@@ -858,10 +858,10 @@  discard block
 block discarded – undo
858 858
 			if (array_key_exists($productId, $this->cache_lot)) {
859 859
 				foreach ($this->cache_lot[$productId] as $id => $arraytypes) {
860 860
 					if (empty($fk_entrepot) || $fk_entrepot == $arraytypes['entrepot_id']) {
861
-						$label = $arraytypes['entrepot_label'] . ' - ';
861
+						$label = $arraytypes['entrepot_label'].' - ';
862 862
 						$label .= $arraytypes['batch'];
863 863
 						// Notice: Chrome show 1 line with value and 1 for label. Firefox show only 1 line with label
864
-						$out .= '<option data-warehouse="'.dol_escape_htmltag($label).'" value="' . $arraytypes['batch'] . '">' . ($conf->browser->name === 'chrome' ? '' : $arraytypes['batch']) . ' (' . $langs->trans('TotalStock') . ': ' . $arraytypes['qty'] . ')</option>';
864
+						$out .= '<option data-warehouse="'.dol_escape_htmltag($label).'" value="'.$arraytypes['batch'].'">'.($conf->browser->name === 'chrome' ? '' : $arraytypes['batch']).' ('.$langs->trans('TotalStock').': '.$arraytypes['qty'].')</option>';
865 865
 					}
866 866
 				}
867 867
 			}
@@ -905,7 +905,7 @@  discard block
 block discarded – undo
905 905
 			$batch_count = 0;
906 906
 			global $hookmanager;
907 907
 			if (empty($hookmanager)) {
908
-				include_once DOL_DOCUMENT_ROOT . '/core/class/hookmanager.class.php';
908
+				include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
909 909
 				$hookmanager = new HookManager($this->db);
910 910
 			}
911 911
 			$hookmanager->initHooks(array('productdao'));
Please login to merge, or discard this patch.