Completed
Branch develop (6635b3)
by
unknown
17:09
created
htdocs/admin/system/security.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 print "<strong>PHP session.use_strict_mode</strong> = ".(ini_get('session.use_strict_mode') ? img_picto('', 'tick').' ' : img_warning().' ').(ini_get('session.use_strict_mode') ? ini_get('session.use_strict_mode') : yn(0)).' &nbsp; <span class="opacitymedium">('.$langs->trans("RecommendedValueIs", '1').")</span><br>\n";
109 109
 print "<strong>PHP session.use_only_cookies</strong> = ".(ini_get('session.use_only_cookies') ? img_picto('', 'tick').' ' : img_warning().' ').(ini_get('session.use_only_cookies') ? ini_get('session.use_only_cookies') : yn(0)).' &nbsp; <span class="opacitymedium">('.$langs->trans("RecommendedValueIs", '1').")</span><br>\n";
110 110
 print "<strong>PHP session.cookie_httponly</strong> = ".(ini_get('session.cookie_httponly') ? img_picto('', 'tick').' ' : img_warning().' ').(ini_get('session.cookie_httponly') ? ini_get('session.cookie_httponly') : '').' &nbsp; <span class="opacitymedium">('.$langs->trans("RecommendedValueIs", '1').")</span><br>\n";
111
-print "<strong>PHP session.cookie_samesite</strong> = ".(ini_get('session.cookie_samesite') ? img_picto('', 'tick').' ' .ini_get('session.cookie_samesite') : 'None');
111
+print "<strong>PHP session.cookie_samesite</strong> = ".(ini_get('session.cookie_samesite') ? img_picto('', 'tick').' '.ini_get('session.cookie_samesite') : 'None');
112 112
 if (!ini_get('session.cookie_samesite') || ini_get('session.cookie_samesite') == 'Lax') {
113 113
 	print ' &nbsp; <span class="opacitymedium">('.$langs->trans("RecommendedValueIs", 'Lax').")</span>";
114 114
 } elseif (ini_get('session.cookie_samesite') == 'Strict') {
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 $todisabletext = '';
145 145
 $i = 0;
146 146
 foreach ($arrayoffunctionstodisable as $functiontodisable) {
147
-	if (! in_array($functiontodisable, $arrayoffunctionsdisabled)) {
147
+	if (!in_array($functiontodisable, $arrayoffunctionsdisabled)) {
148 148
 		if ($i > 0) {
149 149
 			$todisabletext .= ', ';
150 150
 		}
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 $todisabletext = '';
160 160
 $i = 0;
161 161
 foreach ($arrayoffunctionstodisable2 as $functiontodisable) {
162
-	if (! in_array($functiontodisable, $arrayoffunctionsdisabled)) {
162
+	if (!in_array($functiontodisable, $arrayoffunctionsdisabled)) {
163 163
 		if ($i > 0) {
164 164
 			$todisabletext .= ', ';
165 165
 		}
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 
184 184
 // JSON
185 185
 print '<strong>JSON</strong>: ';
186
-$loadedExtensions    = array_map('strtolower', get_loaded_extensions(false));
186
+$loadedExtensions = array_map('strtolower', get_loaded_extensions(false));
187 187
 $test = !in_array('json', $loadedExtensions);
188 188
 if ($test) {
189 189
 	print img_picto('', 'error').' '.$langs->trans("NotInstalled").' - '.$langs->trans("VulnerableToRCEAttack");
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 print '<br>';
245 245
 print '<br>';
246 246
 
247
-print '<strong>'.$langs->trans("PermissionsOnFile", $conffile).'</strong>: ';		// $conffile is defined into filefunc.inc.php
247
+print '<strong>'.$langs->trans("PermissionsOnFile", $conffile).'</strong>: '; // $conffile is defined into filefunc.inc.php
248 248
 $perms = fileperms($dolibarr_main_document_root.'/'.$conffile);
249 249
 if ($perms) {
250 250
 	if (($perms & 0x0004) || ($perms & 0x0002)) {
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
 if (!getDolGlobalString('MAIN_ANTIVIRUS_COMMAND')) {
479 479
 	print ' - <span class="opacitymedium">'.$langs->trans("Recommended").': '.$langs->trans("DefinedAPathForAntivirusCommandIntoSetup", $langs->transnoentitiesnoconv("Home")." - ".$langs->transnoentitiesnoconv("Setup")." - ".$langs->transnoentitiesnoconv("Security")).'</span>';
480 480
 } else {
481
-	print ' &nbsp; - ' . getDolGlobalString('MAIN_ANTIVIRUS_COMMAND');
481
+	print ' &nbsp; - '.getDolGlobalString('MAIN_ANTIVIRUS_COMMAND');
482 482
 	if (defined('MAIN_ANTIVIRUS_COMMAND') && !defined('MAIN_ANTIVIRUS_BYPASS_COMMAND_AND_PARAM')) {
483 483
 		print ' - <span class="opacitymedium">'.$langs->trans("ValueIsForcedBySystem").'</span>';
484 484
 	}
@@ -489,11 +489,11 @@  discard block
 block discarded – undo
489 489
 $umask = getDolGlobalString('MAIN_UMASK');
490 490
 
491 491
 print '<strong>'.$langs->trans("UMask").'</strong>: ';
492
-if (! in_array($umask, array('600', '660', '0600', '0660'))) {
492
+if (!in_array($umask, array('600', '660', '0600', '0660'))) {
493 493
 	print img_warning().' ';
494 494
 }
495 495
 print $umask;
496
-if (! in_array($umask, array('600', '660', '0600', '0660'))) {
496
+if (!in_array($umask, array('600', '660', '0600', '0660'))) {
497 497
 	print ' &nbsp; <span class="opacitymedium">('.$langs->trans("Recommended").': 0600 | 0660)</span>';
498 498
 }
499 499
 print '<br>';
@@ -702,7 +702,7 @@  discard block
 block discarded – undo
702 702
 $conf->global->MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES = 0;
703 703
 $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML = 1;
704 704
 $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY = 0;
705
-$result=dol_htmlwithnojs('<img onerror<=alert(document.domain)> src=>0xbeefed');
705
+$result = dol_htmlwithnojs('<img onerror<=alert(document.domain)> src=>0xbeefed');
706 706
 if ($result == 'InvalidHTMLStringCantBeCleaned') {
707 707
 	print ' &nbsp; - &nbsp; '.img_warning().' Your libxml seems to old to work correctly with this option. Disable it !';
708 708
 } else {
@@ -718,7 +718,7 @@  discard block
 block discarded – undo
718 718
 	$conf->global->MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES = 0;
719 719
 	$conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML = 0;
720 720
 	$conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY = 1;
721
-	$result=dol_htmlwithnojs('<img onerror<=alert(document.domain)> src=>0xbeefed');
721
+	$result = dol_htmlwithnojs('<img onerror<=alert(document.domain)> src=>0xbeefed');
722 722
 	if ($result == 'InvalidHTMLStringCantBeCleaned') {
723 723
 		print ' &nbsp; - &nbsp; '.img_warning().' Your libxml seems to old to work correctly with this option. Disable it !';
724 724
 	} else {
Please login to merge, or discard this patch.
htdocs/comm/propal/card.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -749,7 +749,7 @@  discard block
 block discarded – undo
749 749
 					$error++;
750 750
 				} else {
751 751
 					// Needed if object linked modified by trigger (because linked objects can't be fetched two times : linkedObjectsFullLoaded)
752
-					$locationTarget = DOL_URL_ROOT . '/comm/propal/card.php?id=' . $object->id;
752
+					$locationTarget = DOL_URL_ROOT.'/comm/propal/card.php?id='.$object->id;
753 753
 				}
754 754
 
755 755
 				$deposit = null;
@@ -760,7 +760,7 @@  discard block
 block discarded – undo
760 760
 					!$error && GETPOSTINT('statut') == $object::STATUS_SIGNED && GETPOSTINT('generate_deposit') == 'on'
761 761
 					&& !empty($deposit_percent_from_payment_terms) && isModEnabled('invoice') && $user->hasRight('facture', 'creer')
762 762
 				) {
763
-					require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
763
+					require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
764 764
 
765 765
 					$date = dol_mktime(0, 0, 0, GETPOSTINT('datefmonth'), GETPOSTINT('datefday'), GETPOSTINT('datefyear'));
766 766
 					$forceFields = array();
@@ -773,7 +773,7 @@  discard block
 block discarded – undo
773 773
 
774 774
 					if ($deposit) {
775 775
 						setEventMessage('DepositGenerated');
776
-						$locationTarget = DOL_URL_ROOT . '/compta/facture/card.php?id=' . $deposit->id;
776
+						$locationTarget = DOL_URL_ROOT.'/compta/facture/card.php?id='.$deposit->id;
777 777
 					} else {
778 778
 						$error++;
779 779
 						setEventMessages($object->error, $object->errors, 'errors');
@@ -801,7 +801,7 @@  discard block
 block discarded – undo
801 801
 					}
802 802
 
803 803
 					if ($locationTarget) {
804
-						header('Location: ' . $locationTarget);
804
+						header('Location: '.$locationTarget);
805 805
 						exit;
806 806
 					}
807 807
 				} else {
@@ -968,7 +968,7 @@  discard block
 block discarded – undo
968 968
 		$remise_percent = (GETPOST('remiseforalllines') ? GETPOST('remiseforalllines') : 0);
969 969
 		$remise_percent = str_replace('*', '', $remise_percent);
970 970
 		foreach ($object->lines as $line) {
971
-			$tvatx= $line->tva_tx;
971
+			$tvatx = $line->tva_tx;
972 972
 			if (!empty($line->vat_src_code)) {
973 973
 				$tvatx .= ' ('.$line->vat_src_code.')';
974 974
 			}
@@ -1156,8 +1156,8 @@  discard block
 block discarded – undo
1156 1156
 						if (count($prodcustprice->lines) > 0) {
1157 1157
 							$pu_ht = price($prodcustprice->lines[0]->price);
1158 1158
 							$pu_ttc = price($prodcustprice->lines[0]->price_ttc);
1159
-							$price_min =  price($prodcustprice->lines[0]->price_min);
1160
-							$price_min_ttc =  price($prodcustprice->lines[0]->price_min_ttc);
1159
+							$price_min = price($prodcustprice->lines[0]->price_min);
1160
+							$price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc);
1161 1161
 							$price_base_type = $prodcustprice->lines[0]->price_base_type;
1162 1162
 							/*$tva_tx = ($prodcustprice->lines[0]->default_vat_code ? $prodcustprice->lines[0]->tva_tx.' ('.$prodcustprice->lines[0]->default_vat_code.' )' : $prodcustprice->lines[0]->tva_tx);
1163 1163
 							if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) {
@@ -1900,7 +1900,7 @@  discard block
 block discarded – undo
1900 1900
 	print '<form name="addprop" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
1901 1901
 	print '<input type="hidden" name="token" value="'.newToken().'">';
1902 1902
 	print '<input type="hidden" name="action" value="add">';
1903
-	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
1903
+	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
1904 1904
 	print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
1905 1905
 	if ($origin != 'project' && $originid) {
1906 1906
 		print '<input type="hidden" name="origin" value="'.$origin.'">';
@@ -2290,7 +2290,7 @@  discard block
 block discarded – undo
2290 2290
 		if (!getDolGlobalString('PROPAL_SKIP_ACCEPT_REFUSE')) {
2291 2291
 			$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)));
2292 2292
 		}
2293
-		$formquestion[] = array('type' => 'text', 'name' => 'note_private', 'label' => $langs->trans("Note"), 'value' => '');				// Field to complete private note (not replace)
2293
+		$formquestion[] = array('type' => 'text', 'name' => 'note_private', 'label' => $langs->trans("Note"), 'value' => ''); // Field to complete private note (not replace)
2294 2294
 
2295 2295
 		if (getDolGlobalInt('PROPOSAL_SUGGEST_DOWN_PAYMENT_INVOICE_CREATION')) {
2296 2296
 			// This is a hidden option:
@@ -2300,7 +2300,7 @@  discard block
 block discarded – undo
2300 2300
 			$deposit_percent_from_payment_terms = getDictionaryValue('c_payment_term', 'deposit_percent', $object->cond_reglement_id);
2301 2301
 
2302 2302
 			if (!empty($deposit_percent_from_payment_terms) && isModEnabled('invoice') && $user->hasRight('facture', 'creer')) {
2303
-				require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
2303
+				require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
2304 2304
 
2305 2305
 				$object->fetchObjectLinked();
2306 2306
 
@@ -2382,7 +2382,7 @@  discard block
 block discarded – undo
2382 2382
 						'type' => 'onecolumn',
2383 2383
 						'value' => '
2384 2384
 							<script>
2385
-								let signedValue = ' . $object::STATUS_SIGNED . ';
2385
+								let signedValue = ' . $object::STATUS_SIGNED.';
2386 2386
 
2387 2387
 								$(document).ready(function() {
2388 2388
 									$("[name=generate_deposit]").change(function () {
@@ -2432,7 +2432,7 @@  discard block
 block discarded – undo
2432 2432
 		if (!getDolGlobalString('PROPAL_SKIP_ACCEPT_REFUSE')) {
2433 2433
 			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('SetAcceptedRefused'), '', 'confirm_closeas', $formquestion, '', 1, 250);
2434 2434
 		} else {
2435
-			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?statut=3&id=' . $object->id, $langs->trans('Close'), '', 'confirm_closeas', $formquestion, '', 1, 250);
2435
+			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?statut=3&id='.$object->id, $langs->trans('Close'), '', 'confirm_closeas', $formquestion, '', 1, 250);
2436 2436
 		}
2437 2437
 	} elseif ($action == 'cancel') {
2438 2438
 		// Confirm cancel
@@ -2474,7 +2474,7 @@  discard block
 block discarded – undo
2474 2474
 		$nbMandated = 0;
2475 2475
 		foreach ($object->lines as $line) {
2476 2476
 			$res = $line->fetch_product();
2477
-			if ($res  > 0) {
2477
+			if ($res > 0) {
2478 2478
 				if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) {
2479 2479
 					$nbMandated++;
2480 2480
 					break;
@@ -2510,7 +2510,7 @@  discard block
 block discarded – undo
2510 2510
 	$morehtmlref = '<div class="refidno">';
2511 2511
 	// Ref customer
2512 2512
 	$morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string', '', 0, 1);
2513
-	$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);
2513
+	$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);
2514 2514
 	// Thirdparty
2515 2515
 	$morehtmlref .= '<br><span class="hideonsmartphone">'.$langs->trans('ThirdParty').' : </span>'.$soc->getNomUrl(1, 'customer');
2516 2516
 	if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $soc->id > 0) {
@@ -2898,50 +2898,50 @@  discard block
 block discarded – undo
2898 2898
 		print '<table class="border tableforfield centpercent">';
2899 2899
 
2900 2900
 		print '<tr>';
2901
-		print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>';
2902
-		print '<td class="nowrap amountcard right">' . price($object->total_ht, 0, $langs, 1, -1, -1, $conf->currency) . '</td>';
2901
+		print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>';
2902
+		print '<td class="nowrap amountcard right">'.price($object->total_ht, 0, $langs, 1, -1, -1, $conf->currency).'</td>';
2903 2903
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2904
-			print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, 0, $langs, 1, -1, -1, $object->multicurrency_code) . '</td>';
2904
+			print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, 0, $langs, 1, -1, -1, $object->multicurrency_code).'</td>';
2905 2905
 		}
2906 2906
 		print '</tr>';
2907 2907
 
2908 2908
 		print '<tr>';
2909
-		print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>';
2910
-		print '<td class="nowrap amountcard right">' . price($object->total_tva, 0, $langs, 1, -1, -1, $conf->currency) . '</td>';
2909
+		print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>';
2910
+		print '<td class="nowrap amountcard right">'.price($object->total_tva, 0, $langs, 1, -1, -1, $conf->currency).'</td>';
2911 2911
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2912
-			print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, 0, $langs, 1, -1, -1, $object->multicurrency_code) . '</td>';
2912
+			print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, 0, $langs, 1, -1, -1, $object->multicurrency_code).'</td>';
2913 2913
 		}
2914 2914
 		print '</tr>';
2915 2915
 
2916 2916
 		if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) {
2917 2917
 			print '<tr>';
2918
-			print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
2919
-			print '<td class="nowrap amountcard right">' . price($object->total_localtax1, 0, $langs, 1, -1, -1, $conf->currency) . '</td>';
2918
+			print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>';
2919
+			print '<td class="nowrap amountcard right">'.price($object->total_localtax1, 0, $langs, 1, -1, -1, $conf->currency).'</td>';
2920 2920
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2921 2921
 				$object->multicurrency_total_localtax1 = price2num($object->total_localtax1 * $object->multicurrency_tx, 'MT');
2922 2922
 
2923
-				print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_localtax1, 0, $langs, 1, -1, -1, $object->multicurrency_code) . '</td>';
2923
+				print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_localtax1, 0, $langs, 1, -1, -1, $object->multicurrency_code).'</td>';
2924 2924
 			}
2925 2925
 			print '</tr>';
2926 2926
 		}
2927 2927
 
2928 2928
 		if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) {
2929 2929
 			print '<tr>';
2930
-			print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>';
2931
-			print '<td class="nowrap amountcard right">' . price($object->total_localtax2, 0, $langs, 1, -1, -1, $conf->currency) . '</td>';
2930
+			print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>';
2931
+			print '<td class="nowrap amountcard right">'.price($object->total_localtax2, 0, $langs, 1, -1, -1, $conf->currency).'</td>';
2932 2932
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2933 2933
 				$object->multicurrency_total_localtax2 = price2num($object->total_localtax2 * $object->multicurrency_tx, 'MT');
2934 2934
 
2935
-				print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_localtax2, 0, $langs, 1, -1, -1, $object->multicurrency_code) . '</td>';
2935
+				print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_localtax2, 0, $langs, 1, -1, -1, $object->multicurrency_code).'</td>';
2936 2936
 			}
2937 2937
 			print '</tr>';
2938 2938
 		}
2939 2939
 
2940 2940
 		print '<tr>';
2941
-		print '<td>' . $langs->trans('AmountTTC') . '</td>';
2942
-		print '<td class="nowrap amountcard right">' . price($object->total_ttc, 0, $langs, 1, -1, -1, $conf->currency) . '</td>';
2941
+		print '<td>'.$langs->trans('AmountTTC').'</td>';
2942
+		print '<td class="nowrap amountcard right">'.price($object->total_ttc, 0, $langs, 1, -1, -1, $conf->currency).'</td>';
2943 2943
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2944
-			print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ttc, 0, $langs, 1, -1, -1, $object->multicurrency_code) . '</td>';
2944
+			print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ttc, 0, $langs, 1, -1, -1, $object->multicurrency_code).'</td>';
2945 2945
 		}
2946 2946
 		print '</tr>';
2947 2947
 
@@ -3138,8 +3138,8 @@  discard block
 block discarded – undo
3138 3138
 				} else {
3139 3139
 					// Set not signed (close)
3140 3140
 					if ($object->statut == Propal::STATUS_DRAFT && $usercanclose) {
3141
-						print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&token='.newToken().'&action=closeas&token='.newToken() . (!getDolGlobalString('MAIN_JUMP_TAG') ? '' : '#close') . '"';
3142
-						print '>' . $langs->trans('SetRefusedAndClose') . '</a>';
3141
+						print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&token='.newToken().'&action=closeas&token='.newToken().(!getDolGlobalString('MAIN_JUMP_TAG') ? '' : '#close').'"';
3142
+						print '>'.$langs->trans('SetRefusedAndClose').'</a>';
3143 3143
 					}
3144 3144
 				}
3145 3145
 
Please login to merge, or discard this patch.
htdocs/product/stock/stockatdate.php 1 patch
Spacing   +20 added lines, -22 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 $type = GETPOSTINT('type');
55 55
 $mode = GETPOST('mode', 'alpha');
56 56
 
57
-$ext=(GETPOSTISSET('output') && in_array(GETPOST('output'), array('csv'))) ? GETPOST('output') : '';
57
+$ext = (GETPOSTISSET('output') && in_array(GETPOST('output'), array('csv'))) ? GETPOST('output') : '';
58 58
 
59 59
 $date = '';
60 60
 $dateendofday = '';
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 	if ($productid > 0) {
157 157
 		$sql .= " AND ps.fk_product = ".((int) $productid);
158 158
 	}
159
-	if (! empty($search_fk_warehouse)) {
159
+	if (!empty($search_fk_warehouse)) {
160 160
 		$sql .= " AND ps.fk_entrepot IN (".$db->sanitize(implode(",", $search_fk_warehouse)).")";
161 161
 	}
162 162
 	if ($search_ref) {
@@ -247,8 +247,8 @@  discard block
 block discarded – undo
247 247
 			$movements_prod_warehouse_nb[$fk_product][$fk_entrepot] = $nbofmovement;
248 248
 
249 249
 			// Pour llx_product.stock
250
-			$movements_prod[$fk_product] = $stock + (array_key_exists($fk_product, $movements_prod)?$movements_prod[$fk_product]:0);
251
-			$movements_prod_nb[$fk_product] = $nbofmovement + (array_key_exists($fk_product, $movements_prod_nb)?$movements_prod_nb[$fk_product]:0);
250
+			$movements_prod[$fk_product] = $stock + (array_key_exists($fk_product, $movements_prod) ? $movements_prod[$fk_product] : 0);
251
+			$movements_prod_nb[$fk_product] = $nbofmovement + (array_key_exists($fk_product, $movements_prod_nb) ? $movements_prod_nb[$fk_product] : 0);
252 252
 
253 253
 			$i++;
254 254
 		}
@@ -368,12 +368,11 @@  discard block
 block discarded – undo
368 368
 if ($ext == 'csv') {
369 369
 	top_httphead("text/csv");
370 370
 	//header("Content-Type: text/csv");
371
-	header("Content-Disposition: attachment; filename=stock".($date?'-'.date("Y-m-d", $date):'').".csv");
371
+	header("Content-Disposition: attachment; filename=stock".($date ? '-'.date("Y-m-d", $date) : '').".csv");
372 372
 
373 373
 	// Lines of title
374 374
 	print implode(";", ($mode == 'future') ?
375
-		array('"Product Reference"', '"Label"', '"Current Stock"', '"'.$stocklabel.'"', '"Virtual Stock"'):
376
-		array('"Product Reference"', '"Label"', '"'.$stocklabel.'"', '"Estimated Stock Value"', '"Estimate Sell Value"', '"Movements"', '"Current Stock"'))."\r\n";
375
+		array('"Product Reference"', '"Label"', '"Current Stock"', '"'.$stocklabel.'"', '"Virtual Stock"') : array('"Product Reference"', '"Label"', '"'.$stocklabel.'"', '"Estimated Stock Value"', '"Estimate Sell Value"', '"Movements"', '"Current Stock"'))."\r\n";
377 376
 } else {
378 377
 	llxHeader('', $title, $helpurl, '');
379 378
 
@@ -470,13 +469,13 @@  discard block
 block discarded – undo
470 469
 	if ($num) {
471 470
 		print '<p>';
472 471
 		print '<a href="stockatdate.php?output=csv&sortfield='.urlencode($sortfield).'&sortorder='.urlencode($sortorder).'&type='.((int) $type).'&mode='.urlencode($mode).
473
-			(($productid > 0)?"&productid=".((int) $productid):'').
472
+			(($productid > 0) ? "&productid=".((int) $productid) : '').
474 473
 			$param_warehouse.
475 474
 			"&search_ref=".dol_escape_htmltag($search_ref).
476 475
 			"&search_nom=".dol_escape_htmltag($search_nom).
477
-			(GETPOSTISSET('dateday')?"&dateday=".GETPOSTINT('dateday'):'').
478
-			(GETPOSTISSET('datemonth')?"&datemonth=".GETPOSTINT('datemonth'):'').
479
-			(GETPOSTISSET('dateyear')?"&dateyear=".GETPOSTINT('dateyear'):'').
476
+			(GETPOSTISSET('dateday') ? "&dateday=".GETPOSTINT('dateday') : '').
477
+			(GETPOSTISSET('datemonth') ? "&datemonth=".GETPOSTINT('datemonth') : '').
478
+			(GETPOSTISSET('dateyear') ? "&dateyear=".GETPOSTINT('dateyear') : '').
480 479
 			'" title="Download CSV" />';
481 480
 		print img_picto('', 'download', 'class="pictofixedwidth"');
482 481
 		print 'Download CSV';
@@ -603,9 +602,9 @@  discard block
 block discarded – undo
603 602
 
604 603
 		if ($mode == 'future') {
605 604
 			$prod->load_stock('warehouseopen,warehouseinternal,nobatch', 0, $dateendofday);
606
-			$stock = $prod->stock_theorique;		// virtual stock at a date
605
+			$stock = $prod->stock_theorique; // virtual stock at a date
607 606
 			$prod->load_stock('warehouseopen,warehouseinternal,nobatch', 0);
608
-			$virtualstock = $prod->stock_theorique;	// virtual stock in infinite future
607
+			$virtualstock = $prod->stock_theorique; // virtual stock in infinite future
609 608
 		} else {
610 609
 			$stock = $currentstock;
611 610
 			$nbofmovement = 0;
@@ -635,8 +634,8 @@  discard block
 block discarded – undo
635 634
 					'"'.$objp->ref.'"',
636 635
 					'"'.$objp->label.'"',
637 636
 					'"'.price(price2num($stock, 'MS')).'"',
638
-					price2num($stock * $objp->pmp, 'MT')?'"'.price2num($stock * $objp->pmp, 'MT').'"':'',
639
-					!getDolGlobalString('PRODUIT_MULTIPRICES')?'"'.price2num($stock * $objp->price, 'MT').'"':'"'.$langs->trans("Variable").'('.$langs->trans("OptionMULTIPRICESIsOn").')"',
637
+					price2num($stock * $objp->pmp, 'MT') ? '"'.price2num($stock * $objp->pmp, 'MT').'"' : '',
638
+					!getDolGlobalString('PRODUIT_MULTIPRICES') ? '"'.price2num($stock * $objp->price, 'MT').'"' : '"'.$langs->trans("Variable").'('.$langs->trans("OptionMULTIPRICESIsOn").')"',
640 639
 					"$nbofmovement",
641 640
 					'"'.price2num($currentstock, 'MS').'"'))."\r\n";
642 641
 				$totalbuyingprice += $stock * $objp->pmp;
@@ -711,7 +710,7 @@  discard block
 block discarded – undo
711 710
 						$url .= '&search_date_startyear='.GETPOSTINT('dateyear');
712 711
 					}
713 712
 					if (count($search_fk_warehouse) > 1) {
714
-						$url = '';	// Do not show link, multi warehouse as filter not managed yet by target page
713
+						$url = ''; // Do not show link, multi warehouse as filter not managed yet by target page
715 714
 					} else {
716 715
 						foreach ($search_fk_warehouse as $val) {
717 716
 							$url .= ($val > 0 ? '&search_warehouse='.((int) $val) : '');
@@ -749,7 +748,7 @@  discard block
 block discarded – undo
749 748
 
750 749
 $parameters = array('sql'=>$sql);
751 750
 $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook
752
-if ($ext!='csv') {
751
+if ($ext != 'csv') {
753 752
 	print $hookmanager->resPrint;
754 753
 }
755 754
 
@@ -758,20 +757,19 @@  discard block
 block discarded – undo
758 757
 	$colspan++;
759 758
 }
760 759
 
761
-if ($ext=='csv') {
760
+if ($ext == 'csv') {
762 761
 	print implode(";",
763
-		($mode == 'future')?array(
762
+		($mode == 'future') ? array(
764 763
 		'"'.$langs->trans("Totalforthispage").'"',
765 764
 		'',
766 765
 		$productid > 0 ? price2num($totalcurrentstock, 'MS') : '',
767 766
 		'',
768
-		price(price2num($totalvirtualstock, 'MS'))):
769
-		array(
767
+		price(price2num($totalvirtualstock, 'MS'))) : array(
770 768
 		'"'.$langs->trans("Totalforthispage").'"',
771 769
 		'',
772 770
 		'',
773 771
 		'"'.price2num($totalbuyingprice, 'MT').'"',
774
-		!getDolGlobalString('PRODUIT_MULTIPRICES')?'"'.price2num($totalsellingprice, 'MT').'"':'',
772
+		!getDolGlobalString('PRODUIT_MULTIPRICES') ? '"'.price2num($totalsellingprice, 'MT').'"' : '',
775 773
 		'',
776 774
 		$productid > 0 ? price2num($totalcurrentstock, 'MS') : ''));
777 775
 } else {
Please login to merge, or discard this patch.
htdocs/core/lib/json.lib.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -298,7 +298,7 @@
 block discarded – undo
298 298
 		try {
299 299
 			// @phan-suppress-next-line PhanPluginUnsafeEval
300 300
 			//print  debug_print_backtrace();
301
-			eval('$array = '.$out.';');		// not secured but this is no mode used as php json lib is always expected to be loaded now.
301
+			eval('$array = '.$out.';'); // not secured but this is no mode used as php json lib is always expected to be loaded now.
302 302
 		} catch (Exception $e) {
303 303
 			$array = array();
304 304
 		}
Please login to merge, or discard this patch.
htdocs/core/lib/xcal.lib.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 					// the default behaviour but there is no way to change keeping old saved date compatible.
210 210
 					$tzforfullday = getDolGlobalString('MAIN_STORE_FULL_EVENT_IN_GMT');
211 211
 					// Local time should be used to prevent users in time zones earlier than GMT from being one day earlier
212
-					$prefix     = ";VALUE=DATE";
212
+					$prefix = ";VALUE=DATE";
213 213
 					if ($tzforfullday) {
214 214
 						$startdatef = dol_print_date($startdate, "dayxcard", 'gmt');
215 215
 					} else {
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 				$enddatef = dol_print_date($enddate, "dayhourxcard", 'gmt');
238 238
 
239 239
 				if ($fulldayevent) {
240
-					$prefix   = ";VALUE=DATE";
240
+					$prefix = ";VALUE=DATE";
241 241
 					// We add 1 second so we reach the +1 day needed for full day event (DTEND must be next day after event)
242 242
 					// This is mention in https://datatracker.ietf.org/doc/html/rfc5545:
243 243
 					// "The "DTEND" property for a "VEVENT" calendar component specifies the non-inclusive end of the event."
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
 				$startdate	  = $event["startdate"];
408 408
 				$summary  	  = $event["summary"];
409 409
 				$description  = $event["desc"];
410
-				$url		  = empty($event["url"]) ? '' : $event["url"];
410
+				$url = empty($event["url"]) ? '' : $event["url"];
411 411
 				$author       = $event["author"];
412 412
 				$category     = empty($event["category"]) ? null : $event["category"];
413 413
 				$image        = '';
Please login to merge, or discard this patch.
htdocs/core/class/dolgraph.class.php 1 patch
Spacing   +123 added lines, -123 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 		}
122 122
 
123 123
 		// Load color of the theme
124
-		$color_file = DOL_DOCUMENT_ROOT . '/theme/' . $conf->theme . '/theme_vars.inc.php';
124
+		$color_file = DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
125 125
 		if (is_readable($color_file)) {
126 126
 			include $color_file;
127 127
 			if (isset($theme_bordercolor)) {
@@ -636,7 +636,7 @@  discard block
 block discarded – undo
636 636
 		foreach ($this->data as $x) {	// Loop on each x
637 637
 			for ($i = 0; $i < $nbseries; $i++) {	// Loop on each series
638 638
 				if (is_null($max)) {
639
-					$max = $x[$i + 1];		// $i+1 because the index 0 is the legend
639
+					$max = $x[$i + 1]; // $i+1 because the index 0 is the legend
640 640
 				} elseif ($max < $x[$i + 1]) {
641 641
 					$max = $x[$i + 1];
642 642
 				}
@@ -666,7 +666,7 @@  discard block
 block discarded – undo
666 666
 		foreach ($this->data as $x) {	// Loop on each x
667 667
 			for ($i = 0; $i < $nbseries; $i++) {	// Loop on each series
668 668
 				if (is_null($min)) {
669
-					$min = $x[$i + 1];		// $i+1 because the index 0 is the legend
669
+					$min = $x[$i + 1]; // $i+1 because the index 0 is the legend
670 670
 				} elseif ($min > $x[$i + 1]) {
671 671
 					$min = $x[$i + 1];
672 672
 				}
@@ -743,19 +743,19 @@  discard block
 block discarded – undo
743 743
 	{
744 744
 		if (empty($file)) {
745 745
 			$this->error = "Call to draw method was made with empty value for parameter file.";
746
-			dol_syslog(get_class($this) . "::draw " . $this->error, LOG_ERR);
746
+			dol_syslog(get_class($this)."::draw ".$this->error, LOG_ERR);
747 747
 			return -2;
748 748
 		}
749 749
 		if (!is_array($this->data)) {
750 750
 			$this->error = "Call to draw method was made but SetData was not called or called with an empty dataset for parameters";
751
-			dol_syslog(get_class($this) . "::draw " . $this->error, LOG_ERR);
751
+			dol_syslog(get_class($this)."::draw ".$this->error, LOG_ERR);
752 752
 			return -1;
753 753
 		}
754 754
 		if (count($this->data) < 1) {
755 755
 			$this->error = "Call to draw method was made but SetData was is an empty dataset";
756
-			dol_syslog(get_class($this) . "::draw " . $this->error, LOG_WARNING);
756
+			dol_syslog(get_class($this)."::draw ".$this->error, LOG_WARNING);
757 757
 		}
758
-		$call = "draw_" . $this->_library;	// Example "draw_jflot"
758
+		$call = "draw_".$this->_library; // Example "draw_jflot"
759 759
 
760 760
 		return call_user_func_array(array($this, $call), array($file, $fileurl));
761 761
 	}
@@ -782,7 +782,7 @@  discard block
 block discarded – undo
782 782
 		// phpcs:enable
783 783
 		global $langs;
784 784
 
785
-		dol_syslog(get_class($this) . "::draw_jflot this->type=" . implode(',', $this->type) . " this->MaxValue=" . $this->MaxValue);
785
+		dol_syslog(get_class($this)."::draw_jflot this->type=".implode(',', $this->type)." this->MaxValue=".$this->MaxValue);
786 786
 
787 787
 		if (empty($this->width) && empty($this->height)) {
788 788
 			print 'Error width or height not set';
@@ -805,7 +805,7 @@  discard block
 block discarded – undo
805 805
 		$series = array();
806 806
 		while ($i < $nblot) {	// Loop on each series
807 807
 			$values = array(); // Array with horizontal y values (specific values of a series) for each abscisse x
808
-			$series[$i] = "var d" . $i . " = [];\n";
808
+			$series[$i] = "var d".$i." = [];\n";
809 809
 
810 810
 			// Fill array $values
811 811
 			$x = 0;
@@ -818,13 +818,13 @@  discard block
 block discarded – undo
818 818
 			if (isset($this->type[$firstlot]) && in_array($this->type[$firstlot], array('pie', 'piesemicircle', 'polar'))) {
819 819
 				foreach ($values as $x => $y) {
820 820
 					if (isset($y)) {
821
-						$series[$i] .= 'd' . $i . '.push({"label":"' . dol_escape_js($legends[$x]) . '", "data":' . $y . '});' . "\n";
821
+						$series[$i] .= 'd'.$i.'.push({"label":"'.dol_escape_js($legends[$x]).'", "data":'.$y.'});'."\n";
822 822
 					}
823 823
 				}
824 824
 			} else {
825 825
 				foreach ($values as $x => $y) {
826 826
 					if (isset($y)) {
827
-						$series[$i] .= 'd' . $i . '.push([' . $x . ', ' . $y . ']);' . "\n";
827
+						$series[$i] .= 'd'.$i.'.push(['.$x.', '.$y.']);'."\n";
828 828
 					}
829 829
 				}
830 830
 			}
@@ -834,13 +834,13 @@  discard block
 block discarded – undo
834 834
 		}
835 835
 		$tag = dol_escape_htmltag(dol_string_unaccent(dol_string_nospecial(basename($file), '_', array('-', '.'))));
836 836
 
837
-		$this->stringtoshow = '<!-- Build using jflot -->' . "\n";
837
+		$this->stringtoshow = '<!-- Build using jflot -->'."\n";
838 838
 		if (!empty($this->title)) {
839
-			$this->stringtoshow .= '<div class="center dolgraphtitle' . (empty($this->cssprefix) ? '' : ' dolgraphtitle' . $this->cssprefix) . '">' . $this->title . '</div>';
839
+			$this->stringtoshow .= '<div class="center dolgraphtitle'.(empty($this->cssprefix) ? '' : ' dolgraphtitle'.$this->cssprefix).'">'.$this->title.'</div>';
840 840
 		}
841 841
 		if (!empty($this->shownographyet)) {
842
-			$this->stringtoshow .= '<div style="width:' . $this->width . 'px;height:' . $this->height . 'px;" class="nographyet"></div>';
843
-			$this->stringtoshow .= '<div class="nographyettext margintoponly">' . $langs->trans("NotEnoughDataYet") . '...</div>';
842
+			$this->stringtoshow .= '<div style="width:'.$this->width.'px;height:'.$this->height.'px;" class="nographyet"></div>';
843
+			$this->stringtoshow .= '<div class="nographyettext margintoponly">'.$langs->trans("NotEnoughDataYet").'...</div>';
844 844
 			return;
845 845
 		}
846 846
 
@@ -849,17 +849,17 @@  discard block
 block discarded – undo
849 849
 		if (count($this->data) > 20) {
850 850
 			$dolxaxisvertical = 'dol-xaxis-vertical';
851 851
 		}
852
-		$this->stringtoshow .= '<div id="placeholder_' . $tag . '" style="width:' . $this->width . 'px;height:' . $this->height . 'px;" class="dolgraph' . (empty($dolxaxisvertical) ? '' : ' ' . $dolxaxisvertical) . (empty($this->cssprefix) ? '' : ' dolgraph' . $this->cssprefix) . ' center"></div>' . "\n";
852
+		$this->stringtoshow .= '<div id="placeholder_'.$tag.'" style="width:'.$this->width.'px;height:'.$this->height.'px;" class="dolgraph'.(empty($dolxaxisvertical) ? '' : ' '.$dolxaxisvertical).(empty($this->cssprefix) ? '' : ' dolgraph'.$this->cssprefix).' center"></div>'."\n";
853 853
 
854
-		$this->stringtoshow .= '<script nonce="'.getNonce().'" id="' . $tag . '">' . "\n";
855
-		$this->stringtoshow .= '$(function () {' . "\n";
854
+		$this->stringtoshow .= '<script nonce="'.getNonce().'" id="'.$tag.'">'."\n";
855
+		$this->stringtoshow .= '$(function () {'."\n";
856 856
 		$i = $firstlot;
857 857
 		if ($nblot < 0) {
858
-			$this->stringtoshow .= '<!-- No series of data -->' . "\n";
858
+			$this->stringtoshow .= '<!-- No series of data -->'."\n";
859 859
 		} else {
860 860
 			while ($i < $nblot) {
861
-				$this->stringtoshow .= '<!-- Series ' . $i . ' -->' . "\n";
862
-				$this->stringtoshow .= $series[$i] . "\n";
861
+				$this->stringtoshow .= '<!-- Series '.$i.' -->'."\n";
862
+				$this->stringtoshow .= $series[$i]."\n";
863 863
 				$i++;
864 864
 			}
865 865
 		}
@@ -870,9 +870,9 @@  discard block
 block discarded – undo
870 870
 			$datacolor = array();
871 871
 			foreach ($this->datacolor as $val) {
872 872
 				if (is_array($val)) {
873
-					$datacolor[] = "#" . sprintf("%02x%02x%02x", $val[0], $val[1], $val[2]); // If datacolor is array(R, G, B)
873
+					$datacolor[] = "#".sprintf("%02x%02x%02x", $val[0], $val[1], $val[2]); // If datacolor is array(R, G, B)
874 874
 				} else {
875
-					$datacolor[] = "#" . str_replace(array('#', '-'), '', $val); // If $val is '124' or '#124'
875
+					$datacolor[] = "#".str_replace(array('#', '-'), '', $val); // If $val is '124' or '#124'
876 876
 				}
877 877
 			}
878 878
 
@@ -882,8 +882,8 @@  discard block
 block discarded – undo
882 882
 			$showpercent = $this->showpercent;
883 883
 
884 884
 			$this->stringtoshow .= '
885
-			function plotWithOptions_' . $tag . '() {
886
-			$.plot($("#placeholder_' . $tag . '"), d0,
885
+			function plotWithOptions_' . $tag.'() {
886
+			$.plot($("#placeholder_' . $tag.'"), d0,
887 887
 			{
888 888
 				series: {
889 889
 					pie: {
@@ -891,8 +891,8 @@  discard block
 block discarded – undo
891 891
 						radius: 0.8,
892 892
 						' . ($this->combine ? '
893 893
 						combine: {
894
-						 	threshold: ' . $this->combine . '
895
-						},' : '') . '
894
+						 	threshold: ' . $this->combine.'
895
+						},' : '').'
896 896
 						label: {
897 897
 							show: true,
898 898
 							radius: 0.9,
@@ -902,7 +902,7 @@  discard block
 block discarded – undo
902 902
 								return \'';
903 903
 			$this->stringtoshow .= '<span style="font-size:8pt;text-align:center;padding:2px;color:black;">';
904 904
 			if ($urltemp) {
905
-				$this->stringtoshow .= '<a style="color: #FFFFFF;" border="0" href="' . $urltemp . '">';
905
+				$this->stringtoshow .= '<a style="color: #FFFFFF;" border="0" href="'.$urltemp.'">';
906 906
 			}
907 907
 			$this->stringtoshow .= '\'+';
908 908
 			$this->stringtoshow .= ($showlegend ? '' : 'label+\' \'+'); // Hide label if already shown in legend
@@ -928,9 +928,9 @@  discard block
 block discarded – undo
928 928
 				interactive: true
929 929
 			},';
930 930
 			if (count($datacolor)) {
931
-				$this->stringtoshow .= 'colors: ' . json_encode($datacolor) . ',';
931
+				$this->stringtoshow .= 'colors: '.json_encode($datacolor).',';
932 932
 			}
933
-			$this->stringtoshow .= 'legend: {show: ' . ($showlegend ? 'true' : 'false') . ', position: \'ne\' }
933
+			$this->stringtoshow .= 'legend: {show: '.($showlegend ? 'true' : 'false').', position: \'ne\' }
934 934
 		});
935 935
 		}' . "\n";
936 936
 		} else {
@@ -938,8 +938,8 @@  discard block
 block discarded – undo
938 938
 			// Add code to support tooltips
939 939
 			// TODO: remove js css and use graph-tooltip-inner class instead by adding css in each themes
940 940
 			$this->stringtoshow .= '
941
-			function showTooltip_' . $tag . '(x, y, contents) {
942
-				$(\'<div class="graph-tooltip-inner" id="tooltip_' . $tag . '">\' + contents + \'</div>\').css({
941
+			function showTooltip_' . $tag.'(x, y, contents) {
942
+				$(\'<div class="graph-tooltip-inner" id="tooltip_' . $tag.'">\' + contents + \'</div>\').css({
943 943
 					position: \'absolute\',
944 944
 					display: \'none\',
945 945
 					top: y + 10,
@@ -955,7 +955,7 @@  discard block
 block discarded – undo
955 955
 			}
956 956
 
957 957
 			var previousPoint = null;
958
-			$("#placeholder_' . $tag . '").bind("plothover", function (event, pos, item) {
958
+			$("#placeholder_' . $tag.'").bind("plothover", function (event, pos, item) {
959 959
 				$("#x").text(pos.x.toFixed(2));
960 960
 				$("#y").text(pos.y.toFixed(2));
961 961
 
@@ -971,27 +971,27 @@  discard block
 block discarded – undo
971 971
 						';
972 972
 			if ($this->showpointvalue > 0) {
973 973
 				$this->stringtoshow .= '
974
-							showTooltip_' . $tag . '(item.pageX, item.pageY, item.series.label + "<br>" + z + " => " + y);
974
+							showTooltip_' . $tag.'(item.pageX, item.pageY, item.series.label + "<br>" + z + " => " + y);
975 975
 						';
976 976
 			}
977 977
 			$this->stringtoshow .= '
978 978
 					}
979 979
 				}
980 980
 				else {
981
-					$("#tooltip_' . $tag . '").remove();
981
+					$("#tooltip_' . $tag.'").remove();
982 982
 					previousPoint = null;
983 983
 				}
984 984
 			});
985 985
 			';
986 986
 
987
-			$this->stringtoshow .= 'var stack = null, steps = false;' . "\n";
987
+			$this->stringtoshow .= 'var stack = null, steps = false;'."\n";
988 988
 
989
-			$this->stringtoshow .= 'function plotWithOptions_' . $tag . '() {' . "\n";
990
-			$this->stringtoshow .= '$.plot($("#placeholder_' . $tag . '"), [ ' . "\n";
989
+			$this->stringtoshow .= 'function plotWithOptions_'.$tag.'() {'."\n";
990
+			$this->stringtoshow .= '$.plot($("#placeholder_'.$tag.'"), [ '."\n";
991 991
 			$i = $firstlot;
992 992
 			while ($i < $nblot) {
993 993
 				if ($i > $firstlot) {
994
-					$this->stringtoshow .= ', ' . "\n";
994
+					$this->stringtoshow .= ', '."\n";
995 995
 				}
996 996
 				$color = sprintf("%02x%02x%02x", $this->datacolor[$i][0], $this->datacolor[$i][1], $this->datacolor[$i][2]);
997 997
 				$this->stringtoshow .= '{ ';
@@ -1004,46 +1004,46 @@  discard block
 block discarded – undo
1004 1004
 						} else {
1005 1005
 							$align = 'left';
1006 1006
 						}
1007
-						$this->stringtoshow .= 'bars: { lineWidth: 1, show: true, align: "' . $align . '", barWidth: 0.45 }, ';
1007
+						$this->stringtoshow .= 'bars: { lineWidth: 1, show: true, align: "'.$align.'", barWidth: 0.45 }, ';
1008 1008
 					} else {
1009
-						$this->stringtoshow .= 'bars: { lineWidth: 1, show: true, align: "' . ($i == $firstlot ? 'center' : 'left') . '", barWidth: 0.5 }, ';
1009
+						$this->stringtoshow .= 'bars: { lineWidth: 1, show: true, align: "'.($i == $firstlot ? 'center' : 'left').'", barWidth: 0.5 }, ';
1010 1010
 					}
1011 1011
 				}
1012 1012
 				if (isset($this->type[$i]) && ($this->type[$i] == 'lines' || $this->type[$i] == 'linesnopoint')) {
1013
-					$this->stringtoshow .= 'lines: { show: true, fill: false }, points: { show: ' . ($this->type[$i] == 'linesnopoint' ? 'false' : 'true') . ' }, ';
1013
+					$this->stringtoshow .= 'lines: { show: true, fill: false }, points: { show: '.($this->type[$i] == 'linesnopoint' ? 'false' : 'true').' }, ';
1014 1014
 				}
1015
-				$this->stringtoshow .= 'color: "#' . $color . '", label: "' . (isset($this->Legend[$i]) ? dol_escape_js($this->Legend[$i]) : '') . '", data: d' . $i . ' }';
1015
+				$this->stringtoshow .= 'color: "#'.$color.'", label: "'.(isset($this->Legend[$i]) ? dol_escape_js($this->Legend[$i]) : '').'", data: d'.$i.' }';
1016 1016
 				$i++;
1017 1017
 			}
1018 1018
 			// shadowSize: 0 -> Drawing is faster without shadows
1019
-			$this->stringtoshow .= "\n" . ' ], { series: { shadowSize: 0, stack: stack, lines: { fill: false, steps: steps }, bars: { barWidth: 0.6,  fillColor: { colors: [{opacity: 0.9 }, {opacity: 0.85}] }} }' . "\n";
1019
+			$this->stringtoshow .= "\n".' ], { series: { shadowSize: 0, stack: stack, lines: { fill: false, steps: steps }, bars: { barWidth: 0.6,  fillColor: { colors: [{opacity: 0.9 }, {opacity: 0.85}] }} }'."\n";
1020 1020
 
1021 1021
 			// Xaxis
1022
-			$this->stringtoshow .= ', xaxis: { ticks: [' . "\n";
1022
+			$this->stringtoshow .= ', xaxis: { ticks: ['."\n";
1023 1023
 			$x = 0;
1024 1024
 			foreach ($this->data as $key => $valarray) {
1025 1025
 				if ($x > 0) {
1026
-					$this->stringtoshow .= ', ' . "\n";
1026
+					$this->stringtoshow .= ', '."\n";
1027 1027
 				}
1028
-				$this->stringtoshow .= ' [' . $x . ', "' . $valarray[0] . '"]';
1028
+				$this->stringtoshow .= ' ['.$x.', "'.$valarray[0].'"]';
1029 1029
 				$x++;
1030 1030
 			}
1031
-			$this->stringtoshow .= '] }' . "\n";
1031
+			$this->stringtoshow .= '] }'."\n";
1032 1032
 
1033 1033
 			// Yaxis
1034
-			$this->stringtoshow .= ', yaxis: { min: ' . $this->MinValue . ', max: ' . ($this->MaxValue) . ' }' . "\n";
1034
+			$this->stringtoshow .= ', yaxis: { min: '.$this->MinValue.', max: '.($this->MaxValue).' }'."\n";
1035 1035
 
1036 1036
 			// Background color
1037 1037
 			$color1 = sprintf("%02x%02x%02x", $this->bgcolorgrid[0], $this->bgcolorgrid[0], $this->bgcolorgrid[2]);
1038 1038
 			$color2 = sprintf("%02x%02x%02x", $this->bgcolorgrid[0], $this->bgcolorgrid[1], $this->bgcolorgrid[2]);
1039
-			$this->stringtoshow .= ', grid: { hoverable: true, backgroundColor: { colors: ["#' . $color1 . '", "#' . $color2 . '"] }, borderWidth: 1, borderColor: \'#e6e6e6\', tickColor  : \'#e6e6e6\' }' . "\n";
1040
-			$this->stringtoshow .= '});' . "\n";
1041
-			$this->stringtoshow .= '}' . "\n";
1039
+			$this->stringtoshow .= ', grid: { hoverable: true, backgroundColor: { colors: ["#'.$color1.'", "#'.$color2.'"] }, borderWidth: 1, borderColor: \'#e6e6e6\', tickColor  : \'#e6e6e6\' }'."\n";
1040
+			$this->stringtoshow .= '});'."\n";
1041
+			$this->stringtoshow .= '}'."\n";
1042 1042
 		}
1043 1043
 
1044
-		$this->stringtoshow .= 'plotWithOptions_' . $tag . '();' . "\n";
1045
-		$this->stringtoshow .= '});' . "\n";
1046
-		$this->stringtoshow .= '</script>' . "\n";
1044
+		$this->stringtoshow .= 'plotWithOptions_'.$tag.'();'."\n";
1045
+		$this->stringtoshow .= '});'."\n";
1046
+		$this->stringtoshow .= '</script>'."\n";
1047 1047
 	}
1048 1048
 
1049 1049
 
@@ -1069,7 +1069,7 @@  discard block
 block discarded – undo
1069 1069
 		// phpcs:enable
1070 1070
 		global $langs;
1071 1071
 
1072
-		dol_syslog(get_class($this) . "::draw_chart this->type=" . implode(',', $this->type) . " this->MaxValue=" . $this->MaxValue);
1072
+		dol_syslog(get_class($this)."::draw_chart this->type=".implode(',', $this->type)." this->MaxValue=".$this->MaxValue);
1073 1073
 
1074 1074
 		if (empty($this->width) && empty($this->height)) {
1075 1075
 			print 'Error width or height not set';
@@ -1111,15 +1111,15 @@  discard block
 block discarded – undo
1111 1111
 				$alabelexists = 1;
1112 1112
 				$tmpykey = explode('_', ($array_of_ykeys[$i + ($alabelexists ? 1 : 0)]), 3);
1113 1113
 				if (isset($tmpykey[2]) && (!empty($tmpykey[2]) || $tmpykey[2] == '0')) {		// This is a 'Group by' array
1114
-					$tmpvalue = (array_key_exists('y_' . $tmpykey[1] . '_' . $tmpykey[2], $valarray) ? $valarray['y_' . $tmpykey[1] . '_' . $tmpykey[2]] : $valarray[$i + 1]);
1114
+					$tmpvalue = (array_key_exists('y_'.$tmpykey[1].'_'.$tmpykey[2], $valarray) ? $valarray['y_'.$tmpykey[1].'_'.$tmpykey[2]] : $valarray[$i + 1]);
1115 1115
 					$values[$x] = (is_numeric($tmpvalue) ? $tmpvalue : null);
1116 1116
 					$arrayofgroupslegend[$i] = array(
1117 1117
 						'stacknum' => $tmpykey[1],
1118 1118
 						'legend' => $this->Legend[$tmpykey[1]],
1119
-						'legendwithgroup' => $this->Legend[$tmpykey[1]] . ' - ' . $tmpykey[2]
1119
+						'legendwithgroup' => $this->Legend[$tmpykey[1]].' - '.$tmpykey[2]
1120 1120
 					);
1121 1121
 				} else {
1122
-					$tmpvalue = (array_key_exists('y_' . $i, $valarray) ? $valarray['y_' . $i] : $valarray[$i + 1]);
1122
+					$tmpvalue = (array_key_exists('y_'.$i, $valarray) ? $valarray['y_'.$i] : $valarray[$i + 1]);
1123 1123
 					//var_dump($i.'_'.$x.'_'.$tmpvalue);
1124 1124
 					$values[$x] = (is_numeric($tmpvalue) ? $tmpvalue : null);
1125 1125
 				}
@@ -1129,9 +1129,9 @@  discard block
 block discarded – undo
1129 1129
 			$j = 0;
1130 1130
 			foreach ($values as $x => $y) {
1131 1131
 				if (isset($y)) {
1132
-					$series[$i] .= ($j > 0 ? ", " : "") . $y;
1132
+					$series[$i] .= ($j > 0 ? ", " : "").$y;
1133 1133
 				} else {
1134
-					$series[$i] .= ($j > 0 ? ", " : "") . 'null';
1134
+					$series[$i] .= ($j > 0 ? ", " : "").'null';
1135 1135
 				}
1136 1136
 				$j++;
1137 1137
 			}
@@ -1144,13 +1144,13 @@  discard block
 block discarded – undo
1144 1144
 
1145 1145
 		$tag = dol_escape_htmltag(dol_string_unaccent(dol_string_nospecial(basename($file), '_', array('-', '.'))));
1146 1146
 
1147
-		$this->stringtoshow = '<!-- Build using chart -->' . "\n";
1147
+		$this->stringtoshow = '<!-- Build using chart -->'."\n";
1148 1148
 		if (!empty($this->title)) {
1149
-			$this->stringtoshow .= '<div class="center dolgraphtitle' . (empty($this->cssprefix) ? '' : ' dolgraphtitle' . $this->cssprefix) . '">' . $this->title . '</div>';
1149
+			$this->stringtoshow .= '<div class="center dolgraphtitle'.(empty($this->cssprefix) ? '' : ' dolgraphtitle'.$this->cssprefix).'">'.$this->title.'</div>';
1150 1150
 		}
1151 1151
 		if (!empty($this->shownographyet)) {
1152
-			$this->stringtoshow .= '<div style="width:' . $this->width . (strpos($this->width, '%') > 0 ? '' : 'px') . '; height:' . $this->height . 'px;" class="nographyet"></div>';
1153
-			$this->stringtoshow .= '<div class="nographyettext margintoponly">' . $langs->trans("NotEnoughDataYet") . '...</div>';
1152
+			$this->stringtoshow .= '<div style="width:'.$this->width.(strpos($this->width, '%') > 0 ? '' : 'px').'; height:'.$this->height.'px;" class="nographyet"></div>';
1153
+			$this->stringtoshow .= '<div class="nographyettext margintoponly">'.$langs->trans("NotEnoughDataYet").'...</div>';
1154 1154
 			return;
1155 1155
 		}
1156 1156
 
@@ -1162,12 +1162,12 @@  discard block
 block discarded – undo
1162 1162
 		// No height for the pie graph
1163 1163
 		$cssfordiv = 'dolgraphchart';
1164 1164
 		if (isset($this->type[$firstlot])) {
1165
-			$cssfordiv .= ' dolgraphchar' . $this->type[$firstlot];
1165
+			$cssfordiv .= ' dolgraphchar'.$this->type[$firstlot];
1166 1166
 		}
1167
-		$this->stringtoshow .= '<div id="placeholder_'.$tag.'" style="min-height: '.$this->height.(strpos((string) $this->height, '%') > 0 ? '' : 'px').'; max-height: '.(strpos((string) $this->height, '%') > 0 ? $this->height : ((int) $this->height + 100) . 'px').'; width:'.$this->width.(strpos((string) $this->width, '%') > 0 ? '' : 'px').';" class="'.$cssfordiv.' dolgraph'.(empty($dolxaxisvertical) ? '' : ' '.$dolxaxisvertical).(empty($this->cssprefix) ? '' : ' dolgraph'.$this->cssprefix).' center">'."\n";
1167
+		$this->stringtoshow .= '<div id="placeholder_'.$tag.'" style="min-height: '.$this->height.(strpos((string) $this->height, '%') > 0 ? '' : 'px').'; max-height: '.(strpos((string) $this->height, '%') > 0 ? $this->height : ((int) $this->height + 100).'px').'; width:'.$this->width.(strpos((string) $this->width, '%') > 0 ? '' : 'px').';" class="'.$cssfordiv.' dolgraph'.(empty($dolxaxisvertical) ? '' : ' '.$dolxaxisvertical).(empty($this->cssprefix) ? '' : ' dolgraph'.$this->cssprefix).' center">'."\n";
1168 1168
 		$this->stringtoshow .= '<canvas id="canvas_'.$tag.'"></canvas></div>'."\n";
1169 1169
 
1170
-		$this->stringtoshow .= '<script nonce="'.getNonce().'" id="' . $tag . '">' . "\n";
1170
+		$this->stringtoshow .= '<script nonce="'.getNonce().'" id="'.$tag.'">'."\n";
1171 1171
 		$i = $firstlot;
1172 1172
 		if ($nblot < 0) {
1173 1173
 			$this->stringtoshow .= '<!-- No series of data -->';
@@ -1193,11 +1193,11 @@  discard block
 block discarded – undo
1193 1193
 			if (empty($showlegend)) {
1194 1194
 				$this->stringtoshow .= 'legend: { display: false }, ';
1195 1195
 			} else {
1196
-				$this->stringtoshow .= 'legend: { labels: { boxWidth: 15 }, position: \'' . ($showlegend == 2 ? 'right' : 'top') . '\'';
1196
+				$this->stringtoshow .= 'legend: { labels: { boxWidth: 15 }, position: \''.($showlegend == 2 ? 'right' : 'top').'\'';
1197 1197
 				if (!empty($legendMaxLines)) {
1198
-					$this->stringtoshow .= ', maxLines: ' . $legendMaxLines;
1198
+					$this->stringtoshow .= ', maxLines: '.$legendMaxLines;
1199 1199
 				}
1200
-				$this->stringtoshow .= ' }, ' . "\n";
1200
+				$this->stringtoshow .= ' }, '."\n";
1201 1201
 			}
1202 1202
 
1203 1203
 			/* For Chartjs v3.5 */
@@ -1205,73 +1205,73 @@  discard block
 block discarded – undo
1205 1205
 			if (empty($showlegend)) {
1206 1206
 				$this->stringtoshow .= 'legend: { display: false }, ';
1207 1207
 			} else {
1208
-				$this->stringtoshow .= 'legend: { labels: { boxWidth: 15 }, position: \'' . ($showlegend == 2 ? 'right' : 'top') . '\'';
1208
+				$this->stringtoshow .= 'legend: { labels: { boxWidth: 15 }, position: \''.($showlegend == 2 ? 'right' : 'top').'\'';
1209 1209
 				if (!empty($legendMaxLines)) {
1210
-					$this->stringtoshow .= ', maxLines: ' . $legendMaxLines;
1210
+					$this->stringtoshow .= ', maxLines: '.$legendMaxLines;
1211 1211
 				}
1212
-				$this->stringtoshow .= ' }, ' . "\n";
1212
+				$this->stringtoshow .= ' }, '."\n";
1213 1213
 			}
1214
-			$this->stringtoshow .= ' }, ' . "\n";
1214
+			$this->stringtoshow .= ' }, '."\n";
1215 1215
 
1216 1216
 
1217 1217
 			if ($this->type[$firstlot] == 'piesemicircle') {
1218
-				$this->stringtoshow .= 'circumference: Math.PI,' . "\n";
1219
-				$this->stringtoshow .= 'rotation: -Math.PI,' . "\n";
1218
+				$this->stringtoshow .= 'circumference: Math.PI,'."\n";
1219
+				$this->stringtoshow .= 'rotation: -Math.PI,'."\n";
1220 1220
 			}
1221
-			$this->stringtoshow .= 'elements: { arc: {' . "\n";
1221
+			$this->stringtoshow .= 'elements: { arc: {'."\n";
1222 1222
 			// Color of each arc
1223 1223
 			$this->stringtoshow .= 'backgroundColor: [';
1224 1224
 			$i = 0;
1225 1225
 			$foundnegativecolor = 0;
1226 1226
 			foreach ($legends as $val) {	// Loop on each series
1227 1227
 				if ($i > 0) {
1228
-					$this->stringtoshow .= ', ' . "\n";
1228
+					$this->stringtoshow .= ', '."\n";
1229 1229
 				}
1230 1230
 				if (is_array($this->datacolor[$i])) {
1231
-					$color = 'rgb(' . $this->datacolor[$i][0] . ', ' . $this->datacolor[$i][1] . ', ' . $this->datacolor[$i][2] . ')'; // If datacolor is array(R, G, B)
1231
+					$color = 'rgb('.$this->datacolor[$i][0].', '.$this->datacolor[$i][1].', '.$this->datacolor[$i][2].')'; // If datacolor is array(R, G, B)
1232 1232
 				} else {
1233 1233
 					$tmp = str_replace('#', '', $this->datacolor[$i]);
1234 1234
 					if (strpos($tmp, '-') !== false) {
1235 1235
 						$foundnegativecolor++;
1236 1236
 						$color = 'rgba(0,0,0,.0)'; // If $val is '-123'
1237 1237
 					} else {
1238
-						$color = "#" . $tmp; // If $val is '123' or '#123'
1238
+						$color = "#".$tmp; // If $val is '123' or '#123'
1239 1239
 					}
1240 1240
 				}
1241
-				$this->stringtoshow .= "'" . $color . "'";
1241
+				$this->stringtoshow .= "'".$color."'";
1242 1242
 				$i++;
1243 1243
 			}
1244
-			$this->stringtoshow .= '], ' . "\n";
1244
+			$this->stringtoshow .= '], '."\n";
1245 1245
 			// Border color
1246 1246
 			if ($foundnegativecolor) {
1247 1247
 				$this->stringtoshow .= 'borderColor: [';
1248 1248
 				$i = 0;
1249 1249
 				foreach ($legends as $val) {	// Loop on each series
1250 1250
 					if ($i > 0) {
1251
-						$this->stringtoshow .= ', ' . "\n";
1251
+						$this->stringtoshow .= ', '."\n";
1252 1252
 					}
1253 1253
 					if (is_array($this->datacolor[$i])) {
1254 1254
 						$color = 'null'; // If datacolor is array(R, G, B)
1255 1255
 					} else {
1256 1256
 						$tmp = str_replace('#', '', $this->datacolor[$i]);
1257 1257
 						if (strpos($tmp, '-') !== false) {
1258
-							$color = '#' . str_replace('-', '', $tmp); // If $val is '-123'
1258
+							$color = '#'.str_replace('-', '', $tmp); // If $val is '-123'
1259 1259
 						} else {
1260 1260
 							$color = 'null'; // If $val is '123' or '#123'
1261 1261
 						}
1262 1262
 					}
1263
-					$this->stringtoshow .= ($color == 'null' ? "'rgba(0,0,0,0.2)'" : "'" . $color . "'");
1263
+					$this->stringtoshow .= ($color == 'null' ? "'rgba(0,0,0,0.2)'" : "'".$color."'");
1264 1264
 					$i++;
1265 1265
 				}
1266 1266
 				$this->stringtoshow .= ']';
1267 1267
 			}
1268
-			$this->stringtoshow .= '} } };' . "\n";
1268
+			$this->stringtoshow .= '} } };'."\n";
1269 1269
 
1270 1270
 			$this->stringtoshow .= '
1271
-				var ctx = document.getElementById("canvas_' . $tag . '").getContext("2d");
1271
+				var ctx = document.getElementById("canvas_' . $tag.'").getContext("2d");
1272 1272
 				var chart = new Chart(ctx, {
1273 1273
 			    // The type of chart we want to create
1274
-    			type: \'' . (in_array($type, array('pie', 'piesemicircle')) ? 'doughnut' : 'polarArea') . '\',
1274
+    			type: \'' . (in_array($type, array('pie', 'piesemicircle')) ? 'doughnut' : 'polarArea').'\',
1275 1275
 				// Configuration options go here
1276 1276
     			options: options,
1277 1277
 				data: {
@@ -1282,7 +1282,7 @@  discard block
 block discarded – undo
1282 1282
 				if ($i > 0) {
1283 1283
 					$this->stringtoshow .= ', ';
1284 1284
 				}
1285
-				$this->stringtoshow .= "'" . dol_escape_js(dol_trunc($val, 25)) . "'";	// Lower than 25 make some important label (that we can't shorten) to be truncated
1285
+				$this->stringtoshow .= "'".dol_escape_js(dol_trunc($val, 25))."'"; // Lower than 25 make some important label (that we can't shorten) to be truncated
1286 1286
 				$i++;
1287 1287
 			}
1288 1288
 
@@ -1290,21 +1290,21 @@  discard block
 block discarded – undo
1290 1290
 					datasets: [';
1291 1291
 			$i = 0;
1292 1292
 			while ($i < $nblot) {	// Loop on each series
1293
-				$color = 'rgb(' . $this->datacolor[$i][0] . ', ' . $this->datacolor[$i][1] . ', ' . $this->datacolor[$i][2] . ')';
1293
+				$color = 'rgb('.$this->datacolor[$i][0].', '.$this->datacolor[$i][1].', '.$this->datacolor[$i][2].')';
1294 1294
 
1295 1295
 				if ($i > 0) {
1296
-					$this->stringtoshow .= ', ' . "\n";
1296
+					$this->stringtoshow .= ', '."\n";
1297 1297
 				}
1298
-				$this->stringtoshow .= '{' . "\n";
1298
+				$this->stringtoshow .= '{'."\n";
1299 1299
 				//$this->stringtoshow .= 'borderColor: \''.$color.'\', ';
1300 1300
 				//$this->stringtoshow .= 'backgroundColor: \''.$color.'\', ';
1301
-				$this->stringtoshow .= '  data: [' . $series[$i] . ']';
1302
-				$this->stringtoshow .= '}' . "\n";
1301
+				$this->stringtoshow .= '  data: ['.$series[$i].']';
1302
+				$this->stringtoshow .= '}'."\n";
1303 1303
 				$i++;
1304 1304
 			}
1305
-			$this->stringtoshow .= ']' . "\n";
1306
-			$this->stringtoshow .= '}' . "\n";
1307
-			$this->stringtoshow .= '});' . "\n";
1305
+			$this->stringtoshow .= ']'."\n";
1306
+			$this->stringtoshow .= '}'."\n";
1307
+			$this->stringtoshow .= '});'."\n";
1308 1308
 		} else {
1309 1309
 			// Other cases, graph of type 'bars', 'lines', 'linesnopoint'
1310 1310
 			$type = 'bar';
@@ -1338,7 +1338,7 @@  discard block
 block discarded – undo
1338 1338
 			if (empty($showlegend)) {
1339 1339
 				$this->stringtoshow .= 'legend: { display: false }, '."\n";
1340 1340
 			} else {
1341
-				$this->stringtoshow .= 'legend: { maxWidth: '.round(intval($this->width) / 2).', labels: { boxWidth: 15 }, position: \'' . (($showlegend && $showlegend == 2) ? 'right' : 'top') . '\' },'."\n";
1341
+				$this->stringtoshow .= 'legend: { maxWidth: '.round(intval($this->width) / 2).', labels: { boxWidth: 15 }, position: \''.(($showlegend && $showlegend == 2) ? 'right' : 'top').'\' },'."\n";
1342 1342
 			}
1343 1343
 			if (is_array($this->tooltipsLabels) || is_array($this->tooltipsTitles)) {
1344 1344
 				$this->stringtoshow .= 'tooltip: { mode: \'nearest\',
@@ -1400,10 +1400,10 @@  discard block
 block discarded – undo
1400 1400
 			}
1401 1401
 			$this->stringtoshow .= '};';
1402 1402
 			$this->stringtoshow .= '
1403
-				var ctx = document.getElementById("canvas_' . $tag . '").getContext("2d");
1403
+				var ctx = document.getElementById("canvas_' . $tag.'").getContext("2d");
1404 1404
 				var chart = new Chart(ctx, {
1405 1405
 			    // The type of chart we want to create
1406
-    			type: \'' . $type . '\',
1406
+    			type: \'' . $type.'\',
1407 1407
 				// Configuration options go here
1408 1408
     			options: options,
1409 1409
 				data: {
@@ -1414,7 +1414,7 @@  discard block
 block discarded – undo
1414 1414
 				if ($i > 0) {
1415 1415
 					$this->stringtoshow .= ', ';
1416 1416
 				}
1417
-				$this->stringtoshow .= "'" . dol_escape_js(dol_trunc($val, 32)) . "'";
1417
+				$this->stringtoshow .= "'".dol_escape_js(dol_trunc($val, 32))."'";
1418 1418
 				$i++;
1419 1419
 			}
1420 1420
 
@@ -1469,19 +1469,19 @@  discard block
 block discarded – undo
1469 1469
 					}
1470 1470
 					$oldstacknum = $arrayofgroupslegend[$i]['stacknum'];
1471 1471
 
1472
-					$color = 'rgb(' . $newcolor[0] . ', ' . $newcolor[1] . ', ' . $newcolor[2] . ', 0.9)';
1473
-					$bordercolor = 'rgb(' . $newcolor[0] . ', ' . $newcolor[1] . ', ' . $newcolor[2] . ')';
1472
+					$color = 'rgb('.$newcolor[0].', '.$newcolor[1].', '.$newcolor[2].', 0.9)';
1473
+					$bordercolor = 'rgb('.$newcolor[0].', '.$newcolor[1].', '.$newcolor[2].')';
1474 1474
 				} else { // We do not use a 'group by'
1475 1475
 					if (!empty($this->datacolor[$i])) {
1476 1476
 						if (is_array($this->datacolor[$i])) {
1477
-							$color = 'rgb(' . $this->datacolor[$i][0] . ', ' . $this->datacolor[$i][1] . ', ' . $this->datacolor[$i][2] . ', 0.9)';
1477
+							$color = 'rgb('.$this->datacolor[$i][0].', '.$this->datacolor[$i][1].', '.$this->datacolor[$i][2].', 0.9)';
1478 1478
 						} else {
1479 1479
 							$color = $this->datacolor[$i];
1480 1480
 						}
1481 1481
 					}
1482 1482
 					// else: $color will be undefined
1483 1483
 					if (!empty($this->bordercolor[$i]) && is_array($this->bordercolor[$i])) {
1484
-						$bordercolor = 'rgb(' . $this->bordercolor[$i][0] . ', ' . $this->bordercolor[$i][1] . ', ' . $this->bordercolor[$i][2] . ', 0.9)';
1484
+						$bordercolor = 'rgb('.$this->bordercolor[$i][0].', '.$this->bordercolor[$i][1].', '.$this->bordercolor[$i][2].', 0.9)';
1485 1485
 					} else {
1486 1486
 						if ($type != 'horizontalBar') {
1487 1487
 							$bordercolor = $color;
@@ -1503,34 +1503,34 @@  discard block
 block discarded – undo
1503 1503
 				}
1504 1504
 				$this->stringtoshow .= "\n";
1505 1505
 				$this->stringtoshow .= '{';
1506
-				$this->stringtoshow .= 'dolibarrinfo: \'y_' . $i . '\', ';
1507
-				$this->stringtoshow .= 'label: \'' . dol_escape_js(dol_string_nohtmltag($textoflegend)) . '\', ';
1508
-				$this->stringtoshow .= 'pointStyle: \'' . ((!empty($this->type[$i]) && $this->type[$i] == 'linesnopoint') ? 'line' : 'circle') . '\', ';
1509
-				$this->stringtoshow .= 'fill: ' . ($type == 'bar' ? 'true' : 'false') . ', ';
1506
+				$this->stringtoshow .= 'dolibarrinfo: \'y_'.$i.'\', ';
1507
+				$this->stringtoshow .= 'label: \''.dol_escape_js(dol_string_nohtmltag($textoflegend)).'\', ';
1508
+				$this->stringtoshow .= 'pointStyle: \''.((!empty($this->type[$i]) && $this->type[$i] == 'linesnopoint') ? 'line' : 'circle').'\', ';
1509
+				$this->stringtoshow .= 'fill: '.($type == 'bar' ? 'true' : 'false').', ';
1510 1510
 				if ($type == 'bar' || $type == 'horizontalBar') {
1511 1511
 					$this->stringtoshow .= 'borderWidth: \''.$this->borderwidth.'\', ';
1512 1512
 				}
1513
-				$this->stringtoshow .= 'borderColor: \'' . $bordercolor . '\', ';
1514
-				$this->stringtoshow .= 'borderSkipped: \'' . $this->borderskip . '\', ';
1515
-				$this->stringtoshow .= 'backgroundColor: \'' . $color . '\', ';
1513
+				$this->stringtoshow .= 'borderColor: \''.$bordercolor.'\', ';
1514
+				$this->stringtoshow .= 'borderSkipped: \''.$this->borderskip.'\', ';
1515
+				$this->stringtoshow .= 'backgroundColor: \''.$color.'\', ';
1516 1516
 				if (!empty($arrayofgroupslegend) && !empty($arrayofgroupslegend[$i])) {
1517
-					$this->stringtoshow .= 'stack: \'' . $arrayofgroupslegend[$i]['stacknum'] . '\', ';
1517
+					$this->stringtoshow .= 'stack: \''.$arrayofgroupslegend[$i]['stacknum'].'\', ';
1518 1518
 				}
1519 1519
 				$this->stringtoshow .= 'data: [';
1520 1520
 
1521
-				$this->stringtoshow .= $this->mirrorGraphValues ? '[-' . $series[$i] . ',' . $series[$i] . ']' : $series[$i];
1521
+				$this->stringtoshow .= $this->mirrorGraphValues ? '[-'.$series[$i].','.$series[$i].']' : $series[$i];
1522 1522
 				$this->stringtoshow .= ']';
1523
-				$this->stringtoshow .= '}' . "\n";
1523
+				$this->stringtoshow .= '}'."\n";
1524 1524
 
1525 1525
 				$i++;
1526 1526
 				$iinstack++;
1527 1527
 			}
1528
-			$this->stringtoshow .= ']' . "\n";
1529
-			$this->stringtoshow .= '}' . "\n";
1530
-			$this->stringtoshow .= '});' . "\n";
1528
+			$this->stringtoshow .= ']'."\n";
1529
+			$this->stringtoshow .= '}'."\n";
1530
+			$this->stringtoshow .= '});'."\n";
1531 1531
 		}
1532 1532
 
1533
-		$this->stringtoshow .= '</script>' . "\n";
1533
+		$this->stringtoshow .= '</script>'."\n";
1534 1534
 	}
1535 1535
 
1536 1536
 
@@ -1559,12 +1559,12 @@  discard block
 block discarded – undo
1559 1559
 		global $langs;
1560 1560
 
1561 1561
 		if ($shownographyet) {
1562
-			$s = '<div class="nographyet" style="width:' . (preg_match('/%/', $this->width) ? $this->width : $this->width . 'px') . '; height:' . (preg_match('/%/', $this->height) ? $this->height : $this->height . 'px') . ';"></div>';
1562
+			$s = '<div class="nographyet" style="width:'.(preg_match('/%/', $this->width) ? $this->width : $this->width.'px').'; height:'.(preg_match('/%/', $this->height) ? $this->height : $this->height.'px').';"></div>';
1563 1563
 			$s .= '<div class="nographyettext margintoponly">';
1564 1564
 			if (is_numeric($shownographyet)) {
1565
-				$s .= $langs->trans("NotEnoughDataYet") . '...';
1565
+				$s .= $langs->trans("NotEnoughDataYet").'...';
1566 1566
 			} else {
1567
-				$s .= $shownographyet . '...';
1567
+				$s .= $shownographyet.'...';
1568 1568
 			}
1569 1569
 			$s .= '</div>';
1570 1570
 			return $s;
Please login to merge, or discard this patch.
htdocs/compta/cashcontrol/report.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
 $langs->loadLangs(array("bills", "banks"));
52 52
 
53 53
 $id = GETPOSTINT('id');
54
-$summaryonly = GETPOSTINT('summaryonly');		// May be used for ticket Z
54
+$summaryonly = GETPOSTINT('summaryonly'); // May be used for ticket Z
55 55
 
56 56
 $object = new CashControl($db);
57 57
 $object->fetch($id);
Please login to merge, or discard this patch.
htdocs/compta/facture/card.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 }
81 81
 
82 82
 // General $Variables
83
-$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('facid'));    // For backward compatibility
83
+$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('facid')); // For backward compatibility
84 84
 $ref = GETPOST('ref', 'alpha');
85 85
 $socid = GETPOSTINT('socid');
86 86
 $action = GETPOST('action', 'aZ09');
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 					setEventMessages('', $warningMsgLineList, 'warnings');
246 246
 				}
247 247
 
248
-				header("Location: " . $_SERVER['PHP_SELF'] . '?facid=' . $result);
248
+				header("Location: ".$_SERVER['PHP_SELF'].'?facid='.$result);
249 249
 				exit();
250 250
 			} else {
251 251
 				$langs->load("errors");
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
 		// Validation
337 337
 		$object->fetch($id);
338 338
 
339
-		if ((preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) &&	// empty should not happened, but when it occurs, the test save life
339
+		if ((preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) && // empty should not happened, but when it occurs, the test save life
340 340
 			getDolGlobalString('FAC_FORCE_DATE_VALIDATION')								// If option enabled, we force invoice date
341 341
 		) {
342 342
 			$object->date = dol_now();
@@ -1048,7 +1048,7 @@  discard block
 block discarded – undo
1048 1048
 			$error++;
1049 1049
 		}
1050 1050
 
1051
-		$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
1051
+		$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
1052 1052
 		$date_pointoftax = dol_mktime(0, 0, 0, GETPOSTINT('date_pointoftaxmonth'), GETPOSTINT('date_pointoftaxday'), GETPOSTINT('date_pointoftaxyear'), 'tzserver');
1053 1053
 
1054 1054
 		// Replacement invoice
@@ -1080,7 +1080,7 @@  discard block
 block discarded – undo
1080 1080
 				$object->note_private		= trim(GETPOST('note_private', 'restricthtml'));
1081 1081
 				$object->ref_client			= GETPOST('ref_client', 'alphanohtml');
1082 1082
 				$object->ref_customer		= GETPOST('ref_client', 'alphanohtml');
1083
-				$object->model_pdf          = GETPOST('model', 'alphanohtml');
1083
+				$object->model_pdf = GETPOST('model', 'alphanohtml');
1084 1084
 				$object->fk_project			= GETPOSTINT('projectid');
1085 1085
 				$object->cond_reglement_id	= GETPOSTINT('cond_reglement_id');
1086 1086
 				$object->mode_reglement_id	= GETPOSTINT('mode_reglement_id');
@@ -1141,9 +1141,9 @@  discard block
 block discarded – undo
1141 1141
 				$object->note_private		= trim(GETPOST('note_private', 'restricthtml'));
1142 1142
 				$object->ref_client			= GETPOST('ref_client', 'alphanohtml');
1143 1143
 				$object->ref_customer		= GETPOST('ref_client', 'alphanohtml');
1144
-				$object->model_pdf          = GETPOST('model');
1144
+				$object->model_pdf = GETPOST('model');
1145 1145
 				$object->fk_project			= GETPOSTINT('projectid');
1146
-				$object->cond_reglement_id	= 0;		// No payment term for a credit note
1146
+				$object->cond_reglement_id	= 0; // No payment term for a credit note
1147 1147
 				$object->mode_reglement_id	= GETPOSTINT('mode_reglement_id');
1148 1148
 				$object->fk_account         = GETPOSTINT('fk_account');
1149 1149
 				//$object->remise_absolue		= price2num(GETPOST('remise_absolue'), 'MU');
@@ -1465,7 +1465,7 @@  discard block
 block discarded – undo
1465 1465
 				$object->note_public		= trim(GETPOST('note_public', 'restricthtml'));
1466 1466
 				$object->note_private       = trim(GETPOST('note_private', 'restricthtml'));
1467 1467
 				$object->ref_client			= GETPOST('ref_client');
1468
-				$object->ref_customer		= GETPOST('ref_client');
1468
+				$object->ref_customer = GETPOST('ref_client');
1469 1469
 				$object->model_pdf          = GETPOST('model');
1470 1470
 				$object->fk_project			= GETPOSTINT('projectid');
1471 1471
 				$object->cond_reglement_id	= (GETPOSTINT('type') == 3 ? 1 : GETPOST('cond_reglement_id'));
@@ -2080,7 +2080,7 @@  discard block
 block discarded – undo
2080 2080
 		} else {
2081 2081
 			$db->rollback();
2082 2082
 			$action = 'create';
2083
-			$_GET["origin"] = $_POST["origin"];		// Keep GET and POST here ?
2083
+			$_GET["origin"] = $_POST["origin"]; // Keep GET and POST here ?
2084 2084
 			$_GET["originid"] = $_POST["originid"]; // Keep GET and POST here ?
2085 2085
 			setEventMessages($object->error, $object->errors, 'errors');
2086 2086
 		}
@@ -2107,7 +2107,7 @@  discard block
 block discarded – undo
2107 2107
 		$remise_percent = (GETPOST('remiseforalllines') ? GETPOST('remiseforalllines') : 0);
2108 2108
 		$remise_percent = str_replace('*', '', $remise_percent);
2109 2109
 		foreach ($object->lines as $line) {
2110
-			$tvatx= $line->tva_tx;
2110
+			$tvatx = $line->tva_tx;
2111 2111
 			if (!empty($line->vat_src_code)) {
2112 2112
 				$tvatx .= ' ('.$line->vat_src_code.')';
2113 2113
 			}
@@ -2627,7 +2627,7 @@  discard block
 block discarded – undo
2627 2627
 		// Define special_code for special lines
2628 2628
 		$special_code = GETPOSTINT('special_code');
2629 2629
 		if ($special_code == 3) {
2630
-			$special_code = 0;	// Options should not exists on invoices
2630
+			$special_code = 0; // Options should not exists on invoices
2631 2631
 		}
2632 2632
 
2633 2633
 		$line = new FactureLigne($db);
@@ -3240,8 +3240,8 @@  discard block
 block discarded – undo
3240 3240
 				//$remise_absolue 	= (!empty($expesrc->remise_absolue) ? $expesrc->remise_absolue : (!empty($soc->remise_absolue) ? $soc->remise_absolue : 0));
3241 3241
 
3242 3242
 				if (isModEnabled('multicurrency')) {
3243
-					$currency_code 	= (!empty($expesrc->multicurrency_code) ? $expesrc->multicurrency_code : (!empty($soc->multicurrency_code) ? $soc->multicurrency_code : $objectsrc->multicurrency_code));
3244
-					$currency_tx 	= (!empty($expesrc->multicurrency_tx) ? $expesrc->multicurrency_tx : (!empty($soc->multicurrency_tx) ? $soc->multicurrency_tx : $objectsrc->multicurrency_tx));
3243
+					$currency_code = (!empty($expesrc->multicurrency_code) ? $expesrc->multicurrency_code : (!empty($soc->multicurrency_code) ? $soc->multicurrency_code : $objectsrc->multicurrency_code));
3244
+					$currency_tx = (!empty($expesrc->multicurrency_tx) ? $expesrc->multicurrency_tx : (!empty($soc->multicurrency_tx) ? $soc->multicurrency_tx : $objectsrc->multicurrency_tx));
3245 3245
 				}
3246 3246
 
3247 3247
 				//Replicate extrafields
@@ -3337,7 +3337,7 @@  discard block
 block discarded – undo
3337 3337
 	print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="POST" id="formtocreate" name="formtocreate">';
3338 3338
 	print '<input type="hidden" name="token" value="'.newToken().'">';
3339 3339
 	print '<input type="hidden" name="action" id="formtocreateaction" value="add">';
3340
-	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
3340
+	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
3341 3341
 	if ($soc->id > 0) {
3342 3342
 		print '<input type="hidden" name="socid" value="'.$soc->id.'">'."\n";
3343 3343
 	}
@@ -4386,7 +4386,7 @@  discard block
 block discarded – undo
4386 4386
 		$nbMandated = 0;
4387 4387
 		foreach ($object->lines as $line) {
4388 4388
 			$res = $line->fetch_product();
4389
-			if ($res  > 0) {
4389
+			if ($res > 0) {
4390 4390
 				if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) {
4391 4391
 					$nbMandated++;
4392 4392
 					break;
@@ -4589,7 +4589,7 @@  discard block
 block discarded – undo
4589 4589
 	}
4590 4590
 	// Ref customer
4591 4591
 	$morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_customer, $object, $usercancreate, 'string', '', 0, 1);
4592
-	$morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_customer, $object, $usercancreate, 'string'.(getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1);
4592
+	$morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_customer, $object, $usercancreate, 'string'.(getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1);
4593 4593
 	// Thirdparty
4594 4594
 	$morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1, 'customer');
4595 4595
 	if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $object->thirdparty->id > 0) {
@@ -5020,45 +5020,45 @@  discard block
 block discarded – undo
5020 5020
 		}
5021 5021
 		print '<tr>';
5022 5022
 		// Amount HT
5023
-		print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>';
5024
-		print '<td class="nowrap amountcard right">' . price($sign * $object->total_ht, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
5023
+		print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>';
5024
+		print '<td class="nowrap amountcard right">'.price($sign * $object->total_ht, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
5025 5025
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
5026 5026
 			// Multicurrency Amount HT
5027
-			print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
5027
+			print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
5028 5028
 		}
5029 5029
 		print '</tr>';
5030 5030
 
5031 5031
 		print '<tr>';
5032 5032
 		// Amount VAT
5033
-		print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>';
5034
-		print '<td class="nowrap amountcard right">' . price($sign * $object->total_tva, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
5033
+		print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>';
5034
+		print '<td class="nowrap amountcard right">'.price($sign * $object->total_tva, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
5035 5035
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
5036 5036
 			// Multicurrency Amount VAT
5037
-			print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
5037
+			print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
5038 5038
 		}
5039 5039
 		print '</tr>';
5040 5040
 
5041 5041
 		// Amount Local Taxes
5042 5042
 		if (($mysoc->localtax1_assuj == "1" && $mysoc->useLocalTax(1)) || $object->total_localtax1 != 0) {
5043 5043
 			print '<tr>';
5044
-			print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
5045
-			print '<td class="nowrap amountcard right">' . price($sign * $object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
5044
+			print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>';
5045
+			print '<td class="nowrap amountcard right">'.price($sign * $object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
5046 5046
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
5047 5047
 				$object->multicurrency_total_localtax1 = (float) price2num($object->total_localtax1 * $object->multicurrency_tx, 'MT');
5048 5048
 
5049
-				print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
5049
+				print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
5050 5050
 			}
5051 5051
 			print '</tr>';
5052 5052
 		}
5053 5053
 
5054 5054
 		if (($mysoc->localtax2_assuj == "1" && $mysoc->useLocalTax(2)) || $object->total_localtax2 != 0) {
5055 5055
 			print '<tr>';
5056
-			print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>';
5057
-			print '<td class="nowrap amountcard right">' . price($sign * $object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
5056
+			print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>';
5057
+			print '<td class="nowrap amountcard right">'.price($sign * $object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
5058 5058
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
5059 5059
 				$object->multicurrency_total_localtax2 = (float) price2num($object->total_localtax2 * $object->multicurrency_tx, 'MT');
5060 5060
 
5061
-				print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
5061
+				print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
5062 5062
 			}
5063 5063
 			print '</tr>';
5064 5064
 		}
@@ -5118,11 +5118,11 @@  discard block
 block discarded – undo
5118 5118
 
5119 5119
 		print '<tr>';
5120 5120
 		// Amount TTC
5121
-		print '<td>' . $langs->trans('AmountTTC') . '</td>';
5122
-		print '<td class="nowrap amountcard right">' . price($sign * $object->total_ttc, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
5121
+		print '<td>'.$langs->trans('AmountTTC').'</td>';
5122
+		print '<td class="nowrap amountcard right">'.price($sign * $object->total_ttc, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
5123 5123
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
5124 5124
 			// Multicurrency Amount TTC
5125
-			print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_ttc, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
5125
+			print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_ttc, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
5126 5126
 		}
5127 5127
 		print '</tr>';
5128 5128
 
@@ -5781,7 +5781,7 @@  discard block
 block discarded – undo
5781 5781
 					$langs->load("contracts");
5782 5782
 
5783 5783
 					if ($usercancreatecontract) {
5784
-						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>';
5784
+						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>';
5785 5785
 					}
5786 5786
 				}
5787 5787
 			}
@@ -6005,7 +6005,7 @@  discard block
 block discarded – undo
6005 6005
 			if ($usercandelete || ($usercancreate && $isErasable == 1)) {	// isErasable = 1 means draft with temporary ref (draft can always be deleted with no need of permissions)
6006 6006
 				$enableDelete = false;
6007 6007
 				$deleteHref = '#';
6008
-				if ($isErasable > 0 && ! $objectidnext) {
6008
+				if ($isErasable > 0 && !$objectidnext) {
6009 6009
 					$deleteHref = $_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=delete&token='.newToken();
6010 6010
 					$enableDelete = true;
6011 6011
 				}
Please login to merge, or discard this patch.
htdocs/commande/card.php 1 patch
Spacing   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -80,18 +80,18 @@  discard block
 block discarded – undo
80 80
 
81 81
 
82 82
 $id        = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('orderid'));
83
-$ref       =  GETPOST('ref', 'alpha');
84
-$socid     =  GETPOSTINT('socid');
85
-$action    =  GETPOST('action', 'aZ09');
86
-$cancel    =  GETPOST('cancel', 'alpha');
87
-$confirm   =  GETPOST('confirm', 'alpha');
83
+$ref       = GETPOST('ref', 'alpha');
84
+$socid     = GETPOSTINT('socid');
85
+$action    = GETPOST('action', 'aZ09');
86
+$cancel    = GETPOST('cancel', 'alpha');
87
+$confirm   = GETPOST('confirm', 'alpha');
88 88
 $backtopage = GETPOST('backtopage', 'alpha');
89 89
 
90
-$lineid    =  GETPOSTINT('lineid');
91
-$contactid =  GETPOSTINT('contactid');
92
-$projectid =  GETPOSTINT('projectid');
93
-$origin    =  GETPOST('origin', 'alpha');
94
-$originid  = (GETPOSTINT('originid') ? GETPOSTINT('originid') : GETPOSTINT('origin_id'));    // For backward compatibility
90
+$lineid    = GETPOSTINT('lineid');
91
+$contactid = GETPOSTINT('contactid');
92
+$projectid = GETPOSTINT('projectid');
93
+$origin    = GETPOST('origin', 'alpha');
94
+$originid  = (GETPOSTINT('originid') ? GETPOSTINT('originid') : GETPOSTINT('origin_id')); // For backward compatibility
95 95
 $rank      = (GETPOSTINT('rank') > 0) ? GETPOSTINT('rank') : -1;
96 96
 
97 97
 // PDF
@@ -116,26 +116,26 @@  discard block
 block discarded – undo
116 116
 $extrafields->fetch_name_optionals_label($object->table_element);
117 117
 
118 118
 // Load object
119
-include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php';     // Must be include, not include_once
119
+include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
120 120
 
121 121
 // Permissions / Rights
122
-$usercanread    =  $user->hasRight("commande", "lire");
123
-$usercancreate  =  $user->hasRight("commande", "creer");
124
-$usercandelete  =  $user->hasRight("commande", "supprimer");
122
+$usercanread    = $user->hasRight("commande", "lire");
123
+$usercancreate  = $user->hasRight("commande", "creer");
124
+$usercandelete  = $user->hasRight("commande", "supprimer");
125 125
 
126 126
 // Advanced permissions
127
-$usercanclose       =  ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !empty($usercancreate)) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'close')));
128
-$usercanvalidate    =  ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $usercancreate) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'validate')));
129
-$usercancancel      =  ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $usercancreate) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'annuler')));
130
-$usercansend        =   (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('commande', 'order_advance', 'send'));
131
-$usercangeneretedoc =   (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('commande', 'order_advance', 'generetedoc'));
127
+$usercanclose       = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !empty($usercancreate)) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'close')));
128
+$usercanvalidate    = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $usercancreate) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'validate')));
129
+$usercancancel      = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $usercancreate) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'annuler')));
130
+$usercansend        = (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('commande', 'order_advance', 'send'));
131
+$usercangeneretedoc = (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('commande', 'order_advance', 'generetedoc'));
132 132
 
133 133
 $usermustrespectpricemin    = ((getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !$user->hasRight('produit', 'ignore_price_min_advance')) || !getDolGlobalString('MAIN_USE_ADVANCED_PERMS'));
134 134
 $usercancreatepurchaseorder = ($user->hasRight('fournisseur', 'commande', 'creer') || $user->hasRight('supplier_order', 'creer'));
135 135
 
136
-$permissionnote    = $usercancreate;     //  Used by the include of actions_setnotes.inc.php
137
-$permissiondellink = $usercancreate;     //  Used by the include of actions_dellink.inc.php
138
-$permissiontoadd   = $usercancreate;     //  Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
136
+$permissionnote    = $usercancreate; //  Used by the include of actions_setnotes.inc.php
137
+$permissiondellink = $usercancreate; //  Used by the include of actions_dellink.inc.php
138
+$permissiontoadd   = $usercancreate; //  Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
139 139
 
140 140
 
141 141
 $error = 0;
@@ -180,11 +180,11 @@  discard block
 block discarded – undo
180 180
 		$action = '';
181 181
 	}
182 182
 
183
-	include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php';    // Must be include, not include_once
183
+	include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once
184 184
 
185
-	include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';     // Must be include, not include_once
185
+	include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once
186 186
 
187
-	include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php';  // Must be include, not include_once
187
+	include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once
188 188
 
189 189
 	// Action clone object
190 190
 	if ($action == 'confirm_clone' && $confirm == 'yes' && $usercancreate) {
@@ -682,7 +682,7 @@  discard block
 block discarded – undo
682 682
 		$remise_percent = (GETPOST('remiseforalllines') ? GETPOST('remiseforalllines') : 0);
683 683
 		$remise_percent = str_replace('*', '', $remise_percent);
684 684
 		foreach ($object->lines as $line) {
685
-			$tvatx= $line->tva_tx;
685
+			$tvatx = $line->tva_tx;
686 686
 			if (!empty($line->vat_src_code)) {
687 687
 				$tvatx .= ' ('.$line->vat_src_code.')';
688 688
 			}
@@ -703,7 +703,7 @@  discard block
 block discarded – undo
703 703
 		$pu_ht = '';
704 704
 		$pu_ttc = '';
705 705
 		$pu_ht_devise = '';
706
-		$pu_ttc_devise  = '';
706
+		$pu_ttc_devise = '';
707 707
 
708 708
 		if (GETPOST('price_ht') !== '') {
709 709
 			$price_ht = price2num(GETPOST('price_ht'), 'MU', 2);
@@ -848,8 +848,8 @@  discard block
 block discarded – undo
848 848
 						if (count($prodcustprice->lines) > 0) {
849 849
 							$pu_ht = price($prodcustprice->lines[0]->price);
850 850
 							$pu_ttc = price($prodcustprice->lines[0]->price_ttc);
851
-							$price_min =  price($prodcustprice->lines[0]->price_min);
852
-							$price_min_ttc =  price($prodcustprice->lines[0]->price_min_ttc);
851
+							$price_min = price($prodcustprice->lines[0]->price_min);
852
+							$price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc);
853 853
 							$price_base_type = $prodcustprice->lines[0]->price_base_type;
854 854
 							$tva_tx = $prodcustprice->lines[0]->tva_tx;
855 855
 							if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) {
@@ -1372,7 +1372,7 @@  discard block
 block discarded – undo
1372 1372
 					GETPOST('generate_deposit', 'alpha') == 'on' && !empty($deposit_percent_from_payment_terms)
1373 1373
 					&& isModEnabled('invoice') && $user->hasRight('facture', 'creer')
1374 1374
 				) {
1375
-					require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
1375
+					require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
1376 1376
 
1377 1377
 					$date = dol_mktime(0, 0, 0, GETPOSTINT('datefmonth'), GETPOSTINT('datefday'), GETPOSTINT('datefyear'));
1378 1378
 					$forceFields = array();
@@ -1385,7 +1385,7 @@  discard block
 block discarded – undo
1385 1385
 
1386 1386
 					if ($deposit) {
1387 1387
 						setEventMessage('DepositGenerated');
1388
-						$locationTarget = DOL_URL_ROOT . '/compta/facture/card.php?id=' . $deposit->id;
1388
+						$locationTarget = DOL_URL_ROOT.'/compta/facture/card.php?id='.$deposit->id;
1389 1389
 					} else {
1390 1390
 						$error++;
1391 1391
 						setEventMessages($object->error, $object->errors, 'errors');
@@ -1393,7 +1393,7 @@  discard block
 block discarded – undo
1393 1393
 				}
1394 1394
 
1395 1395
 				// Define output language
1396
-				if (! $error) {
1396
+				if (!$error) {
1397 1397
 					$db->commit();
1398 1398
 
1399 1399
 					if (!getDolGlobalString('MAIN_DISABLE_PDF_AUTOUPDATE')) {
@@ -1421,7 +1421,7 @@  discard block
 block discarded – undo
1421 1421
 					}
1422 1422
 
1423 1423
 					if ($locationTarget) {
1424
-						header('Location: ' . $locationTarget);
1424
+						header('Location: '.$locationTarget);
1425 1425
 						exit;
1426 1426
 					}
1427 1427
 				} else {
@@ -1844,7 +1844,7 @@  discard block
 block discarded – undo
1844 1844
 	print '<form name="crea_commande" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
1845 1845
 	print '<input type="hidden" name="token" value="'.newToken().'">';
1846 1846
 	print '<input type="hidden" name="action" value="add">';
1847
-	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
1847
+	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
1848 1848
 	print '<input type="hidden" name="remise_percent" value="'.$soc->remise_percent.'">';
1849 1849
 	print '<input type="hidden" name="origin" value="'.$origin.'">';
1850 1850
 	print '<input type="hidden" name="originid" value="'.$originid.'">';
@@ -1912,7 +1912,7 @@  discard block
 block discarded – undo
1912 1912
 			print "<tr><td>".$langs->trans("DefaultContact").'</td><td>';
1913 1913
 			print img_picto('', 'contact', 'class="pictofixedwidth"');
1914 1914
 			//print $form->selectcontacts($soc->id, $contactid, 'contactid', 1, empty($srccontactslist) ? "" : $srccontactslist, '', 1, 'maxwidth300 widthcentpercentminusx');
1915
-			print $form->select_contact($soc->id, $contactid, 'contactid', 1,  empty($srccontactslist) ? "" : $srccontactslist, '', 1, 'maxwidth300 widthcentpercentminusx', true);
1915
+			print $form->select_contact($soc->id, $contactid, 'contactid', 1, empty($srccontactslist) ? "" : $srccontactslist, '', 1, 'maxwidth300 widthcentpercentminusx', true);
1916 1916
 			print '</td></tr>';
1917 1917
 
1918 1918
 			// Ligne info remises tiers
@@ -2023,7 +2023,7 @@  discard block
 block discarded – undo
2023 2023
 		// Other attributes
2024 2024
 		$parameters = array();
2025 2025
 		if (!empty($origin) && !empty($originid) && is_object($objectsrc)) {
2026
-			$parameters['objectsrc'] =  $objectsrc;
2026
+			$parameters['objectsrc'] = $objectsrc;
2027 2027
 		}
2028 2028
 		$parameters['socid'] = $socid;
2029 2029
 
@@ -2240,7 +2240,7 @@  discard block
 block discarded – undo
2240 2240
 			$nbMandated = 0;
2241 2241
 			foreach ($object->lines as $line) {
2242 2242
 				$res = $line->fetch_product();
2243
-				if ($res  > 0) {
2243
+				if ($res > 0) {
2244 2244
 					if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) {
2245 2245
 						$nbMandated++;
2246 2246
 						break;
@@ -2259,7 +2259,7 @@  discard block
 block discarded – undo
2259 2259
 				$deposit_percent_from_payment_terms = (float) getDictionaryValue('c_payment_term', 'deposit_percent', $object->cond_reglement_id);
2260 2260
 
2261 2261
 				if (!empty($deposit_percent_from_payment_terms) && isModEnabled('invoice') && $user->hasRight('facture', 'creer')) {
2262
-					require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
2262
+					require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
2263 2263
 
2264 2264
 					$object->fetchObjectLinked();
2265 2265
 
@@ -2470,7 +2470,7 @@  discard block
 block discarded – undo
2470 2470
 		$morehtmlref = '<div class="refidno">';
2471 2471
 		// Ref customer
2472 2472
 		$morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string', '', 0, 1);
2473
-		$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);
2473
+		$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);
2474 2474
 		// Thirdparty
2475 2475
 		$morehtmlref .= '<br>'.$soc->getNomUrl(1, 'customer');
2476 2476
 		if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $object->thirdparty->id > 0) {
@@ -2793,36 +2793,36 @@  discard block
 block discarded – undo
2793 2793
 
2794 2794
 			$alert = '';
2795 2795
 			if (getDolGlobalString('ORDER_MANAGE_MIN_AMOUNT') && $object->total_ht < $object->thirdparty->order_min_amount) {
2796
-				$alert = ' ' . img_warning($langs->trans('OrderMinAmount') . ': ' . price($object->thirdparty->order_min_amount));
2796
+				$alert = ' '.img_warning($langs->trans('OrderMinAmount').': '.price($object->thirdparty->order_min_amount));
2797 2797
 			}
2798 2798
 
2799 2799
 			print '<tr>';
2800
-			print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>';
2801
-			print '<td class="nowrap amountcard right">' . price($object->total_ht, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
2800
+			print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>';
2801
+			print '<td class="nowrap amountcard right">'.price($object->total_ht, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
2802 2802
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2803 2803
 				// Multicurrency Amount HT
2804
-				print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
2804
+				print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
2805 2805
 			}
2806 2806
 			print '</tr>';
2807 2807
 
2808 2808
 			print '<tr>';
2809
-			print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>';
2810
-			print '<td class="nowrap amountcard right">' . price($object->total_tva, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
2809
+			print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>';
2810
+			print '<td class="nowrap amountcard right">'.price($object->total_tva, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
2811 2811
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2812 2812
 				// Multicurrency Amount VAT
2813
-				print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
2813
+				print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
2814 2814
 			}
2815 2815
 			print '</tr>';
2816 2816
 
2817 2817
 			// Amount Local Taxes
2818 2818
 			if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) {
2819 2819
 				print '<tr>';
2820
-				print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
2821
-				print '<td class="nowrap amountcard right">' . price($object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
2820
+				print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>';
2821
+				print '<td class="nowrap amountcard right">'.price($object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
2822 2822
 				if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2823 2823
 					$object->multicurrency_total_localtax1 = price2num($object->total_localtax1 * $object->multicurrency_tx, 'MT');
2824 2824
 
2825
-					print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
2825
+					print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
2826 2826
 				}
2827 2827
 				print '</tr>';
2828 2828
 			}
@@ -2830,22 +2830,22 @@  discard block
 block discarded – undo
2830 2830
 			// Amount Local Taxes
2831 2831
 			if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) {
2832 2832
 				print '<tr>';
2833
-				print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>';
2834
-				print '<td class="nowrap amountcard right">' . price($object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
2833
+				print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>';
2834
+				print '<td class="nowrap amountcard right">'.price($object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
2835 2835
 				if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2836 2836
 					$object->multicurrency_total_localtax2 = price2num($object->total_localtax2 * $object->multicurrency_tx, 'MT');
2837 2837
 
2838
-					print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
2838
+					print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
2839 2839
 				}
2840 2840
 				print '</tr>';
2841 2841
 			}
2842 2842
 
2843 2843
 			print '<tr>';
2844
-			print '<td>' . $langs->trans('AmountTTC') . '</td>';
2845
-			print '<td class="valuefield nowrap right amountcard">' . price($object->total_ttc, 1, '', 1, -1, -1, $conf->currency) . '</td>';
2844
+			print '<td>'.$langs->trans('AmountTTC').'</td>';
2845
+			print '<td class="valuefield nowrap right amountcard">'.price($object->total_ttc, 1, '', 1, -1, -1, $conf->currency).'</td>';
2846 2846
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2847 2847
 				// Multicurrency Amount TTC
2848
-				print '<td class="valuefield nowrap right amountcard">' . price($object->multicurrency_total_ttc, 1, '', 1, -1, -1, $object->multicurrency_code) . '</td>';
2848
+				print '<td class="valuefield nowrap right amountcard">'.price($object->multicurrency_total_ttc, 1, '', 1, -1, -1, $object->multicurrency_code).'</td>';
2849 2849
 			}
2850 2850
 			print '</tr>'."\n";
2851 2851
 
@@ -2962,7 +2962,7 @@  discard block
 block discarded – undo
2962 2962
 						if ($usercansend) {
2963 2963
 							print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', '');
2964 2964
 						} else {
2965
-							print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER['PHP_SELF']. '#', '', false);
2965
+							print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER['PHP_SELF'].'#', '', false);
2966 2966
 						}
2967 2967
 					}
2968 2968
 				}
@@ -3031,7 +3031,7 @@  discard block
 block discarded – undo
3031 3031
 						}*/
3032 3032
 					} else {
3033 3033
 						$langs->load("errors");
3034
-						print dolGetButtonAction($langs->trans('ErrorModuleSetupNotComplete'), $langs->trans('CreateShipment'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
3034
+						print dolGetButtonAction($langs->trans('ErrorModuleSetupNotComplete'), $langs->trans('CreateShipment'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
3035 3035
 					}
3036 3036
 				}
3037 3037
 
@@ -3093,7 +3093,7 @@  discard block
 block discarded – undo
3093 3093
 					if ($numshipping == 0) {
3094 3094
 						print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id, '');
3095 3095
 					} else {
3096
-						print dolGetButtonAction($langs->trans('ShippingExist'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
3096
+						print dolGetButtonAction($langs->trans('ShippingExist'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
3097 3097
 					}
3098 3098
 				}
3099 3099
 			}
Please login to merge, or discard this patch.