Completed
Branch develop (1634bf)
by
unknown
25:47
created
htdocs/admin/tools/ui/components/index.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,12 +17,12 @@
 block discarded – undo
17 17
  * along with this program.  If not, see <https://www.gnu.org/licenses/agpl-3.0.html>.
18 18
  */
19 19
 
20
-$res=0;
21
-if (! $res && file_exists("../../main.inc.php")) : $res=@include '../../main.inc.php';
20
+$res = 0;
21
+if (!$res && file_exists("../../main.inc.php")) : $res = @include '../../main.inc.php';
22 22
 endif;
23
-if (! $res && file_exists("../../../main.inc.php")) : $res=@include '../../../main.inc.php';
23
+if (!$res && file_exists("../../../main.inc.php")) : $res = @include '../../../main.inc.php';
24 24
 endif;
25
-if (! $res && file_exists("../../../../main.inc.php")) : $res=@include '../../../../main.inc.php';
25
+if (!$res && file_exists("../../../../main.inc.php")) : $res = @include '../../../../main.inc.php';
26 26
 endif;
27 27
 
28 28
 // Protection if external user
Please login to merge, or discard this patch.
htdocs/admin/tools/ui/components/badges.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,12 +17,12 @@  discard block
 block discarded – undo
17 17
  * along with this program. If not, see <https://www.gnu.org/licenses/agpl-3.0.html>.
18 18
  */
19 19
 
20
-$res=0;
21
-if (! $res && file_exists("../../main.inc.php")) : $res=@include '../../main.inc.php';
20
+$res = 0;
21
+if (!$res && file_exists("../../main.inc.php")) : $res = @include '../../main.inc.php';
22 22
 endif;
23
-if (! $res && file_exists("../../../main.inc.php")) : $res=@include '../../../main.inc.php';
23
+if (!$res && file_exists("../../../main.inc.php")) : $res = @include '../../../main.inc.php';
24 24
 endif;
25
-if (! $res && file_exists("../../../../main.inc.php")) : $res=@include '../../../../main.inc.php';
25
+if (!$res && file_exists("../../../../main.inc.php")) : $res = @include '../../../../main.inc.php';
26 26
 endif;
27 27
 
28 28
 // Protection if external user
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
 // Set view for menu and breadcrumb
45 45
 // Menu must be set in constructor of documentation class
46
-$documentation->view = array('Components','Badges');
46
+$documentation->view = array('Components', 'Badges');
47 47
 
48 48
 // Output sidebar
49 49
 $documentation->showSidebar(); ?>
Please login to merge, or discard this patch.
htdocs/user/card.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 $dateendvalidity = dol_mktime(0, 0, 0, GETPOSTINT('dateendvaliditymonth'), GETPOSTINT('dateendvalidityday'), GETPOSTINT('dateendvalidityyear'));
94 94
 $dateofbirth = dol_mktime(0, 0, 0, GETPOSTINT('dateofbirthmonth'), GETPOSTINT('dateofbirthday'), GETPOSTINT('dateofbirthyear'));
95 95
 
96
-$childids = $user->getAllChildIds(1);	// For later, test on salary visibility
96
+$childids = $user->getAllChildIds(1); // For later, test on salary visibility
97 97
 
98 98
 $object = new User($db);
99 99
 $extrafields = new ExtraFields($db);
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
 						}
559 559
 					}
560 560
 
561
-					$ret = $object->update($user);		// This may include call to setPassword if password has changed
561
+					$ret = $object->update($user); // This may include call to setPassword if password has changed
562 562
 					if ($ret < 0) {
563 563
 						$error++;
564 564
 						if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
@@ -689,7 +689,7 @@  discard block
 block discarded – undo
689 689
 	) {
690 690
 		$object->fetch($id);
691 691
 
692
-		$newpassword = $object->setPassword($user, '');	// This will generate a new password
692
+		$newpassword = $object->setPassword($user, ''); // This will generate a new password
693 693
 		if (is_int($newpassword) && $newpassword < 0) {
694 694
 			// Echec
695 695
 			setEventMessages($langs->trans("ErrorFailedToSetNewPassword"), null, 'errors');
@@ -818,7 +818,7 @@  discard block
 block discarded – undo
818 818
 						$action = "";
819 819
 
820 820
 						$mesg = $langs->trans("ErrorProductAlreadyExists", $clone->ref);
821
-						$mesg .= ' <a href="' . $_SERVER["PHP_SELF"] . '?ref=' . $clone->ref . '">' . $langs->trans("ShowCardHere") . '</a>.';
821
+						$mesg .= ' <a href="'.$_SERVER["PHP_SELF"].'?ref='.$clone->ref.'">'.$langs->trans("ShowCardHere").'</a>.';
822 822
 						setEventMessages($mesg, null, 'errors');
823 823
 					} else {
824 824
 						setEventMessages(empty($clone->error) ? '' : $langs->trans($clone->error), $clone->errors, 'errors');
@@ -832,7 +832,7 @@  discard block
 block discarded – undo
832 832
 				} else {
833 833
 					$db->commit();
834 834
 					$db->close();
835
-					header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id);
835
+					header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
836 836
 					exit;
837 837
 				}
838 838
 			} else {
@@ -1536,7 +1536,7 @@  discard block
 block discarded – undo
1536 1536
 			$ldap = new Ldap();
1537 1537
 			$result = $ldap->connectBind();
1538 1538
 			if ($result > 0) {
1539
-				$userSearchFilter = '(' . getDolGlobalString('LDAP_FILTER_CONNECTION').'('.$ldap->getUserIdentifier().'='.$object->login.'))';
1539
+				$userSearchFilter = '('.getDolGlobalString('LDAP_FILTER_CONNECTION').'('.$ldap->getUserIdentifier().'='.$object->login.'))';
1540 1540
 				$entries = $ldap->fetch($object->login, $userSearchFilter);
1541 1541
 				if (!$entries) {
1542 1542
 					setEventMessages($ldap->error, $ldap->errors, 'errors');
@@ -2054,7 +2054,7 @@  discard block
 block discarded – undo
2054 2054
 				print '<td>';
2055 2055
 				if (!empty($object->api_key)) {
2056 2056
 					print '<span class="opacitymedium">';
2057
-					print showValueWithClipboardCPButton($object->api_key, 1, $langs->trans("Hidden"));		// TODO Add an option to also reveal the hash, not only copy paste
2057
+					print showValueWithClipboardCPButton($object->api_key, 1, $langs->trans("Hidden")); // TODO Add an option to also reveal the hash, not only copy paste
2058 2058
 					print '</span>';
2059 2059
 				}
2060 2060
 				print '</td></tr>';
@@ -2108,7 +2108,7 @@  discard block
 block discarded – undo
2108 2108
 						$langs->load("mails");
2109 2109
 						$params['attr']['title'] = $langs->trans('NoEMail');
2110 2110
 					}
2111
-					print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=presend&mode=init#formmailbeforetitle', '', $canSendMail, $params);
2111
+					print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle', '', $canSendMail, $params);
2112 2112
 				}
2113 2113
 
2114 2114
 				if ($permissiontoedit && (!isModEnabled('multicompany') || !$user->entity || ($object->entity == $conf->entity) || (getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE') && $object->entity == 1))) {
@@ -2170,13 +2170,13 @@  discard block
 block discarded – undo
2170 2170
 				if ($user->id != $id && $permissiontodisable && $object->statut == 0 &&
2171 2171
 				((!isModEnabled('multicompany') && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || (getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE') && $object->entity == 1))) {
2172 2172
 					unset($params['attr']['title']);
2173
-					print dolGetButtonAction($langs->trans('Reactivate'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=enable&token='.newToken(), '', true, $params);
2173
+					print dolGetButtonAction($langs->trans('Reactivate'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=enable&token='.newToken(), '', true, $params);
2174 2174
 				}
2175 2175
 				// Disable user
2176 2176
 				if ($user->id != $id && $permissiontodisable && $object->statut == 1 &&
2177 2177
 				((!isModEnabled('multicompany') && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || (getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE') && $object->entity == 1))) {
2178 2178
 					unset($params['attr']['title']);
2179
-					print dolGetButtonAction($langs->trans('DisableUser'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=disable&token='.newToken(), '', true, $params);
2179
+					print dolGetButtonAction($langs->trans('DisableUser'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=disable&token='.newToken(), '', true, $params);
2180 2180
 				} else {
2181 2181
 					if ($user->id == $id) {
2182 2182
 						$params['attr']['title'] = $langs->trans('CantDisableYourself');
Please login to merge, or discard this patch.
htdocs/core/modules/facture/doc/pdf_crabe.modules.php 1 patch
Spacing   +16 added lines, -16 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
@@ -901,7 +901,7 @@  discard block
 block discarded – undo
901 901
 						$pagecount = $pdf->setSourceFile($termsofsale);
902 902
 						for ($i = 1; $i <= $pagecount; $i++) {
903 903
 							$tplIdx = $pdf->importPage($i);
904
-							if ($tplIdx!==false) {
904
+							if ($tplIdx !== false) {
905 905
 								$s = $pdf->getTemplatesize($tplIdx);
906 906
 								$pdf->AddPage($s['h'] > $s['w'] ? 'P' : 'L');
907 907
 								$pdf->useTemplate($tplIdx);
@@ -1202,7 +1202,7 @@  discard block
 block discarded – undo
1202 1202
 			foreach ($this->tva_array as $tvakey => $tvaval) {
1203 1203
 				$pdf->SetFont('', '', $default_font_size - 2);
1204 1204
 				$pdf->SetXY($this->marge_gauche, $posy);
1205
-				$titre = round((float) $tvakey, 2) . "%";
1205
+				$titre = round((float) $tvakey, 2)."%";
1206 1206
 				$pdf->MultiCell(25, 4, $titre, 0, 'L');
1207 1207
 
1208 1208
 				$pdf->SetFont('', '', $default_font_size - 2);
@@ -1241,7 +1241,7 @@  discard block
 block discarded – undo
1241 1241
 		}
1242 1242
 
1243 1243
 		$posxval = 52;
1244
-		$posxend = 110;	// End of x for text on left side
1244
+		$posxend = 110; // End of x for text on left side
1245 1245
 		if ($this->page_largeur < 210) { // To work with US executive format
1246 1246
 			$posxend -= 10;
1247 1247
 		}
@@ -1259,7 +1259,7 @@  discard block
 block discarded – undo
1259 1259
 			$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
1260 1260
 			$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
1261 1261
 
1262
-			$posy = $pdf->GetY() + 3;	// We need spaces for 2 lines payment conditions
1262
+			$posy = $pdf->GetY() + 3; // We need spaces for 2 lines payment conditions
1263 1263
 		}
1264 1264
 
1265 1265
 		// Show category of operations
@@ -1271,7 +1271,7 @@  discard block
 block discarded – undo
1271 1271
 
1272 1272
 			$pdf->SetFont('', '', $default_font_size - 2);
1273 1273
 			$pdf->SetXY($posxval, $posy);
1274
-			$categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation);
1274
+			$categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation);
1275 1275
 			$pdf->MultiCell($posxend - $posxval, 4, $categoryOfOperationLabel, 0, 'L');
1276 1276
 
1277 1277
 			$posy = $pdf->GetY() + 3; // for 2 lines
@@ -1422,7 +1422,7 @@  discard block
 block discarded – undo
1422 1422
 						include_once DOL_DOCUMENT_ROOT.'/core/lib/functions_be.lib.php';
1423 1423
 						$invoicePaymentKey = dolBECalculateStructuredCommunication($object->ref, $object->type);
1424 1424
 
1425
-						$pdf->MultiCell(100, 3, $outputlangs->transnoentities('StructuredCommunication').": " . $outputlangs->convToOutputCharset($invoicePaymentKey), 0, 'L', 0);
1425
+						$pdf->MultiCell(100, 3, $outputlangs->transnoentities('StructuredCommunication').": ".$outputlangs->convToOutputCharset($invoicePaymentKey), 0, 'L', 0);
1426 1426
 					}
1427 1427
 				}
1428 1428
 			}
@@ -1868,7 +1868,7 @@  discard block
 block discarded – undo
1868 1868
 		if (empty($hidetop)) {
1869 1869
 			// Show category of operations
1870 1870
 			if (getDolGlobalInt('INVOICE_CATEGORY_OF_OPERATION') == 1 && $this->categoryOfOperation >= 0) {
1871
-				$categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations") . ' : ' . $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation);
1871
+				$categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations").' : '.$outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation);
1872 1872
 				$pdf->SetXY($this->marge_gauche, $tab_top - 4);
1873 1873
 				$pdf->MultiCell(($pdf->GetStringWidth($categoryOfOperations)) + 4, 2, $categoryOfOperations);
1874 1874
 			}
@@ -2038,7 +2038,7 @@  discard block
 block discarded – undo
2038 2038
 		}
2039 2039
 		if ($this->situationinvoice) {
2040 2040
 			$langs->loadLangs(array("other"));
2041
-			$title = $outputlangs->transnoentities("PDFInvoiceSituation") . " " . $outputlangs->transnoentities("NumberingShort") . $object->situation_counter . " -";
2041
+			$title = $outputlangs->transnoentities("PDFInvoiceSituation")." ".$outputlangs->transnoentities("NumberingShort").$object->situation_counter." -";
2042 2042
 		}
2043 2043
 		if (getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE') && is_object($outputlangsbis)) {
2044 2044
 			$title .= ' - ';
@@ -2271,7 +2271,7 @@  discard block
 block discarded – undo
2271 2271
 
2272 2272
 			$carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs);
2273 2273
 
2274
-			$mode =  'target';
2274
+			$mode = 'target';
2275 2275
 			$carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), ($usecontact ? 1 : 0), $mode, $object);
2276 2276
 
2277 2277
 			// Show recipient
@@ -2326,7 +2326,7 @@  discard block
 block discarded – undo
2326 2326
 				if (!empty($carac_client_shipping)) {
2327 2327
 					$posy += $hautcadre;
2328 2328
 
2329
-					$hautcadre -= 10;	// Height for the shipping address does not need to be as high as main box
2329
+					$hautcadre -= 10; // Height for the shipping address does not need to be as high as main box
2330 2330
 
2331 2331
 					// Show shipping frame
2332 2332
 					$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   +16 added lines, -16 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
 
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 					if (!empty($conf->mycompany->multidir_output[$object->entity])) {
364 364
 						$logodir = $conf->mycompany->multidir_output[$object->entity];
365 365
 					}
366
-					$pagecount = $pdf->setSourceFile($logodir.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
366
+					$pagecount = $pdf->setSourceFile($logodir.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
367 367
 					$tplidx = $pdf->importPage(1);
368 368
 				}
369 369
 
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
 				// $pdf->GetY() here can't be used. It is bottom of the second address box but first one may be higher
461 461
 
462 462
 				// $this->tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks)
463
-				$this->tab_top = 90 + $top_shift + $shipp_shift;		// top_shift is an addition for linked objects or addons (0 in most cases)
463
+				$this->tab_top = 90 + $top_shift + $shipp_shift; // top_shift is an addition for linked objects or addons (0 in most cases)
464 464
 				$this->tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
465 465
 
466 466
 				// You can add more thing under header here, if you increase $extra_under_address_shift too.
@@ -713,7 +713,7 @@  discard block
 block discarded – undo
713 713
 					}
714 714
 
715 715
 					$pdf->setTopMargin($this->tab_top_newpage);
716
-					$page_bottom_margin =  $this->heightforfooter + $this->heightforfreetext + $this->heightforinfotot + $this->getHeightForQRInvoice($pdf->getPage(), $object, $langs);
716
+					$page_bottom_margin = $this->heightforfooter + $this->heightforfreetext + $this->heightforinfotot + $this->getHeightForQRInvoice($pdf->getPage(), $object, $langs);
717 717
 					$pdf->setPageOrientation('', 1, $page_bottom_margin);
718 718
 					$pageposbefore = $pdf->getPage();
719 719
 
@@ -960,11 +960,11 @@  discard block
 block discarded – undo
960 960
 					if (!isset($this->tva[$vatrate])) {
961 961
 						$this->tva[$vatrate] = 0;
962 962
 					}
963
-					$this->tva[$vatrate] += $tvaligne;	// ->tva is abandoned, we use now ->tva_array that is more complete
963
+					$this->tva[$vatrate] += $tvaligne; // ->tva is abandoned, we use now ->tva_array that is more complete
964 964
 					$vatcode = $object->lines[$i]->vat_src_code;
965 965
 					if (getDolGlobalInt('PDF_INVOICE_SHOW_VAT_ANALYSIS')) {
966 966
 						if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['tot_ht'])) {
967
-							$this->tva_array[$vatrate . ($vatcode ? ' (' . $vatcode . ')' : '')]['tot_ht'] = 0;
967
+							$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['tot_ht'] = 0;
968 968
 						}
969 969
 						$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);
970 970
 					} else {
@@ -1051,7 +1051,7 @@  discard block
 block discarded – undo
1051 1051
 				// Pagefoot
1052 1052
 				$this->_pagefoot($pdf, $object, $outputlangs, 0, $this->getHeightForQRInvoice($pdf->getPage(), $object, $langs));
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')) {
@@ -1063,7 +1063,7 @@  discard block
 block discarded – undo
1063 1063
 						$pagecount = $pdf->setSourceFile($termsofsale);
1064 1064
 						for ($i = 1; $i <= $pagecount; $i++) {
1065 1065
 							$tplIdx = $pdf->importPage($i);
1066
-							if ($tplIdx!==false) {
1066
+							if ($tplIdx !== false) {
1067 1067
 								$s = $pdf->getTemplatesize($tplIdx);
1068 1068
 								$pdf->AddPage($s['h'] > $s['w'] ? 'P' : 'L');
1069 1069
 								$pdf->useTemplate($tplIdx);
@@ -1302,7 +1302,7 @@  discard block
 block discarded – undo
1302 1302
 			foreach ($this->tva_array as $tvakey => $tvaval) {
1303 1303
 				$pdf->SetFont('', '', $default_font_size - 2);
1304 1304
 				$pdf->SetXY($this->marge_gauche, $posy);
1305
-				$titre = round((float) $tvakey, 2) . "%";
1305
+				$titre = round((float) $tvakey, 2)."%";
1306 1306
 				$pdf->MultiCell(25, 4, $titre, 0, 'L');
1307 1307
 
1308 1308
 				$pdf->SetFont('', '', $default_font_size - 2);
@@ -1340,8 +1340,8 @@  discard block
 block discarded – undo
1340 1340
 			$posy = $pdf->GetY() + 4;
1341 1341
 		}
1342 1342
 
1343
-		$posxval = 52;	// Position of values of properties shown on left side
1344
-		$posxend = 110;	// End of x for text on left side
1343
+		$posxval = 52; // Position of values of properties shown on left side
1344
+		$posxend = 110; // End of x for text on left side
1345 1345
 		if ($this->page_largeur < 210) { // To work with US executive format
1346 1346
 			$posxend -= 10;
1347 1347
 		}
@@ -1371,7 +1371,7 @@  discard block
 block discarded – undo
1371 1371
 
1372 1372
 			$pdf->SetFont('', '', $default_font_size - 2);
1373 1373
 			$pdf->SetXY($posxval, $posy);
1374
-			$categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation);
1374
+			$categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation);
1375 1375
 			$pdf->MultiCell($posxend - $posxval, 4, $categoryOfOperationLabel, 0, 'L');
1376 1376
 
1377 1377
 			$posy = $pdf->GetY() + 3; // for 2 lines
@@ -1549,7 +1549,7 @@  discard block
 block discarded – undo
1549 1549
 						include_once DOL_DOCUMENT_ROOT.'/core/lib/functions_be.lib.php';
1550 1550
 						$invoicePaymentKey = dolBECalculateStructuredCommunication($object->ref, $object->type);
1551 1551
 
1552
-						$pdf->MultiCell(100, 3, $outputlangs->transnoentities('StructuredCommunication').": " . $outputlangs->convToOutputCharset($invoicePaymentKey), 0, 'L', 0);
1552
+						$pdf->MultiCell(100, 3, $outputlangs->transnoentities('StructuredCommunication').": ".$outputlangs->convToOutputCharset($invoicePaymentKey), 0, 'L', 0);
1553 1553
 					}
1554 1554
 				}
1555 1555
 			}
@@ -2171,7 +2171,7 @@  discard block
 block discarded – undo
2171 2171
 		if (empty($hidetop)) {
2172 2172
 			// Show category of operations
2173 2173
 			if (getDolGlobalInt('INVOICE_CATEGORY_OF_OPERATION') == 1 && $this->categoryOfOperation >= 0) {
2174
-				$categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations") . ' : ' . $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation);
2174
+				$categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations").' : '.$outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation);
2175 2175
 				$pdf->SetXY($this->marge_gauche, $tab_top - 4);
2176 2176
 				$pdf->MultiCell(($pdf->GetStringWidth($categoryOfOperations)) + 4, 2, $categoryOfOperations);
2177 2177
 			}
@@ -2287,7 +2287,7 @@  discard block
 block discarded – undo
2287 2287
 		}
2288 2288
 		if ($this->situationinvoice) {
2289 2289
 			$langs->loadLangs(array("other"));
2290
-			$title = $outputlangs->transnoentities("PDFInvoiceSituation") . " " . $outputlangs->transnoentities("NumberingShort") . $object->situation_counter . " -";
2290
+			$title = $outputlangs->transnoentities("PDFInvoiceSituation")." ".$outputlangs->transnoentities("NumberingShort").$object->situation_counter." -";
2291 2291
 		}
2292 2292
 		if (getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE') && is_object($outputlangsbis)) {
2293 2293
 			$title .= ' - ';
@@ -2575,7 +2575,7 @@  discard block
 block discarded – undo
2575 2575
 				if (!empty($carac_client_shipping)) {
2576 2576
 					$posy += $hautcadre;
2577 2577
 
2578
-					$hautcadre -= 10;	// Height for the shipping address does not need to be as high as main box
2578
+					$hautcadre -= 10; // Height for the shipping address does not need to be as high as main box
2579 2579
 
2580 2580
 					// Show shipping frame
2581 2581
 					$pdf->SetXY($posx + 2, $posy - 5);
Please login to merge, or discard this patch.
htdocs/core/modules/facture/doc/pdf_octopus.modules.php 1 patch
Spacing   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	 * Dolibarr version of the loaded document
79 79
 	 * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental'
80 80
 	 */
81
-	public $version = 'disabled';	// Disabled by default. Enabled in constructor if option INVOICE_USE_SITUATION is 2.
81
+	public $version = 'disabled'; // Disabled by default. Enabled in constructor if option INVOICE_USE_SITUATION is 2.
82 82
 
83 83
 	/**
84 84
 	 * @var int height for info total
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 		}
248 248
 
249 249
 		if ($mysoc === null) {
250
-			dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'. getCallerInfoString(), LOG_ERR);
250
+			dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'.getCallerInfoString(), LOG_ERR);
251 251
 			return;
252 252
 		}
253 253
 
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 			$outputlangsbis->loadLangs(array("main", "bills", "products", "dict", "companies", "compta"));
298 298
 		}
299 299
 
300
-		if (empty($object) || ($object->type != Facture::TYPE_SITUATION && ($object->type != Facture::TYPE_CREDIT_NOTE &&  !empty($object->situation_cycle_ref)))) {
300
+		if (empty($object) || ($object->type != Facture::TYPE_SITUATION && ($object->type != Facture::TYPE_CREDIT_NOTE && !empty($object->situation_cycle_ref)))) {
301 301
 			setEventMessage($langs->trans('WarningsObjectIsNotASituation'), 'warnings');
302 302
 			return 1;
303 303
 		}
@@ -416,15 +416,15 @@  discard block
 block discarded – undo
416 416
 				$pdf->SetAutoPageBreak(1, 0);
417 417
 
418 418
 				// compute height for situation invoices
419
-				$this->heightforinfotot = 45;	// Height reserved to output the info and total part and payment part
419
+				$this->heightforinfotot = 45; // Height reserved to output the info and total part and payment part
420 420
 				if (!getDolGlobalString('INVOICE_NO_PAYMENT_DETAILS') && $nbpayments > 0) {
421 421
 					$this->heightforinfotot += 4 * ($nbpayments + 3);
422 422
 				}
423 423
 				if ($nbprevsituation > 0) {
424 424
 					$this->heightforinfotot += 4 * ($nbprevsituation + 3);
425 425
 				}
426
-				$this->heightforfreetext = (getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5));	// Height reserved to output the free text on last page
427
-				$this->heightforfooter = $this->marge_basse + (!getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS') ? 12 : 22);	// Height reserved to output the footer (value include bottom margin)
426
+				$this->heightforfreetext = (getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5)); // Height reserved to output the free text on last page
427
+				$this->heightforfooter = $this->marge_basse + (!getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS') ? 12 : 22); // Height reserved to output the footer (value include bottom margin)
428 428
 
429 429
 				if (class_exists('TCPDF')) {
430 430
 					$pdf->setPrintHeader(false);
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
 					if (!empty($conf->mycompany->multidir_output[$object->entity])) {
439 439
 						$logodir = $conf->mycompany->multidir_output[$object->entity];
440 440
 					}
441
-					$pagecount = $pdf->setSourceFile($logodir.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
441
+					$pagecount = $pdf->setSourceFile($logodir.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
442 442
 					$this->tplidx = $pdf->importPage(1);
443 443
 				}
444 444
 
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
 				// $pdf->GetY() here can't be used. It is bottom of the second address box but first one may be higher
531 531
 
532 532
 				// $this->tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks)
533
-				$this->tab_top = 90 + $top_shift + $shipp_shift;		// top_shift is an addition for linked objects or addons (0 in most cases)
533
+				$this->tab_top = 90 + $top_shift + $shipp_shift; // top_shift is an addition for linked objects or addons (0 in most cases)
534 534
 				$this->tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
535 535
 
536 536
 				// You can add more thing under header here, if you increase $extra_under_address_shift too.
@@ -1040,11 +1040,11 @@  discard block
 block discarded – undo
1040 1040
 					if (!isset($this->tva[$vatrate])) {
1041 1041
 						$this->tva[$vatrate] = 0;
1042 1042
 					}
1043
-					$this->tva[$vatrate] += $tvaligne;	// ->tva is abandoned, we use now ->tva_array that is more complete
1043
+					$this->tva[$vatrate] += $tvaligne; // ->tva is abandoned, we use now ->tva_array that is more complete
1044 1044
 					$vatcode = $object->lines[$i]->vat_src_code;
1045 1045
 					if (getDolGlobalInt('PDF_INVOICE_SHOW_VAT_ANALYSIS')) {
1046 1046
 						if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['tot_ht'])) {
1047
-							$this->tva_array[$vatrate . ($vatcode ? ' (' . $vatcode . ')' : '')]['tot_ht'] = 0;
1047
+							$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['tot_ht'] = 0;
1048 1048
 						}
1049 1049
 						$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);
1050 1050
 					} else {
@@ -1136,7 +1136,7 @@  discard block
 block discarded – undo
1136 1136
 				// Pagefoot
1137 1137
 				$this->_pagefoot($pdf, $object, $outputlangs);
1138 1138
 				if (method_exists($pdf, 'AliasNbPages')) {
1139
-					$pdf->AliasNbPages();  // @phan-suppress-current-line PhanUndeclaredMethod
1139
+					$pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod
1140 1140
 				}
1141 1141
 
1142 1142
 				$this->resumeLastPage($pdf, $object, 0, $tab_top, $outputlangs, $outputlangsbis);
@@ -1369,7 +1369,7 @@  discard block
 block discarded – undo
1369 1369
 			foreach ($this->tva_array as $tvakey => $tvaval) {
1370 1370
 				$pdf->SetFont('', '', $default_font_size - 2);
1371 1371
 				$pdf->SetXY($this->marge_gauche, $posy);
1372
-				$titre = round((float) $tvakey, 2) . "%";
1372
+				$titre = round((float) $tvakey, 2)."%";
1373 1373
 				$pdf->MultiCell(25, 4, $titre, 0, 'L');
1374 1374
 
1375 1375
 				$pdf->SetFont('', '', $default_font_size - 2);
@@ -1407,8 +1407,8 @@  discard block
 block discarded – undo
1407 1407
 			$posy = $pdf->GetY() + 4;
1408 1408
 		}
1409 1409
 
1410
-		$posxval = 52;	// Position of values of properties shown on left side
1411
-		$posxend = 110;	// End of x for text on left side
1410
+		$posxval = 52; // Position of values of properties shown on left side
1411
+		$posxend = 110; // End of x for text on left side
1412 1412
 		if ($this->page_largeur < 210) { // To work with US executive format
1413 1413
 			$posxend -= 10;
1414 1414
 		}
@@ -1438,7 +1438,7 @@  discard block
 block discarded – undo
1438 1438
 
1439 1439
 			$pdf->SetFont('', '', $default_font_size - 2);
1440 1440
 			$pdf->SetXY($posxval, $posy);
1441
-			$categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation);
1441
+			$categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation);
1442 1442
 			$pdf->MultiCell($posxend - $posxval, 4, $categoryOfOperationLabel, 0, 'L');
1443 1443
 
1444 1444
 			$posy = $pdf->GetY() + 3; // for 2 lines
@@ -1605,7 +1605,7 @@  discard block
 block discarded – undo
1605 1605
 						include_once DOL_DOCUMENT_ROOT.'/core/lib/functions_be.lib.php';
1606 1606
 						$invoicePaymentKey = dolBECalculateStructuredCommunication($object->ref, $object->type);
1607 1607
 
1608
-						$pdf->MultiCell(100, 3, $outputlangs->transnoentities('StructuredCommunication').": " . $outputlangs->convToOutputCharset($invoicePaymentKey), 0, 'L', 0);
1608
+						$pdf->MultiCell(100, 3, $outputlangs->transnoentities('StructuredCommunication').": ".$outputlangs->convToOutputCharset($invoicePaymentKey), 0, 'L', 0);
1609 1609
 					}
1610 1610
 				}
1611 1611
 			}
@@ -1791,7 +1791,7 @@  discard block
 block discarded – undo
1791 1791
 						if (($object->lines[$i]->info_bits & 0x01) == 0x01) {
1792 1792
 							$vatrate .= '*';
1793 1793
 						}
1794
-						if (! isset($tvas[$vatrate])) {
1794
+						if (!isset($tvas[$vatrate])) {
1795 1795
 							$tvas[$vatrate] = 0;
1796 1796
 						}
1797 1797
 						$tvas[$vatrate] += $tvaligne;
@@ -2060,7 +2060,7 @@  discard block
 block discarded – undo
2060 2060
 		if (empty($hidetop)) {
2061 2061
 			// Show category of operations
2062 2062
 			if (getDolGlobalInt('INVOICE_CATEGORY_OF_OPERATION') == 1 && $this->categoryOfOperation >= 0) {
2063
-				$categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations") . ' : ' . $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation);
2063
+				$categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations").' : '.$outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation);
2064 2064
 				$pdf->SetXY($this->marge_gauche, $tab_top - 4);
2065 2065
 				$pdf->MultiCell(($pdf->GetStringWidth($categoryOfOperations)) + 4, 2, $categoryOfOperations);
2066 2066
 			}
@@ -2080,7 +2080,7 @@  discard block
 block discarded – undo
2080 2080
 		$pdf->SetFont('', '', $default_font_size - 1);
2081 2081
 
2082 2082
 		// Output Rect
2083
-		$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D');	// Rect prend une longueur en 3eme param et 4eme param
2083
+		$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect prend une longueur en 3eme param et 4eme param
2084 2084
 
2085 2085
 		// situation invoice
2086 2086
 		$pdf->SetFont('', '', $default_font_size - 2);
@@ -2120,7 +2120,7 @@  discard block
 block discarded – undo
2120 2120
 		$pdf->SetFont('', '', $default_font_size - 1);
2121 2121
 
2122 2122
 		if (empty($hidetop)) {
2123
-			$pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5);	// line prend une position y en 2eme param et 4eme param
2123
+			$pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5); // line prend une position y en 2eme param et 4eme param
2124 2124
 		}
2125 2125
 	}
2126 2126
 
@@ -2697,7 +2697,7 @@  discard block
 block discarded – undo
2697 2697
 			'overtitle' => array(
2698 2698
 				'textkey' => 'Chantier', // use lang key is useful in somme case with module
2699 2699
 				'align' => 'C',
2700
-				'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
2700
+				'padding' => array(0.5, 0.5, 0.5, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
2701 2701
 				'width' => 18
2702 2702
 			),
2703 2703
 		);
@@ -2722,13 +2722,13 @@  discard block
 block discarded – undo
2722 2722
 			),
2723 2723
 			'border-left' => true, // add left line separator
2724 2724
 			'overtitle' => array(
2725
-				'textkey' => 'S'.$derniere_situation->situation_counter . ' - ' . dol_print_date($derniere_situation->date, "%d/%m/%Y"),
2725
+				'textkey' => 'S'.$derniere_situation->situation_counter.' - '.dol_print_date($derniere_situation->date, "%d/%m/%Y"),
2726 2726
 				'align' => 'C',
2727
-				'padding' => array(0.5,0.2,0.5,0.2), // Like css 0 => top, 1 => right, 2 => bottom, 3 => left
2727
+				'padding' => array(0.5, 0.2, 0.5, 0.2), // Like css 0 => top, 1 => right, 2 => bottom, 3 => left
2728 2728
 				'width' => 10 + 15 //current width + amount cell width
2729 2729
 			),
2730 2730
 		);
2731
-		if ($this->situationinvoice && ! empty($this->TDataSituation['date_derniere_situation'])) {
2731
+		if ($this->situationinvoice && !empty($this->TDataSituation['date_derniere_situation'])) {
2732 2732
 			$this->cols['prev_progress']['status'] = true;
2733 2733
 		}
2734 2734
 
@@ -2743,7 +2743,7 @@  discard block
 block discarded – undo
2743 2743
 			),
2744 2744
 			'border-left' => true, // add left line separator
2745 2745
 		);
2746
-		if ($this->situationinvoice && ! empty($this->TDataSituation['date_derniere_situation'])) {
2746
+		if ($this->situationinvoice && !empty($this->TDataSituation['date_derniere_situation'])) {
2747 2747
 			$this->cols['prev_progress_amount']['status'] = true;
2748 2748
 		}
2749 2749
 
@@ -2758,9 +2758,9 @@  discard block
 block discarded – undo
2758 2758
 			),
2759 2759
 			'border-left' => true, // add left line separator
2760 2760
 			'overtitle' => array(
2761
-				'textkey' => 'S'.$object->situation_counter . ' - ' . dol_print_date($object->date, "%d/%m/%Y"),
2761
+				'textkey' => 'S'.$object->situation_counter.' - '.dol_print_date($object->date, "%d/%m/%Y"),
2762 2762
 				'align' => 'C',
2763
-				'padding' => array(0.5,0.2,0.5,0.2), // Like css 0 => top, 1 => right, 2 => bottom, 3 => left
2763
+				'padding' => array(0.5, 0.2, 0.5, 0.2), // Like css 0 => top, 1 => right, 2 => bottom, 3 => left
2764 2764
 				'width' => 10 + 15
2765 2765
 			),
2766 2766
 		);
@@ -2885,7 +2885,7 @@  discard block
 block discarded – undo
2885 2885
 
2886 2886
 		// Output Rect
2887 2887
 		// KEEPTHIS => Affiche les bords extérieurs
2888
-		$this->printRoundedRectBtp($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D');	// Rect prend une longueur en 3eme param et 4eme param
2888
+		$this->printRoundedRectBtp($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect prend une longueur en 3eme param et 4eme param
2889 2889
 
2890 2890
 		$pdf->line($this->posx_cumul_anterieur - 1, $tab_top, $this->posx_cumul_anterieur - 1, $tab_top + $tab_height);
2891 2891
 		if (empty($hidetop)) {
@@ -2942,7 +2942,7 @@  discard block
 block discarded – undo
2942 2942
 			$pdf->SetXY($this->marge_gauche + 10, $tab_top + 24 + $i);
2943 2943
 			$pdf->MultiCell(80, 2, $outputlangs->transnoentities("TotalHT").' '.$TVatInfo['label'], '', 'L');
2944 2944
 
2945
-			if (! empty($this->TDataSituation['current'][$tva_tx_formated]['TVA'])) {
2945
+			if (!empty($this->TDataSituation['current'][$tva_tx_formated]['TVA'])) {
2946 2946
 				$pdf->SetXY($this->marge_gauche + 10, $tab_top + 28 + $i);
2947 2947
 				$pdf->MultiCell(80, 2, $outputlangs->transnoentities("VAT").' '.$TVatInfo['label'], '', 'L');
2948 2948
 			} else {
@@ -3006,7 +3006,7 @@  discard block
 block discarded – undo
3006 3006
 				$pdf->MultiCell(32, 2, price($this->TDataSituation[$col][$tva_tx_formated]['HT'], 0, '', 1, -1, 2), '', 'R');
3007 3007
 
3008 3008
 				// Total TVA
3009
-				if (! empty($this->TDataSituation['current'][$tva_tx_formated]['TVA'])) {
3009
+				if (!empty($this->TDataSituation['current'][$tva_tx_formated]['TVA'])) {
3010 3010
 					$pdf->SetXY($x, $tab_top + 28 + $i);
3011 3011
 					$pdf->MultiCell(32, 2, price($this->TDataSituation[$col][$tva_tx_formated]['TVA'], 0, '', 1, -1, 2), '', 'R');
3012 3012
 				} else {
@@ -3086,7 +3086,7 @@  discard block
 block discarded – undo
3086 3086
 
3087 3087
 		$TDataSituation = array();
3088 3088
 
3089
-		if (! empty($facDerniereSituation)) {
3089
+		if (!empty($facDerniereSituation)) {
3090 3090
 			$TDataSituation['derniere_situation'] = $facDerniereSituation;
3091 3091
 			$TDataSituation['date_derniere_situation'] = $facDerniereSituation->date;
3092 3092
 		}
@@ -3095,9 +3095,9 @@  discard block
 block discarded – undo
3095 3095
 		$retenue_garantie_anterieure = 0;
3096 3096
 		// Init tous les champs à 0
3097 3097
 		$TDataSituation['cumul_anterieur'] = array(
3098
-			'HT' => 0,	//montant HT normal
3099
-			'TVA' => 0,   //montant de la TVA sur le HTnet
3100
-			'TTC' => 0,   //montant TTC (HTnet + TVA)
3098
+			'HT' => 0, //montant HT normal
3099
+			'TVA' => 0, //montant de la TVA sur le HTnet
3100
+			'TTC' => 0, //montant TTC (HTnet + TVA)
3101 3101
 			'retenue_garantie' => 0,
3102 3102
 			'travaux_sup' => 0,
3103 3103
 			'HTnet' => 0, //montant HT
@@ -3127,7 +3127,7 @@  discard block
 block discarded – undo
3127 3127
 					$isFirstSituation = false;
3128 3128
 					if (!empty($l->fk_prev_id)) {
3129 3129
 						$prevSituationPercent = $l->get_prev_progress($previousInvoice->id, true);
3130
-					} elseif (! array_key_exists($i + 1, $TPreviousInvoices)) {
3130
+					} elseif (!array_key_exists($i + 1, $TPreviousInvoices)) {
3131 3131
 						$isFirstSituation = true;
3132 3132
 					}
3133 3133
 
@@ -3137,7 +3137,7 @@  discard block
 block discarded – undo
3137 3137
 
3138 3138
 					//1ere ligne
3139 3139
 					$amounttva = $calc_ht * ($ltvatx / 100);
3140
-					if (! isset($TDataSituation['cumul_anterieur'][$ltvatx])) {
3140
+					if (!isset($TDataSituation['cumul_anterieur'][$ltvatx])) {
3141 3141
 						$TDataSituation['cumul_anterieur'][$ltvatx]['HT'] = $calc_ht;
3142 3142
 						$TDataSituation['cumul_anterieur'][$ltvatx]['TVA'] = $amounttva;
3143 3143
 					} else {
@@ -3149,14 +3149,14 @@  discard block
 block discarded – undo
3149 3149
 					//le grand total de TVA
3150 3150
 					// $TDataSituation['cumul_anterieur']['TVA'] += $amounttva;
3151 3151
 
3152
-					if (empty($l->fk_prev_id) && ! $isFirstSituation) {
3152
+					if (empty($l->fk_prev_id) && !$isFirstSituation) {
3153 3153
 						// TODO: à clarifier, mais pour moi, un facture de situation précédente qui a des progressions à 0% c'est pas logique
3154 3154
 						$TDataSituation['cumul_anterieur']['travaux_sup'] += $calc_ht;
3155 3155
 					}
3156 3156
 				}
3157 3157
 			}
3158 3158
 
3159
-			if (! empty($previousInvoice->retained_warranty) && !getDolGlobalString('USE_RETAINED_WARRANTY_ONLY_FOR_SITUATION_FINAL')) {
3159
+			if (!empty($previousInvoice->retained_warranty) && !getDolGlobalString('USE_RETAINED_WARRANTY_ONLY_FOR_SITUATION_FINAL')) {
3160 3160
 				$retenue_garantie_anterieure += $previousInvoice->getRetainedWarrantyAmount();
3161 3161
 			}
3162 3162
 
@@ -3170,7 +3170,7 @@  discard block
 block discarded – undo
3170 3170
 		// print json_encode($facDerniereSituation->lines);exit;
3171 3171
 		$TDataSituation['current'] = $this->btpGetInvoiceAmounts($object->id);
3172 3172
 
3173
-		if (! empty($facDerniereSituation->lines)) {
3173
+		if (!empty($facDerniereSituation->lines)) {
3174 3174
 			$TFacLinesKey = array_keys($facDerniereSituation->lines);
3175 3175
 			$TObjectLinesKey = array_keys($object->lines);
3176 3176
 			$TDiffKey = array_diff($TObjectLinesKey, $TFacLinesKey);
@@ -3365,7 +3365,7 @@  discard block
 block discarded – undo
3365 3365
 	 */
3366 3366
 	public function btpGetInvoiceAmounts($id, $forceReadFromDB = false)
3367 3367
 	{
3368
-		global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes;
3368
+		global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblignes;
3369 3369
 
3370 3370
 		$object = new Facture($db);
3371 3371
 		$object->fetch($id);
@@ -3383,16 +3383,16 @@  discard block
 block discarded – undo
3383 3383
 		$facDerniereSituation = $TPreviousInvoices[0];
3384 3384
 
3385 3385
 		$ret = array(
3386
-			'HT' => 0,	//montant HT normal
3386
+			'HT' => 0, //montant HT normal
3387 3387
 			'HTnet' => 0, //montant HT
3388
-			'TVA' => 0,   //montant de la TVA sur le HTnet
3389
-			'TTC' => 0,   //montant TTC (HTnet + TVA)
3388
+			'TVA' => 0, //montant de la TVA sur le HTnet
3389
+			'TTC' => 0, //montant TTC (HTnet + TVA)
3390 3390
 			'retenue_garantie' => 0,
3391 3391
 			'travaux_sup' => 0,
3392 3392
 			'total_a_payer' => 0 //montant "a payer" sur la facture
3393 3393
 		);
3394 3394
 
3395
-		if (! empty($facDerniereSituation)) {
3395
+		if (!empty($facDerniereSituation)) {
3396 3396
 			$ret['derniere_situation'] = $facDerniereSituation;
3397 3397
 			$ret['date_derniere_situation'] = $facDerniereSituation->date;
3398 3398
 		}
@@ -3526,7 +3526,7 @@  discard block
 block discarded – undo
3526 3526
 			$label = $outputlangs->transnoentities("SituationInvoiceTotalProposal");
3527 3527
 			$pdf->MultiCell($this->page_largeur - ($this->marge_droite + $this->marge_gauche), 3, $label, 0, 'L', 0, 1, $posx, $posy + 1);
3528 3528
 
3529
-			$amount = price($sign * ($total_ht + (! empty($propal->remise) ? $propal->remise : 0)));
3529
+			$amount = price($sign * ($total_ht + (!empty($propal->remise) ? $propal->remise : 0)));
3530 3530
 			$pdf->MultiCell($width2, 3, $amount, 0, 'R', 0, 1, $posx + $width, $posy + 1);
3531 3531
 
3532 3532
 			$pdf->SetFont('', '', $default_font_size - 1);
@@ -3569,7 +3569,7 @@  discard block
 block discarded – undo
3569 3569
 
3570 3570
 		$force_to_zero = false;
3571 3571
 
3572
-		$idinv = 0;//count($previousinvoices);
3572
+		$idinv = 0; //count($previousinvoices);
3573 3573
 		while ($idinv < count($previousinvoices)) {
3574 3574
 			$invoice = $previousinvoices[$idinv];
3575 3575
 
@@ -3591,7 +3591,7 @@  discard block
 block discarded – undo
3591 3591
 				$force_to_zero = true;
3592 3592
 			}
3593 3593
 
3594
-			$ref .= ' - '. $invoice->ref;
3594
+			$ref .= ' - '.$invoice->ref;
3595 3595
 			$ref .= ' ('.dol_print_date($invoice->date, "%d/%m/%Y", false, $outputlangs).')';
3596 3596
 			$pdf->MultiCell($this->page_largeur - ($this->marge_droite + $this->marge_gauche), 3, $ref, 0, 'L', 0);
3597 3597
 
@@ -3622,7 +3622,7 @@  discard block
 block discarded – undo
3622 3622
 				if (($invoice->lines[$i]->info_bits & 0x01) == 0x01) {
3623 3623
 					$vatrate .= '*';
3624 3624
 				}
3625
-				if (! isset($tvas[$vatrate])) {
3625
+				if (!isset($tvas[$vatrate])) {
3626 3626
 					$tvas[$vatrate] = 0;
3627 3627
 				}
3628 3628
 				$tvas[$vatrate] += $tvaligne;
@@ -3800,7 +3800,7 @@  discard block
 block discarded – undo
3800 3800
 						$pdf->SetXY($posx + $width4, $posy + $height * $index + $y);
3801 3801
 						$pdf->MultiCell($width4, $height - 1, price($sign * $payment['amount'], 0, $outputlangs), 0, 'L', 0);
3802 3802
 						$pdf->SetXY($posx + $width4 * 2, $posy + $height * $index + $y);
3803
-						$oper = $outputlangs->transnoentitiesnoconv("PaymentTypeShort" . $payment['type']);
3803
+						$oper = $outputlangs->transnoentitiesnoconv("PaymentTypeShort".$payment['type']);
3804 3804
 
3805 3805
 						$pdf->MultiCell($width4, $height - 1, $oper, 0, 'L', 0);
3806 3806
 						$pdf->SetXY($posx + $width4 * 3, $posy + $height * $index + $y);
@@ -3831,7 +3831,7 @@  discard block
 block discarded – undo
3831 3831
 					$this->_pagehead($pdf, $object, 0, $outputlangs);
3832 3832
 				}
3833 3833
 				$pdf->setPage($pageposafter + 1);
3834
-				$pdf->setPageOrientation('', 1, 0);	// The only function to edit the bottom margin of current page to set it.
3834
+				$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
3835 3835
 
3836 3836
 				$posy = $this->tab_top_newpage + 1;
3837 3837
 			} else {
@@ -3863,7 +3863,7 @@  discard block
 block discarded – undo
3863 3863
 
3864 3864
 		$posy += 10;
3865 3865
 
3866
-		$pdf->setPageOrientation('', 1, 0);	// The only function to edit the bottom margin of current page to set it.
3866
+		$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
3867 3867
 
3868 3868
 		$pdf->SetTextColor(0, 0, 60);
3869 3869
 		$pdf->SetFont('', '', $default_font_size - 1);
Please login to merge, or discard this patch.
htdocs/comm/propal/card.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 							$object->delivery_date = $date_delivery;
229 229
 							foreach ($object->lines as $line) {
230 230
 								if (isset($line->date_start)) {
231
-									$line->date_start +=  $difference;
231
+									$line->date_start += $difference;
232 232
 								}
233 233
 								if (isset($line->date_end)) {
234 234
 									$line->date_end += $difference;
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
 
577 577
 						$classname = ucfirst($subelement);
578 578
 						$srcobject = new $classname($db);
579
-						'@phan-var-force Commande|Propal|Contrat|Fichinter|Expedition $srcobject';  // Can be other class, but CommonObject is too generic
579
+						'@phan-var-force Commande|Propal|Contrat|Fichinter|Expedition $srcobject'; // Can be other class, but CommonObject is too generic
580 580
 
581 581
 						dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines");
582 582
 						$result = $srcobject->fetch($object->origin_id);
@@ -766,7 +766,7 @@  discard block
 block discarded – undo
766 766
 					$error++;
767 767
 				} else {
768 768
 					// Needed if object linked modified by trigger (because linked objects can't be fetched two times : linkedObjectsFullLoaded)
769
-					$locationTarget = DOL_URL_ROOT . '/comm/propal/card.php?id=' . $object->id;
769
+					$locationTarget = DOL_URL_ROOT.'/comm/propal/card.php?id='.$object->id;
770 770
 				}
771 771
 
772 772
 				$deposit = null;
@@ -777,7 +777,7 @@  discard block
 block discarded – undo
777 777
 					!$error && GETPOSTINT('statut') == $object::STATUS_SIGNED && GETPOST('generate_deposit') == 'on'
778 778
 					&& !empty($deposit_percent_from_payment_terms) && isModEnabled('invoice') && $user->hasRight('facture', 'creer')
779 779
 				) {
780
-					require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
780
+					require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
781 781
 
782 782
 					$date = dol_mktime(0, 0, 0, GETPOSTINT('datefmonth'), GETPOSTINT('datefday'), GETPOSTINT('datefyear'));
783 783
 					$forceFields = array();
@@ -790,7 +790,7 @@  discard block
 block discarded – undo
790 790
 
791 791
 					if ($deposit) {
792 792
 						setEventMessage('DepositGenerated');
793
-						$locationTarget = DOL_URL_ROOT . '/compta/facture/card.php?id=' . $deposit->id;
793
+						$locationTarget = DOL_URL_ROOT.'/compta/facture/card.php?id='.$deposit->id;
794 794
 					} else {
795 795
 						$error++;
796 796
 						setEventMessages("Failed to create down payment - ".$object->error, $object->errors, 'errors');
@@ -818,7 +818,7 @@  discard block
 block discarded – undo
818 818
 					}
819 819
 
820 820
 					if ($locationTarget) {
821
-						header('Location: ' . $locationTarget);
821
+						header('Location: '.$locationTarget);
822 822
 						exit;
823 823
 					}
824 824
 				} else {
@@ -1164,8 +1164,8 @@  discard block
 block discarded – undo
1164 1164
 							$pricebycustomerexist = true;
1165 1165
 							$pu_ht = price($prodcustprice->lines[0]->price);
1166 1166
 							$pu_ttc = price($prodcustprice->lines[0]->price_ttc);
1167
-							$price_min =  price($prodcustprice->lines[0]->price_min);
1168
-							$price_min_ttc =  price($prodcustprice->lines[0]->price_min_ttc);
1167
+							$price_min = price($prodcustprice->lines[0]->price_min);
1168
+							$price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc);
1169 1169
 							$price_base_type = $prodcustprice->lines[0]->price_base_type;
1170 1170
 							/*$tva_tx = ($prodcustprice->lines[0]->default_vat_code ? $prodcustprice->lines[0]->tva_tx.' ('.$prodcustprice->lines[0]->default_vat_code.' )' : $prodcustprice->lines[0]->tva_tx);
1171 1171
 							if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) {
@@ -1221,8 +1221,8 @@  discard block
 block discarded – undo
1221 1221
 						if (count($prodcustprice->lines) > 0) {
1222 1222
 							$pu_ht = price($prodcustprice->lines[0]->price);
1223 1223
 							$pu_ttc = price($prodcustprice->lines[0]->price_ttc);
1224
-							$price_min =  price($prodcustprice->lines[0]->price_min);
1225
-							$price_min_ttc =  price($prodcustprice->lines[0]->price_min_ttc);
1224
+							$price_min = price($prodcustprice->lines[0]->price_min);
1225
+							$price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc);
1226 1226
 							$price_base_type = $prodcustprice->lines[0]->price_base_type;
1227 1227
 							/*$tva_tx = ($prodcustprice->lines[0]->default_vat_code ? $prodcustprice->lines[0]->tva_tx.' ('.$prodcustprice->lines[0]->default_vat_code.' )' : $prodcustprice->lines[0]->tva_tx);
1228 1228
 							if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) {
@@ -1730,8 +1730,8 @@  discard block
 block discarded – undo
1730 1730
 	} elseif ($action == 'setconditions' && $usercancreate) {
1731 1731
 		// Terms of payment
1732 1732
 		$sql = "SELECT code ";
1733
-		$sql .= "FROM " . $db->prefix() . "c_payment_term";
1734
-		$sql .= " WHERE rowid = " . ((int) GETPOST('cond_reglement_id', 'int'));
1733
+		$sql .= "FROM ".$db->prefix()."c_payment_term";
1734
+		$sql .= " WHERE rowid = ".((int) GETPOST('cond_reglement_id', 'int'));
1735 1735
 		$result = $db->query($sql);
1736 1736
 		if ($result) {
1737 1737
 			$obj = $db->fetch_object($result);
@@ -1908,7 +1908,7 @@  discard block
 block discarded – undo
1908 1908
 
1909 1909
 			$classname = ucfirst($subelement);
1910 1910
 			$objectsrc = new $classname($db);
1911
-			'@phan-var-force Commande|Propal|Contrat|Expedition $objectsrc';  // Can be other class, but CommonObject is too generic
1911
+			'@phan-var-force Commande|Propal|Contrat|Expedition $objectsrc'; // Can be other class, but CommonObject is too generic
1912 1912
 			$objectsrc->fetch($originid);
1913 1913
 			if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) {
1914 1914
 				$objectsrc->fetch_lines();
@@ -1983,7 +1983,7 @@  discard block
 block discarded – undo
1983 1983
 	print '<form name="addprop" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
1984 1984
 	print '<input type="hidden" name="token" value="'.newToken().'">';
1985 1985
 	print '<input type="hidden" name="action" value="add">';
1986
-	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
1986
+	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
1987 1987
 	print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
1988 1988
 	if ($origin != 'project' && $originid) {
1989 1989
 		print '<input type="hidden" name="origin" value="'.$origin.'">';
@@ -2145,7 +2145,7 @@  discard block
 block discarded – undo
2145 2145
 			$sday = date("d", $tmpdte);
2146 2146
 			print $form->selectDate($syear."-".$smonth."-".$sday, 'date_livraison', 0, 0, 0, "addprop");
2147 2147
 		} else {
2148
-			$tmp_date_delivery = GETPOST('date_delivery') ? : -1;
2148
+			$tmp_date_delivery = GETPOST('date_delivery') ?: -1;
2149 2149
 			print $form->selectDate($tmp_date_delivery, 'date_livraison', 0, 0, 0, "addprop", 1, 1);
2150 2150
 		}
2151 2151
 		print '</td></tr>';
@@ -2377,7 +2377,7 @@  discard block
 block discarded – undo
2377 2377
 		if (!getDolGlobalString('PROPAL_SKIP_ACCEPT_REFUSE')) {
2378 2378
 			$formquestion[] = array('type' => 'select', 'name' => 'statut', 'label' => '<span class="fieldrequired">'.$langs->trans("CloseAs").'</span>', 'values' => array($object::STATUS_SIGNED => $object->LibStatut($object::STATUS_SIGNED), $object::STATUS_NOTSIGNED => $object->LibStatut($object::STATUS_NOTSIGNED)));
2379 2379
 		}
2380
-		$formquestion[] = array('type' => 'text', 'name' => 'note_private', 'label' => $langs->trans("Note"), 'value' => '');				// Field to complete private note (not replace)
2380
+		$formquestion[] = array('type' => 'text', 'name' => 'note_private', 'label' => $langs->trans("Note"), 'value' => ''); // Field to complete private note (not replace)
2381 2381
 
2382 2382
 		if (getDolGlobalInt('PROPOSAL_SUGGEST_DOWN_PAYMENT_INVOICE_CREATION')) {
2383 2383
 			// This is a hidden option:
@@ -2387,7 +2387,7 @@  discard block
 block discarded – undo
2387 2387
 			$deposit_percent_from_payment_terms = getDictionaryValue('c_payment_term', 'deposit_percent', $object->cond_reglement_id);
2388 2388
 
2389 2389
 			if (!empty($deposit_percent_from_payment_terms) && isModEnabled('invoice') && $user->hasRight('facture', 'creer')) {
2390
-				require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
2390
+				require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
2391 2391
 
2392 2392
 				$object->fetchObjectLinked();
2393 2393
 
@@ -2471,7 +2471,7 @@  discard block
 block discarded – undo
2471 2471
 						'type' => 'onecolumn',
2472 2472
 						'value' => '
2473 2473
 							<script>
2474
-								let signedValue = ' . $object::STATUS_SIGNED . ';
2474
+								let signedValue = ' . $object::STATUS_SIGNED.';
2475 2475
 
2476 2476
 								$(document).ready(function() {
2477 2477
 									$("[name=generate_deposit]").change(function () {
@@ -2521,7 +2521,7 @@  discard block
 block discarded – undo
2521 2521
 		if (!getDolGlobalString('PROPAL_SKIP_ACCEPT_REFUSE')) {
2522 2522
 			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('SetAcceptedRefused'), '', 'confirm_closeas', $formquestion, '', 1, 250);
2523 2523
 		} else {
2524
-			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?statut=3&id=' . $object->id, $langs->trans('Close'), '', 'confirm_closeas', $formquestion, '', 1, 250);
2524
+			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?statut=3&id='.$object->id, $langs->trans('Close'), '', 'confirm_closeas', $formquestion, '', 1, 250);
2525 2525
 		}
2526 2526
 	} elseif ($action == 'cancel') {
2527 2527
 		// Confirm cancel
@@ -2563,7 +2563,7 @@  discard block
 block discarded – undo
2563 2563
 		$nbMandated = 0;
2564 2564
 		foreach ($object->lines as $line) {
2565 2565
 			$res = $line->fetch_product();
2566
-			if ($res  > 0) {
2566
+			if ($res > 0) {
2567 2567
 				if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) {
2568 2568
 					$nbMandated++;
2569 2569
 					break;
@@ -2604,7 +2604,7 @@  discard block
 block discarded – undo
2604 2604
 	$morehtmlref = '<div class="refidno">';
2605 2605
 	// Ref customer
2606 2606
 	$morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string', '', 0, 1);
2607
-	$morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1);
2607
+	$morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1);
2608 2608
 	// Thirdparty
2609 2609
 	$morehtmlref .= '<br>'.$soc->getNomUrl(1, 'customer');
2610 2610
 	if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $soc->id > 0) {
@@ -2946,50 +2946,50 @@  discard block
 block discarded – undo
2946 2946
 		include DOL_DOCUMENT_ROOT.'/core/tpl/object_currency_amount.tpl.php';
2947 2947
 
2948 2948
 		print '<tr>';
2949
-		print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>';
2950
-		print '<td class="nowrap amountcard right">' . price($object->total_ht, 0, $langs, 1, -1, -1, $conf->currency) . '</td>';
2949
+		print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>';
2950
+		print '<td class="nowrap amountcard right">'.price($object->total_ht, 0, $langs, 1, -1, -1, $conf->currency).'</td>';
2951 2951
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2952
-			print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, 0, $langs, 1, -1, -1, $object->multicurrency_code) . '</td>';
2952
+			print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, 0, $langs, 1, -1, -1, $object->multicurrency_code).'</td>';
2953 2953
 		}
2954 2954
 		print '</tr>';
2955 2955
 
2956 2956
 		print '<tr>';
2957
-		print '<td>' . $langs->trans('AmountVAT') . '</td>';
2958
-		print '<td class="nowrap amountcard right">' . price($object->total_tva, 0, $langs, 1, -1, -1, $conf->currency) . '</td>';
2957
+		print '<td>'.$langs->trans('AmountVAT').'</td>';
2958
+		print '<td class="nowrap amountcard right">'.price($object->total_tva, 0, $langs, 1, -1, -1, $conf->currency).'</td>';
2959 2959
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2960
-			print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, 0, $langs, 1, -1, -1, $object->multicurrency_code) . '</td>';
2960
+			print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, 0, $langs, 1, -1, -1, $object->multicurrency_code).'</td>';
2961 2961
 		}
2962 2962
 		print '</tr>';
2963 2963
 
2964 2964
 		if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) {
2965 2965
 			print '<tr>';
2966
-			print '<td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
2967
-			print '<td class="nowrap amountcard right">' . price($object->total_localtax1, 0, $langs, 1, -1, -1, $conf->currency) . '</td>';
2966
+			print '<td>'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>';
2967
+			print '<td class="nowrap amountcard right">'.price($object->total_localtax1, 0, $langs, 1, -1, -1, $conf->currency).'</td>';
2968 2968
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2969 2969
 				$object->multicurrency_total_localtax1 = price2num($object->total_localtax1 * $object->multicurrency_tx, 'MT');
2970 2970
 
2971
-				print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_localtax1, 0, $langs, 1, -1, -1, $object->multicurrency_code) . '</td>';
2971
+				print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_localtax1, 0, $langs, 1, -1, -1, $object->multicurrency_code).'</td>';
2972 2972
 			}
2973 2973
 			print '</tr>';
2974 2974
 		}
2975 2975
 
2976 2976
 		if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) {
2977 2977
 			print '<tr>';
2978
-			print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>';
2979
-			print '<td class="nowrap amountcard right">' . price($object->total_localtax2, 0, $langs, 1, -1, -1, $conf->currency) . '</td>';
2978
+			print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>';
2979
+			print '<td class="nowrap amountcard right">'.price($object->total_localtax2, 0, $langs, 1, -1, -1, $conf->currency).'</td>';
2980 2980
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2981 2981
 				$object->multicurrency_total_localtax2 = price2num($object->total_localtax2 * $object->multicurrency_tx, 'MT');
2982 2982
 
2983
-				print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_localtax2, 0, $langs, 1, -1, -1, $object->multicurrency_code) . '</td>';
2983
+				print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_localtax2, 0, $langs, 1, -1, -1, $object->multicurrency_code).'</td>';
2984 2984
 			}
2985 2985
 			print '</tr>';
2986 2986
 		}
2987 2987
 
2988 2988
 		print '<tr>';
2989
-		print '<td>' . $langs->trans('AmountTTC') . '</td>';
2990
-		print '<td class="nowrap amountcard right">' . price($object->total_ttc, 0, $langs, 1, -1, -1, $conf->currency) . '</td>';
2989
+		print '<td>'.$langs->trans('AmountTTC').'</td>';
2990
+		print '<td class="nowrap amountcard right">'.price($object->total_ttc, 0, $langs, 1, -1, -1, $conf->currency).'</td>';
2991 2991
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2992
-			print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ttc, 0, $langs, 1, -1, -1, $object->multicurrency_code) . '</td>';
2992
+			print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ttc, 0, $langs, 1, -1, -1, $object->multicurrency_code).'</td>';
2993 2993
 		}
2994 2994
 		print '</tr>';
2995 2995
 
@@ -3207,8 +3207,8 @@  discard block
 block discarded – undo
3207 3207
 				} else {
3208 3208
 					// Set not signed (close)
3209 3209
 					if ($object->statut == Propal::STATUS_DRAFT && $usercanclose) {
3210
-						print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&token='.newToken().'&action=closeas&token='.newToken() . (!getDolGlobalString('MAIN_JUMP_TAG') ? '' : '#close') . '"';
3211
-						print '>' . $langs->trans('SetRefusedAndClose') . '</a>';
3210
+						print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&token='.newToken().'&action=closeas&token='.newToken().(!getDolGlobalString('MAIN_JUMP_TAG') ? '' : '#close').'"';
3211
+						print '>'.$langs->trans('SetRefusedAndClose').'</a>';
3212 3212
 					}
3213 3213
 				}
3214 3214
 
Please login to merge, or discard this patch.
htdocs/includes/parsedown/Parsedown.php 1 patch
Spacing   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 
206 206
 			if (isset($CurrentBlock['continuable']))
207 207
 			{
208
-				$methodName = 'block' . $CurrentBlock['type'] . 'Continue';
208
+				$methodName = 'block'.$CurrentBlock['type'].'Continue';
209 209
 				$Block = $this->$methodName($Line, $CurrentBlock);
210 210
 
211 211
 				if (isset($Block))
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 				{
219 219
 					if ($this->isBlockCompletable($CurrentBlock['type']))
220 220
 					{
221
-						$methodName = 'block' . $CurrentBlock['type'] . 'Complete';
221
+						$methodName = 'block'.$CurrentBlock['type'].'Complete';
222 222
 						$CurrentBlock = $this->$methodName($CurrentBlock);
223 223
 					}
224 224
 				}
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 			{
237 237
 				foreach ($this->BlockTypes[$marker] as $blockType)
238 238
 				{
239
-					$blockTypes []= $blockType;
239
+					$blockTypes [] = $blockType;
240 240
 				}
241 241
 			}
242 242
 
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 				{
252 252
 					$Block['type'] = $blockType;
253 253
 
254
-					if ( ! isset($Block['identified']))
254
+					if (!isset($Block['identified']))
255 255
 					{
256 256
 						if (isset($CurrentBlock))
257 257
 						{
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 
301 301
 		if (isset($CurrentBlock['continuable']) and $this->isBlockCompletable($CurrentBlock['type']))
302 302
 		{
303
-			$methodName = 'block' . $CurrentBlock['type'] . 'Complete';
303
+			$methodName = 'block'.$CurrentBlock['type'].'Complete';
304 304
 			$CurrentBlock = $this->$methodName($CurrentBlock);
305 305
 		}
306 306
 
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 
319 319
 	protected function extractElement(array $Component)
320 320
 	{
321
-		if ( ! isset($Component['element']))
321
+		if (!isset($Component['element']))
322 322
 		{
323 323
 			if (isset($Component['markup']))
324 324
 			{
@@ -335,12 +335,12 @@  discard block
 block discarded – undo
335 335
 
336 336
 	protected function isBlockContinuable($Type)
337 337
 	{
338
-		return method_exists($this, 'block' . $Type . 'Continue');
338
+		return method_exists($this, 'block'.$Type.'Continue');
339 339
 	}
340 340
 
341 341
 	protected function isBlockCompletable($Type)
342 342
 	{
343
-		return method_exists($this, 'block' . $Type . 'Complete');
343
+		return method_exists($this, 'block'.$Type.'Complete');
344 344
 	}
345 345
 
346 346
 	#
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 
349 349
 	protected function blockCode($Line, $Block = null)
350 350
 	{
351
-		if (isset($Block) and $Block['type'] === 'Paragraph' and ! isset($Block['interrupted']))
351
+		if (isset($Block) and $Block['type'] === 'Paragraph' and !isset($Block['interrupted']))
352 352
 		{
353 353
 			return;
354 354
 		}
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
 			return;
433 433
 		}
434 434
 
435
-		$Block['element']['rawHtml'] .= "\n" . $Line['body'];
435
+		$Block['element']['rawHtml'] .= "\n".$Line['body'];
436 436
 
437 437
 		if (strpos($Line['text'], '-->') !== false)
438 438
 		{
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
 				return $Block;
524 524
 			}
525 525
 
526
-			$Block['element']['element']['text'] .= "\n" . $Line['body'];
526
+			$Block['element']['element']['text'] .= "\n".$Line['body'];
527 527
 
528 528
 			return $Block;
529 529
 	}
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
 
557 557
 		$Block = array(
558 558
 			'element' => array(
559
-				'name' => 'h' . $level,
559
+				'name' => 'h'.$level,
560 560
 				'handler' => array(
561 561
 					'function' => 'lineElements',
562 562
 					'argument' => $text,
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
 			{
584 584
 				$contentIndent -= 1;
585 585
 				$matches[1] = substr($matches[1], 0, -$contentIndent);
586
-				$matches[3] = str_repeat(' ', $contentIndent) . $matches[3];
586
+				$matches[3] = str_repeat(' ', $contentIndent).$matches[3];
587 587
 			}
588 588
 			elseif ($contentIndent === 0)
589 589
 			{
@@ -616,7 +616,7 @@  discard block
 block discarded – undo
616 616
 					if (
617 617
 						isset($CurrentBlock)
618 618
 						and $CurrentBlock['type'] === 'Paragraph'
619
-						and ! isset($CurrentBlock['interrupted'])
619
+						and !isset($CurrentBlock['interrupted'])
620 620
 						) {
621 621
 							return;
622 622
 						}
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
 				)
635 635
 			);
636 636
 
637
-			$Block['element']['elements'] []= & $Block['li'];
637
+			$Block['element']['elements'] [] = & $Block['li'];
638 638
 
639 639
 			return $Block;
640 640
 		}
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
 			) {
663 663
 				if (isset($Block['interrupted']))
664 664
 				{
665
-					$Block['li']['handler']['argument'] []= '';
665
+					$Block['li']['handler']['argument'] [] = '';
666 666
 
667 667
 					$Block['loose'] = true;
668 668
 
@@ -684,7 +684,7 @@  discard block
 block discarded – undo
684 684
 					)
685 685
 				);
686 686
 
687
-				$Block['element']['elements'] []= & $Block['li'];
687
+				$Block['element']['elements'] [] = & $Block['li'];
688 688
 
689 689
 				return $Block;
690 690
 			}
@@ -702,7 +702,7 @@  discard block
 block discarded – undo
702 702
 			{
703 703
 				if (isset($Block['interrupted']))
704 704
 				{
705
-					$Block['li']['handler']['argument'] []= '';
705
+					$Block['li']['handler']['argument'] [] = '';
706 706
 
707 707
 					$Block['loose'] = true;
708 708
 
@@ -711,16 +711,16 @@  discard block
 block discarded – undo
711 711
 
712 712
 				$text = substr($Line['body'], $requiredIndent);
713 713
 
714
-				$Block['li']['handler']['argument'] []= $text;
714
+				$Block['li']['handler']['argument'] [] = $text;
715 715
 
716 716
 				return $Block;
717 717
 			}
718 718
 
719
-			if ( ! isset($Block['interrupted']))
719
+			if (!isset($Block['interrupted']))
720 720
 			{
721 721
 				$text = preg_replace('/^[ ]{0,'.$requiredIndent.'}+/', '', $Line['body']);
722 722
 
723
-				$Block['li']['handler']['argument'] []= $text;
723
+				$Block['li']['handler']['argument'] [] = $text;
724 724
 
725 725
 				return $Block;
726 726
 			}
@@ -734,7 +734,7 @@  discard block
 block discarded – undo
734 734
 			{
735 735
 				if (end($li['handler']['argument']) !== '')
736 736
 				{
737
-					$li['handler']['argument'] []= '';
737
+					$li['handler']['argument'] [] = '';
738 738
 				}
739 739
 			}
740 740
 		}
@@ -773,14 +773,14 @@  discard block
 block discarded – undo
773 773
 
774 774
 		if ($Line['text'][0] === '>' and preg_match('/^>[ ]?+(.*+)/', $Line['text'], $matches))
775 775
 		{
776
-			$Block['element']['handler']['argument'] []= $matches[1];
776
+			$Block['element']['handler']['argument'] [] = $matches[1];
777 777
 
778 778
 			return $Block;
779 779
 		}
780 780
 
781
-		if ( ! isset($Block['interrupted']))
781
+		if (!isset($Block['interrupted']))
782 782
 		{
783
-			$Block['element']['handler']['argument'] []= $Line['text'];
783
+			$Block['element']['handler']['argument'] [] = $Line['text'];
784 784
 
785 785
 			return $Block;
786 786
 		}
@@ -810,7 +810,7 @@  discard block
 block discarded – undo
810 810
 
811 811
 	protected function blockSetextHeader($Line, $Block = null)
812 812
 	{
813
-		if ( ! isset($Block) or $Block['type'] !== 'Paragraph' or isset($Block['interrupted']))
813
+		if (!isset($Block) or $Block['type'] !== 'Paragraph' or isset($Block['interrupted']))
814 814
 		{
815 815
 			return;
816 816
 		}
@@ -861,7 +861,7 @@  discard block
 block discarded – undo
861 861
 			return;
862 862
 		}
863 863
 
864
-		$Block['element']['rawHtml'] .= "\n" . $Line['body'];
864
+		$Block['element']['rawHtml'] .= "\n".$Line['body'];
865 865
 
866 866
 		return $Block;
867 867
 	}
@@ -896,7 +896,7 @@  discard block
 block discarded – undo
896 896
 
897 897
 	protected function blockTable($Line, array $Block = null)
898 898
 	{
899
-		if ( ! isset($Block) or $Block['type'] !== 'Paragraph' or isset($Block['interrupted']))
899
+		if (!isset($Block) or $Block['type'] !== 'Paragraph' or isset($Block['interrupted']))
900 900
 		{
901 901
 			return;
902 902
 		}
@@ -945,7 +945,7 @@  discard block
 block discarded – undo
945 945
 					$alignment = $alignment === 'left' ? 'center' : 'right';
946 946
 				}
947 947
 
948
-				$alignments []= $alignment;
948
+				$alignments [] = $alignment;
949 949
 			}
950 950
 
951 951
 			# ~
@@ -986,7 +986,7 @@  discard block
 block discarded – undo
986 986
 					);
987 987
 				}
988 988
 
989
-				$HeaderElements []= $HeaderElement;
989
+				$HeaderElements [] = $HeaderElement;
990 990
 			}
991 991
 
992 992
 			# ~
@@ -1000,16 +1000,16 @@  discard block
 block discarded – undo
1000 1000
 				),
1001 1001
 			);
1002 1002
 
1003
-			$Block['element']['elements'] []= array(
1003
+			$Block['element']['elements'] [] = array(
1004 1004
 				'name' => 'thead',
1005 1005
 			);
1006 1006
 
1007
-			$Block['element']['elements'] []= array(
1007
+			$Block['element']['elements'] [] = array(
1008 1008
 				'name' => 'tbody',
1009 1009
 				'elements' => array(),
1010 1010
 			);
1011 1011
 
1012
-			$Block['element']['elements'][0]['elements'] []= array(
1012
+			$Block['element']['elements'][0]['elements'] [] = array(
1013 1013
 				'name' => 'tr',
1014 1014
 				'elements' => $HeaderElements,
1015 1015
 			);
@@ -1053,11 +1053,11 @@  discard block
 block discarded – undo
1053 1053
 				if (isset($Block['alignments'][$index]))
1054 1054
 				{
1055 1055
 					$Element['attributes'] = array(
1056
-						'style' => 'text-align: ' . $Block['alignments'][$index] . ';',
1056
+						'style' => 'text-align: '.$Block['alignments'][$index].';',
1057 1057
 					);
1058 1058
 				}
1059 1059
 
1060
-				$Elements []= $Element;
1060
+				$Elements [] = $Element;
1061 1061
 			}
1062 1062
 
1063 1063
 			$Element = array(
@@ -1065,7 +1065,7 @@  discard block
 block discarded – undo
1065 1065
 				'elements' => $Elements,
1066 1066
 			);
1067 1067
 
1068
-			$Block['element']['elements'][1]['elements'] []= $Element;
1068
+			$Block['element']['elements'][1]['elements'] [] = $Element;
1069 1069
 
1070 1070
 			return $Block;
1071 1071
 		}
@@ -1165,7 +1165,7 @@  discard block
 block discarded – undo
1165 1165
 
1166 1166
 				$Inline = $this->{"inline$inlineType"}($Excerpt);
1167 1167
 
1168
-				if ( ! isset($Inline))
1168
+				if (!isset($Inline))
1169 1169
 				{
1170 1170
 					continue;
1171 1171
 				}
@@ -1179,7 +1179,7 @@  discard block
 block discarded – undo
1179 1179
 
1180 1180
 				# sets a default inline position
1181 1181
 
1182
-				if ( ! isset($Inline['position']))
1182
+				if (!isset($Inline['position']))
1183 1183
 				{
1184 1184
 					$Inline['position'] = $markerPosition;
1185 1185
 				}
@@ -1223,7 +1223,7 @@  discard block
 block discarded – undo
1223 1223
 
1224 1224
 		foreach ($Elements as &$Element)
1225 1225
 		{
1226
-			if ( ! isset($Element['autobreak']))
1226
+			if (!isset($Element['autobreak']))
1227 1227
 			{
1228 1228
 				$Element['autobreak'] = false;
1229 1229
 			}
@@ -1279,14 +1279,14 @@  discard block
 block discarded – undo
1279 1279
 		$hostnameLabel = '[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?';
1280 1280
 
1281 1281
 		$commonMarkEmail = '[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]++@'
1282
-			. $hostnameLabel . '(?:\.' . $hostnameLabel . ')*';
1282
+			. $hostnameLabel.'(?:\.'.$hostnameLabel.')*';
1283 1283
 
1284 1284
 			if (strpos($Excerpt['text'], '>') !== false
1285 1285
 				and preg_match("/^<((mailto:)?$commonMarkEmail)>/i", $Excerpt['text'], $matches)
1286
-				){
1286
+				) {
1287 1287
 					$url = $matches[1];
1288 1288
 
1289
-					if ( ! isset($matches[2]))
1289
+					if (!isset($matches[2]))
1290 1290
 					{
1291 1291
 						$url = "mailto:$url";
1292 1292
 					}
@@ -1306,7 +1306,7 @@  discard block
 block discarded – undo
1306 1306
 
1307 1307
 	protected function inlineEmphasis($Excerpt)
1308 1308
 	{
1309
-		if ( ! isset($Excerpt['text'][1]))
1309
+		if (!isset($Excerpt['text'][1]))
1310 1310
 		{
1311 1311
 			return;
1312 1312
 		}
@@ -1352,12 +1352,12 @@  discard block
 block discarded – undo
1352 1352
 
1353 1353
 	protected function inlineImage($Excerpt)
1354 1354
 	{
1355
-		if ( ! isset($Excerpt['text'][1]) or $Excerpt['text'][1] !== '[')
1355
+		if (!isset($Excerpt['text'][1]) or $Excerpt['text'][1] !== '[')
1356 1356
 		{
1357 1357
 			return;
1358 1358
 		}
1359 1359
 
1360
-		$Excerpt['text']= substr($Excerpt['text'], 1);
1360
+		$Excerpt['text'] = substr($Excerpt['text'], 1);
1361 1361
 
1362 1362
 		$Link = $this->inlineLink($Excerpt);
1363 1363
 
@@ -1443,7 +1443,7 @@  discard block
 block discarded – undo
1443 1443
 				$definition = strtolower($Element['handler']['argument']);
1444 1444
 			}
1445 1445
 
1446
-			if ( ! isset($this->DefinitionData['Reference'][$definition]))
1446
+			if (!isset($this->DefinitionData['Reference'][$definition]))
1447 1447
 			{
1448 1448
 				return;
1449 1449
 			}
@@ -1498,7 +1498,7 @@  discard block
 block discarded – undo
1498 1498
 			and preg_match('/^&(#?+[0-9a-zA-Z]++);/', $Excerpt['text'], $matches)
1499 1499
 			) {
1500 1500
 				return array(
1501
-					'element' => array('rawHtml' => '&' . $matches[1] . ';'),
1501
+					'element' => array('rawHtml' => '&'.$matches[1].';'),
1502 1502
 					'extent' => strlen($matches[0]),
1503 1503
 				);
1504 1504
 			}
@@ -1508,7 +1508,7 @@  discard block
 block discarded – undo
1508 1508
 
1509 1509
 	protected function inlineStrikethrough($Excerpt)
1510 1510
 	{
1511
-		if ( ! isset($Excerpt['text'][1]))
1511
+		if (!isset($Excerpt['text'][1]))
1512 1512
 		{
1513 1513
 			return;
1514 1514
 		}
@@ -1531,7 +1531,7 @@  discard block
 block discarded – undo
1531 1531
 
1532 1532
 	protected function inlineUrl($Excerpt)
1533 1533
 	{
1534
-		if ($this->urlsLinked !== true or ! isset($Excerpt['text'][2]) or $Excerpt['text'][2] !== '/')
1534
+		if ($this->urlsLinked !== true or !isset($Excerpt['text'][2]) or $Excerpt['text'][2] !== '/')
1535 1535
 		{
1536 1536
 			return;
1537 1537
 		}
@@ -1702,7 +1702,7 @@  discard block
 block discarded – undo
1702 1702
 
1703 1703
 		if ($hasName)
1704 1704
 		{
1705
-			$markup .= '<' . $Element['name'];
1705
+			$markup .= '<'.$Element['name'];
1706 1706
 
1707 1707
 			if (isset($Element['attributes']))
1708 1708
 			{
@@ -1760,7 +1760,7 @@  discard block
 block discarded – undo
1760 1760
 				}
1761 1761
 			}
1762 1762
 
1763
-			$markup .= $hasName ? '</' . $Element['name'] . '>' : '';
1763
+			$markup .= $hasName ? '</'.$Element['name'].'>' : '';
1764 1764
 		}
1765 1765
 		elseif ($hasName)
1766 1766
 		{
@@ -1789,7 +1789,7 @@  discard block
 block discarded – undo
1789 1789
 			// (autobreak === false) covers both sides of an element
1790 1790
 			$autoBreak = !$autoBreak ? $autoBreak : $autoBreakNext;
1791 1791
 
1792
-			$markup .= ($autoBreak ? "\n" : '') . $this->element($Element);
1792
+			$markup .= ($autoBreak ? "\n" : '').$this->element($Element);
1793 1793
 			$autoBreak = $autoBreakNext;
1794 1794
 		}
1795 1795
 
@@ -1804,7 +1804,7 @@  discard block
 block discarded – undo
1804 1804
 	{
1805 1805
 		$Elements = $this->linesElements($lines);
1806 1806
 
1807
-		if ( ! in_array('', $lines)
1807
+		if (!in_array('', $lines)
1808 1808
 			and isset($Elements[0]) and isset($Elements[0]['name'])
1809 1809
 			and $Elements[0]['name'] === 'p'
1810 1810
 			) {
@@ -1861,12 +1861,12 @@  discard block
 block discarded – undo
1861 1861
 	protected function sanitiseElement(array $Element)
1862 1862
 	{
1863 1863
 		static $goodAttribute = '/^[a-zA-Z0-9][a-zA-Z0-9-_]*+$/';
1864
-		static $safeUrlNameToAtt  = array(
1864
+		static $safeUrlNameToAtt = array(
1865 1865
 			'a'   => 'href',
1866 1866
 			'img' => 'src',
1867 1867
 		);
1868 1868
 
1869
-		if ( ! isset($Element['name']))
1869
+		if (!isset($Element['name']))
1870 1870
 		{
1871 1871
 			unset($Element['attributes']);
1872 1872
 			return $Element;
@@ -1877,12 +1877,12 @@  discard block
 block discarded – undo
1877 1877
 			$Element = $this->filterUnsafeUrlInAttribute($Element, $safeUrlNameToAtt[$Element['name']]);
1878 1878
 		}
1879 1879
 
1880
-		if ( ! empty($Element['attributes']))
1880
+		if (!empty($Element['attributes']))
1881 1881
 		{
1882 1882
 			foreach ($Element['attributes'] as $att => $val)
1883 1883
 			{
1884 1884
 				# filter out badly parsed attribute
1885
-				if ( ! preg_match($goodAttribute, $att))
1885
+				if (!preg_match($goodAttribute, $att))
1886 1886
 				{
1887 1887
 					unset($Element['attributes'][$att]);
1888 1888
 				}
@@ -1983,8 +1983,8 @@  discard block
 block discarded – undo
1983 1983
 	protected $textLevelElements = array(
1984 1984
 		'a', 'br', 'bdo', 'abbr', 'blink', 'nextid', 'acronym', 'basefont',
1985 1985
 		'b', 'em', 'big', 'cite', 'small', 'spacer', 'listing',
1986
-		'i', 'rp', 'del', 'code',          'strike', 'marquee',
1987
-		'q', 'rt', 'ins', 'font',          'strong',
1986
+		'i', 'rp', 'del', 'code', 'strike', 'marquee',
1987
+		'q', 'rt', 'ins', 'font', 'strong',
1988 1988
 		's', 'tt', 'kbd', 'mark',
1989 1989
 		'u', 'xm', 'sub', 'nobr',
1990 1990
 		'sup', 'ruby',
Please login to merge, or discard this patch.
htdocs/install/upgrade2.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4225,7 +4225,7 @@  discard block
 block discarded – undo
4225 4225
 
4226 4226
 	if (!is_object($user)) {
4227 4227
 		include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
4228
-		$user = new User($db);	// To avoid error during migration
4228
+		$user = new User($db); // To avoid error during migration
4229 4229
 	}
4230 4230
 
4231 4231
 	dolibarr_install_syslog("upgrade2::migrate_reload_modules force=".$force.", listofmodule=".implode(',', array_keys($listofmodule)));
@@ -4402,7 +4402,7 @@  discard block
 block discarded – undo
4402 4402
 	$sql = "SELECT rowid , entity, batch, fk_product from ".MAIN_DB_PREFIX."product_lot";
4403 4403
 	$resql = $db->query($sql);
4404 4404
 	if ($resql) {
4405
-		$modulepart="product_batch";
4405
+		$modulepart = "product_batch";
4406 4406
 		while ($obj = $db->fetch_object($resql)) {
4407 4407
 			$entity = (empty($obj->entity) ? 1 : $obj->entity);
4408 4408
 			if ($entity > 1) {
@@ -4416,10 +4416,10 @@  discard block
 block discarded – undo
4416 4416
 
4417 4417
 			if ($dir && $res > 0) {
4418 4418
 				$lot->ref = $obj->batch;
4419
-				$origin = $dir . '/' . get_exdir(0, 0, 0, 1, $lot, $modulepart);
4419
+				$origin = $dir.'/'.get_exdir(0, 0, 0, 1, $lot, $modulepart);
4420 4420
 
4421 4421
 				$lot->fetch($obj->rowid, $obj->fk_product, $obj->batch);
4422
-				$destin = $dir . '/' . get_exdir(0, 0, 0, 1, $lot, $modulepart);
4422
+				$destin = $dir.'/'.get_exdir(0, 0, 0, 1, $lot, $modulepart);
4423 4423
 
4424 4424
 				if (dol_is_dir($origin) && !dol_is_dir($destin)) {
4425 4425
 					dol_move_dir($origin, $destin, 0);
@@ -5102,7 +5102,7 @@  discard block
 block discarded – undo
5102 5102
 				$error++;
5103 5103
 			}
5104 5104
 
5105
-			$current_contract =  $obj->cid;
5105
+			$current_contract = $obj->cid;
5106 5106
 		}
5107 5107
 	} else {
5108 5108
 		$error++;
Please login to merge, or discard this patch.