Completed
Branch develop (b49701)
by
unknown
24:08
created
htdocs/core/customreports.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 if ((!is_string($objecttype) || empty($objecttype)) && isModEnabled('societe')) {
135 135
 	$objecttype = 'thirdparty';
136 136
 }
137
-'@phan-var-force string $objecttype';  // Help phan that suggests $objecttype can be null
137
+'@phan-var-force string $objecttype'; // Help phan that suggests $objecttype can be null
138 138
 
139 139
 require_once DOL_DOCUMENT_ROOT."/core/class/extrafields.class.php";
140 140
 require_once DOL_DOCUMENT_ROOT."/core/class/html.form.class.php";
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 }
242 242
 
243 243
 // Fetch optionals attributes and labels
244
-$extrafields->fetch_name_optionals_label('all');	// We load all extrafields definitions for all objects
244
+$extrafields->fetch_name_optionals_label('all'); // We load all extrafields definitions for all objects
245 245
 //$extrafields->fetch_name_optionals_label($object->table_element_line);
246 246
 
247 247
 if (!empty($object->table_element)) {
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 
259 259
 // If string is not an universal filter string, we try to convert it into universal filter syntax string
260 260
 $errorstr = '';
261
-forgeSQLFromUniversalSearchCriteria($search_component_params_input, $errorstr);	// Try conversion UFS->SQL
261
+forgeSQLFromUniversalSearchCriteria($search_component_params_input, $errorstr); // Try conversion UFS->SQL
262 262
 //var_dump($errorstr);
263 263
 if ($errorstr) {
264 264
 	$value = $search_component_params_input;
@@ -270,14 +270,14 @@  discard block
 block discarded – undo
270 270
 	$crits = explode(' ', trim($value)); // the string after the name of the field. Explode on each AND
271 271
 	$res = '';
272 272
 
273
-	$i1 = 0;	// count the nb of and criteria added (all fields / criteria)
273
+	$i1 = 0; // count the nb of and criteria added (all fields / criteria)
274 274
 	foreach ($crits as $crit) {		// Loop on each AND criteria
275 275
 		$crit = trim($crit);
276 276
 
277
-		$i2 = 0;	// count the nb of valid criteria added for this first criteria
277
+		$i2 = 0; // count the nb of valid criteria added for this first criteria
278 278
 		$newres = '';
279 279
 		$tmpcrits = explode('|', $crit);
280
-		$i3 = 0;	// count the nb of valid criteria added for this current field
280
+		$i3 = 0; // count the nb of valid criteria added for this current field
281 281
 		foreach ($tmpcrits as $tmpcrit) {
282 282
 			if ($tmpcrit !== '0' && empty($tmpcrit)) {
283 283
 				continue;
@@ -295,8 +295,8 @@  discard block
 block discarded – undo
295 295
 				}
296 296
 			}
297 297
 
298
-			$field = preg_replace('/(:[!<>=\s]+:|:in:|:notin:|:like:|:notlike:).*$/', '', $tmpcrit);		// the name of the field
299
-			$tmpcrit = preg_replace('/^.*(:[!<>=\s]+:|:in:|:notin:|:like:|:notlike:)/', '\1', $tmpcrit);	// the condition after the name of the field
298
+			$field = preg_replace('/(:[!<>=\s]+:|:in:|:notin:|:like:|:notlike:).*$/', '', $tmpcrit); // the name of the field
299
+			$tmpcrit = preg_replace('/^.*(:[!<>=\s]+:|:in:|:notin:|:like:|:notlike:)/', '\1', $tmpcrit); // the condition after the name of the field
300 300
 			//var_dump($field); var_dump($tmpcrit); var_dump($i3);
301 301
 
302 302
 			$newres .= (($i2 > 0 || $i3 > 0) ? ' OR ' : '');
@@ -686,7 +686,7 @@  discard block
 block discarded – undo
686 686
 		foreach ($arrayofmesures as $key => $val) {
687 687
 			$simplearrayofmesures[$key] = $arrayofmesures[$key]['label'];
688 688
 		}
689
-		print $form->multiselectarray('search_measures', $simplearrayofmesures, $search_measures, 0, 0, 'minwidth300 widthcentpercentminusx', 1, 0, '', '', $langs->transnoentitiesnoconv("Measures"));	// Fill the array $arrayofmeasures with possible fields
689
+		print $form->multiselectarray('search_measures', $simplearrayofmesures, $search_measures, 0, 0, 'minwidth300 widthcentpercentminusx', 1, 0, '', '', $langs->transnoentitiesnoconv("Measures")); // Fill the array $arrayofmeasures with possible fields
690 690
 		print '</div>';
691 691
 
692 692
 		// XAxis
@@ -694,14 +694,14 @@  discard block
 block discarded – undo
694 694
 		print '<div class="divadvancedsearchfield">';
695 695
 		print '<div class="inline-block"><span class="fas fa-ruler-combined paddingright pictofixedwidth" title="'.dol_escape_htmltag($langs->trans("XAxis")).'"></span><span class="fas fa-caret-down caretdownaxis" title="'.dol_escape_htmltag($langs->trans("XAxis")).'"></span></div>';
696 696
 		//var_dump($arrayofxaxis);
697
-		print $formother->selectXAxisField($object, $search_xaxis, $arrayofxaxis, $langs->trans("XAxis"), 'minwidth300 maxwidth400 widthcentpercentminusx');	// Fill the array $arrayofxaxis with possible fields
697
+		print $formother->selectXAxisField($object, $search_xaxis, $arrayofxaxis, $langs->trans("XAxis"), 'minwidth300 maxwidth400 widthcentpercentminusx'); // Fill the array $arrayofxaxis with possible fields
698 698
 		print '</div>';
699 699
 
700 700
 		// Group by
701 701
 		$count = 0;
702 702
 		print '<div class="divadvancedsearchfield">';
703 703
 		print '<div class="inline-block opacitymedium"><span class="fas fa-ruler-horizontal paddingright pictofixedwidth" title="'.dol_escape_htmltag($langs->trans("GroupBy")).'"></span></div>';
704
-		print $formother->selectGroupByField($object, $search_groupby, $arrayofgroupby, 'minwidth250 maxwidth300 widthcentpercentminusx', $langs->trans("GroupBy"));	// Fill the array $arrayofgroupby with possible fields
704
+		print $formother->selectGroupByField($object, $search_groupby, $arrayofgroupby, 'minwidth250 maxwidth300 widthcentpercentminusx', $langs->trans("GroupBy")); // Fill the array $arrayofgroupby with possible fields
705 705
 		print '</div>';
706 706
 	}
707 707
 
@@ -862,7 +862,7 @@  discard block
 block discarded – undo
862 862
 			//var_dump($arrayofgroupby);
863 863
 			$tmpforloop = dolExplodeIntoArray($arrayofxaxis[$val]['tablefromt'], ',');
864 864
 			foreach ($tmpforloop as $tmptable => $tmptablealias) {
865
-				if (! in_array($tmptable, $listoftablesalreadyadded)) {	// We do not add join for main table and tables already added
865
+				if (!in_array($tmptable, $listoftablesalreadyadded)) {	// We do not add join for main table and tables already added
866 866
 					$tmpforexplode = explode('__', $tmptablealias);
867 867
 					$endpart = end($tmpforexplode);
868 868
 					$parenttableandfield = preg_replace('/__'.$endpart.'$/', '', $tmptablealias).'.'.$endpart;
@@ -889,7 +889,7 @@  discard block
 block discarded – undo
889 889
 			//var_dump($arrayofgroupby[$val]); var_dump($tmpval);
890 890
 			$tmpforloop = dolExplodeIntoArray($arrayofgroupby[$val]['tablefromt'], ',');
891 891
 			foreach ($tmpforloop as $tmptable => $tmptablealias) {
892
-				if (! in_array($tmptable, $listoftablesalreadyadded)) {	// We do not add join for main table and tables already added
892
+				if (!in_array($tmptable, $listoftablesalreadyadded)) {	// We do not add join for main table and tables already added
893 893
 					$tmpforexplode = explode('__', $tmptablealias);
894 894
 					$endpart = end($tmpforexplode);
895 895
 					$parenttableandfield = preg_replace('/__'.$endpart.'$/', '', $tmptablealias).'.'.$endpart;
@@ -916,7 +916,7 @@  discard block
 block discarded – undo
916 916
 			//var_dump($arrayofgroupby);
917 917
 			$tmpforloop = dolExplodeIntoArray($arrayofmesures[$val]['tablefromt'], ',');
918 918
 			foreach ($tmpforloop as $tmptable => $tmptablealias) {
919
-				if (! in_array($tmptable, $listoftablesalreadyadded)) {	// We do not add join for main table and tables already added
919
+				if (!in_array($tmptable, $listoftablesalreadyadded)) {	// We do not add join for main table and tables already added
920 920
 					$tmpforexplode = explode('__', $tmptablealias);
921 921
 					$endpart = end($tmpforexplode);
922 922
 					$parenttableandfield = preg_replace('/__'.$endpart.'$/', '', $tmptablealias).'.'.$endpart;
@@ -951,7 +951,7 @@  discard block
 block discarded – undo
951 951
 				$tmpval = explode('.', $val);
952 952
 				$tmpforloop = dolExplodeIntoArray($arrayoffilterfields[$val]['tablefromt'], ',');
953 953
 				foreach ($tmpforloop as $tmptable => $tmptablealias) {
954
-					if (! in_array($tmptable, $listoftablesalreadyadded)) {	// We do not add join for main table and tables already added
954
+					if (!in_array($tmptable, $listoftablesalreadyadded)) {	// We do not add join for main table and tables already added
955 955
 						$tmpforexplode = explode('__', $tmptablealias);
956 956
 						$endpart = end($tmpforexplode);
957 957
 						$parenttableandfield = preg_replace('/__'.$endpart.'$/', '', $tmptablealias).'.'.$endpart;
@@ -987,9 +987,9 @@  discard block
 block discarded – undo
987 987
 			 * @param array<int, string> $matches
988 988
 			 * @return string SQL filter condition
989 989
 			 */
990
-			function (array $matches): string {
990
+			function(array $matches): string {
991 991
 				global $db;
992
-				$column = $matches[1] . '.' . $matches[2];
992
+				$column = $matches[1].'.'.$matches[2];
993 993
 				$operator = $matches[3];
994 994
 				$year = (int) $matches[4];
995 995
 				$month = (int) $matches[5];
Please login to merge, or discard this patch.
htdocs/blockedlog/ajax/block-add.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,9 +48,9 @@
 block discarded – undo
48 48
 
49 49
 $id = GETPOSTINT('id');
50 50
 $element = GETPOST('element', 'alpha');
51
-$action = GETPOST('action', 'aZ09');	// Can be DOC_PREVIEW or DOC_DOWNLOAD
51
+$action = GETPOST('action', 'aZ09'); // Can be DOC_PREVIEW or DOC_DOWNLOAD
52 52
 
53
-if (! in_array($action, array('DOC_PREVIEW', 'DOC_DOWNLOAD'))) {
53
+if (!in_array($action, array('DOC_PREVIEW', 'DOC_DOWNLOAD'))) {
54 54
 	accessforbidden('Bad value for action. Must be DOC_PREVIEW or DOC_DOWNLOAD');
55 55
 }
56 56
 
Please login to merge, or discard this patch.
htdocs/public/members/new.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 		}
250 250
 	}
251 251
 
252
-	if (!$memberfound && GETPOST("morphy") == 'mor' && GETPOSTISSET("societe") ) {
252
+	if (!$memberfound && GETPOST("morphy") == 'mor' && GETPOSTISSET("societe")) {
253 253
 		$sql = "SELECT a.rowid as id";
254 254
 		$sql .= " FROM ".MAIN_DB_PREFIX."adherent as a";
255 255
 		$sql .= " JOIN ".MAIN_DB_PREFIX."societe as s";
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
 	$ok = false;
379 379
 	if (getDolGlobalString('MAIN_SECURITY_ENABLECAPTCHA_MEMBER') && is_object($captchaobj)) {
380 380
 		if (method_exists($captchaobj, 'validateCodeAfterLoginSubmit')) {
381
-			$ok = $captchaobj->validateCodeAfterLoginSubmit();  // @phan-suppress-current-line PhanUndeclaredMethod
381
+			$ok = $captchaobj->validateCodeAfterLoginSubmit(); // @phan-suppress-current-line PhanUndeclaredMethod
382 382
 		} else {
383 383
 			print 'Error, the captcha handler '.get_class($captchaobj).' does not have any method validateCodeAfterLoginSubmit()';
384 384
 		}
@@ -419,9 +419,9 @@  discard block
 block discarded – undo
419 419
 		$adh->note_private = GETPOST('note_private');
420 420
 		$adh->morphy      = getDolGlobalString("MEMBER_NEWFORM_FORCEMORPHY", GETPOST('morphy'));
421 421
 		$adh->birth       = $birthday;
422
-		$adh->phone   = GETPOST('phone');
422
+		$adh->phone = GETPOST('phone');
423 423
 		$adh->phone_perso = GETPOST('phone_perso');
424
-		$adh->phone_mobile= GETPOST('phone_mobile');
424
+		$adh->phone_mobile = GETPOST('phone_mobile');
425 425
 
426 426
 		$adh->ip = getUserRemoteIP();
427 427
 
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
 					$to = $adh->makeSubstitution(getDolGlobalString('MAIN_INFO_SOCIETE_MAIL'));
534 534
 					$from = getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from);
535 535
 					$mailfile = new CMailFile(
536
-						'['.$appli.'] ' . getDolGlobalString('ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT'),
536
+						'['.$appli.'] '.getDolGlobalString('ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT'),
537 537
 						$to,
538 538
 						$from,
539 539
 						$adh->makeSubstitution(getDolGlobalString('ADHERENT_AUTOREGISTER_NOTIF_MAIL')),
@@ -721,7 +721,7 @@  discard block
 block discarded – undo
721 721
 		}
722 722
 	} else {
723 723
 		$adht->fetch(getDolGlobalInt('MEMBER_NEWFORM_FORCETYPE'));
724
-		print '<input type="hidden" id="typeid" name="typeid" value="' . getDolGlobalString('MEMBER_NEWFORM_FORCETYPE').'">';
724
+		print '<input type="hidden" id="typeid" name="typeid" value="'.getDolGlobalString('MEMBER_NEWFORM_FORCETYPE').'">';
725 725
 	}
726 726
 	print '</td></tr>'."\n";
727 727
 
@@ -732,7 +732,7 @@  discard block
 block discarded – undo
732 732
 		"mor" => $langs->trans("Moral"),
733 733
 	];
734 734
 	$checkednature = GETPOST("morphy", 'alpha');
735
-	$listetype_natures = $adht->morphyByType(1);		// Load the array of morphy per type
735
+	$listetype_natures = $adht->morphyByType(1); // Load the array of morphy per type
736 736
 	$listetype_natures_json = json_encode($listetype_natures);
737 737
 
738 738
 	if (!getDolGlobalString('MEMBER_NEWFORM_FORCEMORPHY')) {
@@ -824,7 +824,7 @@  discard block
 block discarded – undo
824 824
 			print '</td></tr>'."\n";
825 825
 	} else {
826 826
 		//print $morphys[$conf->global->MEMBER_NEWFORM_FORCEMORPHY];
827
-		print '<input type="hidden" id="morphy" name="morphy" value="' . getDolGlobalString('MEMBER_NEWFORM_FORCEMORPHY').'">';
827
+		print '<input type="hidden" id="morphy" name="morphy" value="'.getDolGlobalString('MEMBER_NEWFORM_FORCEMORPHY').'">';
828 828
 	}
829 829
 
830 830
 	// Company   // TODO : optional hide
@@ -933,7 +933,7 @@  discard block
 block discarded – undo
933 933
 	}
934 934
 
935 935
 	// Other attributes
936
-	$parameters['tpl_context'] = 'public';	// define template context to public
936
+	$parameters['tpl_context'] = 'public'; // define template context to public
937 937
 	include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
938 938
 
939 939
 	// Comments
@@ -994,14 +994,14 @@  discard block
 block discarded – undo
994 994
 		$adht = new AdherentType($db);
995 995
 		$adht->fetch($typeid);
996 996
 		$caneditamount = $adht->caneditamount;
997
-		$amountbytype = $adht->amountByType(1);		// Load the array of amount per type
997
+		$amountbytype = $adht->amountByType(1); // Load the array of amount per type
998 998
 		foreach ($amountbytype as $k => $v) {
999 999
 			$amount = max(0, (float) $v, (float) getDolGlobalInt("MEMBER_MIN_AMOUNT"));
1000 1000
 			$amountbytype[$k] = $amount;
1001 1001
 		}
1002 1002
 
1003 1003
 		$amountbytype_json = json_encode($amountbytype);
1004
-		$caneditamountbytype = $adht->caneditamountByType(1);		// Load the array of caneditamount per type
1004
+		$caneditamountbytype = $adht->caneditamountByType(1); // Load the array of caneditamount per type
1005 1005
 		$caneditamountbytype_json = json_encode($caneditamountbytype);
1006 1006
 
1007 1007
 
@@ -1025,7 +1025,7 @@  discard block
 block discarded – undo
1025 1025
 
1026 1026
 		print '<tr><td>'.$langs->trans("Subscription");
1027 1027
 		if (getDolGlobalString('MEMBER_EXT_URL_SUBSCRIPTION_INFO')) {
1028
-			print ' - <a href="' . getDolGlobalString('MEMBER_EXT_URL_SUBSCRIPTION_INFO').'" rel="external" target="_blank" rel="noopener noreferrer">'.$langs->trans("SeeHere").'</a>';
1028
+			print ' - <a href="'.getDolGlobalString('MEMBER_EXT_URL_SUBSCRIPTION_INFO').'" rel="external" target="_blank" rel="noopener noreferrer">'.$langs->trans("SeeHere").'</a>';
1029 1029
 		}
1030 1030
 		print '</td><td class="nowrap">';
1031 1031
 
@@ -1087,7 +1087,7 @@  discard block
 block discarded – undo
1087 1087
 	if (getDolGlobalString('MAIN_SECURITY_ENABLECAPTCHA_MEMBER') && is_object($captchaobj)) {
1088 1088
 		print '<tr><td><label><span class="fieldrequired">'.$langs->trans("SecurityCode").'</span></label></td><td><br>';
1089 1089
 		if (method_exists($captchaobj, 'getCaptchaCodeForForm')) {
1090
-			print $captchaobj->getCaptchaCodeForForm('');  // @phan-suppress-current-line PhanUndeclaredMethod
1090
+			print $captchaobj->getCaptchaCodeForForm(''); // @phan-suppress-current-line PhanUndeclaredMethod
1091 1091
 		} else {
1092 1092
 			print 'Error, the captcha handler '.get_class($captchaobj).' does not have any method getCaptchaCodeForForm()';
1093 1093
 		}
@@ -1155,10 +1155,10 @@  discard block
 block discarded – undo
1155 1155
 
1156 1156
 		$i = 0;
1157 1157
 		while ($i < $num) {
1158
-			$objp = $db->fetch_object($result);	// Load the member type and information on it
1158
+			$objp = $db->fetch_object($result); // Load the member type and information on it
1159 1159
 
1160 1160
 			$caneditamount = $objp->caneditamount;
1161
-			$amountbytype = $adht->amountByType(1);		// Load the array of amount per type
1161
+			$amountbytype = $adht->amountByType(1); // Load the array of amount per type
1162 1162
 
1163 1163
 			print '<tr class="oddeven">';
1164 1164
 			// Label
Please login to merge, or discard this patch.
htdocs/public/stripe/ipn.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -205,12 +205,12 @@  discard block
 block discarded – undo
205 205
 		if (!empty($user->email)) {
206 206
 			$sendto = dolGetFirstLastname($user->firstname, $user->lastname)." <".$user->email.">";
207 207
 		} else {
208
-			$sendto = getDolGlobalString('MAIN_INFO_SOCIETE_MAIL') . '" <' . getDolGlobalString('MAIN_INFO_SOCIETE_MAIL').'>';
208
+			$sendto = getDolGlobalString('MAIN_INFO_SOCIETE_MAIL').'" <'.getDolGlobalString('MAIN_INFO_SOCIETE_MAIL').'>';
209 209
 		}
210 210
 		$replyto = $sendto;
211 211
 		$sendtocc = '';
212 212
 		if (getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL')) {
213
-			$sendtocc = getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL') . '" <' . getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL').'>';
213
+			$sendtocc = getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL').'" <'.getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL').'>';
214 214
 		}
215 215
 
216 216
 		$message = "A bank transfer of ".price2num($event->data->object->amount / 100)." ".$event->data->object->currency." should arrive in your account the ".dol_print_date($event->data->object->arrival_date, 'dayhour');
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 			$typefrom = 'PRE';
272 272
 			$typeto = 'VIR';
273 273
 
274
-			$numChqOrOpe = '';	// TODO Store the po ref from $event->data
274
+			$numChqOrOpe = ''; // TODO Store the po ref from $event->data
275 275
 
276 276
 			$db->begin();
277 277
 
@@ -365,12 +365,12 @@  discard block
 block discarded – undo
365 365
 	dol_syslog("object = ".var_export($event->data, true));
366 366
 	dol_syslog("object = ".var_export($event->data, true), LOG_DEBUG, 0, '_payment');
367 367
 
368
-	include_once DOL_DOCUMENT_ROOT . '/compta/paiement/class/paiement.class.php';
368
+	include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
369 369
 	global $stripearrayofkeysbyenv;
370 370
 	$error = 0;
371 371
 	$object = $event->data->object;
372 372
 	$objectType = $object->metadata->dol_type;
373
-	$TRANSACTIONID = $object->id;	// Example 'pi_123456789...'
373
+	$TRANSACTIONID = $object->id; // Example 'pi_123456789...'
374 374
 	$ipaddress = $object->metadata->ipaddress;
375 375
 	$now = dol_now();
376 376
 	$currencyCodeType = strtoupper($object->currency);
@@ -379,8 +379,8 @@  discard block
 block discarded – undo
379 379
 	$invoice_id = 0;
380 380
 	$supplierinvoice_id = 0;
381 381
 	$salary_id = "";
382
-	$paymentTypeCode = "";				// payment type according to Stripe
383
-	$paymentTypeCodeInDolibarr = "";	// payment type according to Dolibarr
382
+	$paymentTypeCode = ""; // payment type according to Stripe
383
+	$paymentTypeCodeInDolibarr = ""; // payment type according to Dolibarr
384 384
 	$payment_amount = 0;
385 385
 	$payment_amountInDolibarr = 0;
386 386
 
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
 		$s = new \Stripe\StripeClient($stripeacc);
456 456
 
457 457
 		$paymentmethodstripe = $s->paymentMethods->retrieve($paymentmethodstripeid);
458
-		$paymentTypeCode =  $paymentmethodstripe->type;
458
+		$paymentTypeCode = $paymentmethodstripe->type;
459 459
 		if ($paymentTypeCode == "ban" || $paymentTypeCode == "sepa_debit") {
460 460
 			$paymentTypeCode = "PRE";
461 461
 		} elseif ($paymentTypeCode == "card") {
@@ -486,9 +486,9 @@  discard block
 block discarded – undo
486 486
 			$paiement->datepaye = $now;
487 487
 			$paiement->date = $now;
488 488
 			if ($currencyCodeType == getDolCurrency()) {
489
-				$paiement->amounts = [$invoice_id => $payment_amount];   // Array with all payments dispatching with invoice id
489
+				$paiement->amounts = [$invoice_id => $payment_amount]; // Array with all payments dispatching with invoice id
490 490
 			} else {
491
-				$paiement->multicurrency_amounts = [$invoice_id => $payment_amount];   // Array with all payments dispatching
491
+				$paiement->multicurrency_amounts = [$invoice_id => $payment_amount]; // Array with all payments dispatching
492 492
 
493 493
 				$postactionmessages[] = 'Payment was done in a currency ('.$currencyCodeType.') other than the expected currency of company ('.getDolCurrency().')';
494 494
 				$ispostactionok = -1;
@@ -511,9 +511,9 @@  discard block
 block discarded – undo
511 511
 
512 512
 			$paiement->num_payment = '';
513 513
 			$paiement->note_public = '';
514
-			$paiement->note_private = 'Stripe Sepa payment received by IPN service listening webhooks - ' . dol_print_date($now, 'standard') . ' (TZ server) using servicestatus=' . $servicestatus . ($ipaddress ? ' from ip ' . $ipaddress : '') . ' - Transaction ID = ' . $TRANSACTIONID;
514
+			$paiement->note_private = 'Stripe Sepa payment received by IPN service listening webhooks - '.dol_print_date($now, 'standard').' (TZ server) using servicestatus='.$servicestatus.($ipaddress ? ' from ip '.$ipaddress : '').' - Transaction ID = '.$TRANSACTIONID;
515 515
 
516
-			$paiement->ext_payment_id = $TRANSACTIONID.':'.$customer_id.'@'.$stripearrayofkeysbyenv[$servicestatus]['publishable_key'];		// May be we should store py_... instead of pi_... but we started with pi_... so we continue.
516
+			$paiement->ext_payment_id = $TRANSACTIONID.':'.$customer_id.'@'.$stripearrayofkeysbyenv[$servicestatus]['publishable_key']; // May be we should store py_... instead of pi_... but we started with pi_... so we continue.
517 517
 			$paiement->ext_payment_site = $service;
518 518
 
519 519
 			$ispaymentdone = 0;
@@ -532,23 +532,23 @@  discard block
 block discarded – undo
532 532
 			$db->begin();
533 533
 
534 534
 			if (!$error && !$ispaymentdone) {
535
-				dol_syslog('* Record payment type PRE for invoice id ' . $invoice_id . '. It includes closing of invoice and regenerating document.');
536
-				dol_syslog('* Record payment type PRE for invoice id ' . $invoice_id . '. It includes closing of invoice and regenerating document.', LOG_DEBUG, 0, '_payment');
535
+				dol_syslog('* Record payment type PRE for invoice id '.$invoice_id.'. It includes closing of invoice and regenerating document.');
536
+				dol_syslog('* Record payment type PRE for invoice id '.$invoice_id.'. It includes closing of invoice and regenerating document.', LOG_DEBUG, 0, '_payment');
537 537
 
538 538
 				// This include closing invoices to 'paid' (and trigger including unsuspending) and regenerating document
539 539
 				$paiement_id = $paiement->create($user, 1);
540 540
 				if ($paiement_id < 0) {
541
-					$postactionmessages[] = $paiement->error . ($paiement->error ? ' ' : '') . implode("<br>\n", $paiement->errors);
541
+					$postactionmessages[] = $paiement->error.($paiement->error ? ' ' : '').implode("<br>\n", $paiement->errors);
542 542
 					$ispostactionok = -1;
543 543
 					$error++;
544 544
 
545
-					dol_syslog("Failed to create the payment for invoice id " . $invoice_id);
546
-					dol_syslog("Failed to create the payment for invoice id " . $invoice_id, LOG_DEBUG, 0, '_payment');
545
+					dol_syslog("Failed to create the payment for invoice id ".$invoice_id);
546
+					dol_syslog("Failed to create the payment for invoice id ".$invoice_id, LOG_DEBUG, 0, '_payment');
547 547
 				} else {
548 548
 					$postactionmessages[] = 'Payment created';
549 549
 
550
-					dol_syslog("The payment has been created for invoice id " . $invoice_id);
551
-					dol_syslog("The payment has been created for invoice id " . $invoice_id, LOG_DEBUG, 0, '_payment');
550
+					dol_syslog("The payment has been created for invoice id ".$invoice_id);
551
+					dol_syslog("The payment has been created for invoice id ".$invoice_id, LOG_DEBUG, 0, '_payment');
552 552
 				}
553 553
 			}
554 554
 
@@ -580,14 +580,14 @@  discard block
 block discarded – undo
580 580
 						$label = '(CustomerInvoicePayment)';
581 581
 						$result = $paiement->addPaymentToBank($user, 'payment', $label, $bankaccountid, $customer_id, '');
582 582
 						if ($result < 0) {
583
-							$postactionmessages[] = $paiement->error . ($paiement->error ? ' ' : '') . implode("<br>\n", $paiement->errors);
583
+							$postactionmessages[] = $paiement->error.($paiement->error ? ' ' : '').implode("<br>\n", $paiement->errors);
584 584
 							$ispostactionok = -1;
585 585
 							$error++;
586 586
 						} else {
587 587
 							$postactionmessages[] = 'Bank transaction of payment created (by ipn.php file)';
588 588
 						}
589 589
 					} else {
590
-						$postactionmessages[] = 'Setup of bank account to use in module ' . $paymentmethod . ' was not set. No way to record the payment.';
590
+						$postactionmessages[] = 'Setup of bank account to use in module '.$paymentmethod.' was not set. No way to record the payment.';
591 591
 						$ispostactionok = -1;
592 592
 						$error++;
593 593
 					}
@@ -669,17 +669,17 @@  discard block
 block discarded – undo
669 669
 					$outputlangs->loadLangs(array("main", "members", "bills"));
670 670
 
671 671
 					// Get email content from template
672
-					$arraydefaultmessage=null;
672
+					$arraydefaultmessage = null;
673 673
 
674 674
 					include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
675
-					$formmail=new FormMail($db);
675
+					$formmail = new FormMail($db);
676 676
 
677 677
 					$arraydefaultmessage = $formmail->getEMailTemplate($db, 'facture_send', $user, $outputlangs, 0, 1, $labeltouse);
678 678
 
679 679
 					$appli = $mysoc->name;
680 680
 
681 681
 					$subject = '['.$appli.'] Invoice direct debit payment recevied';
682
-					$msg =  'An invoice direct debit payment for invoice '.$invoice->ref.' has been recevied';
682
+					$msg = 'An invoice direct debit payment for invoice '.$invoice->ref.' has been recevied';
683 683
 					if (is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) {
684 684
 						$subject = $arraydefaultmessage->topic;
685 685
 						$msg     = $arraydefaultmessage->content;
@@ -700,7 +700,7 @@  discard block
 block discarded – undo
700 700
 							/** @var Contrat $contract */
701 701
 							'@phan-var-force Contrat $contract';
702 702
 							$substitutionarray['__CONTRACT_REF__'] = $contract->ref_customer;
703
-							$substitutionarray['__REFCLIENT__'] = $contract->ref_customer;	// For backward compatibility
703
+							$substitutionarray['__REFCLIENT__'] = $contract->ref_customer; // For backward compatibility
704 704
 							$substitutionarray['__REF_CLIENT__'] = $contract->ref_customer;
705 705
 							$substitutionarray['__REF_CUSTOMER__'] = $contract->ref_customer;
706 706
 							$foundcontract = $contract;
@@ -714,9 +714,9 @@  discard block
 block discarded – undo
714 714
 					$texttosend = make_substitutions($msg, $substitutionarray, $outputlangs);
715 715
 
716 716
 					// Attach a file ?
717
-					$listofpaths=array();
718
-					$listofnames=array();
719
-					$listofmimes=array();
717
+					$listofpaths = array();
718
+					$listofnames = array();
719
+					$listofmimes = array();
720 720
 
721 721
 					/*
722 722
 					$invoicediroutput = $conf->invoice->dir_output;
@@ -862,7 +862,7 @@  discard block
 block discarded – undo
862 862
 			$error++;
863 863
 		}
864 864
 
865
-		if (! $error) {
865
+		if (!$error) {
866 866
 			$db->commit();
867 867
 		} else {
868 868
 			$db->rollback();
@@ -896,7 +896,7 @@  discard block
 block discarded – undo
896 896
 		$companypaymentmode->card_type       = $event->data->object->card->branding;
897 897
 
898 898
 		$companypaymentmode->owner_name      = $event->data->object->billing_details->name;
899
-		$companypaymentmode->proprio         = $companypaymentmode->owner_name;			// We may still need this for modulebuilder code because name of field is "proprio"
899
+		$companypaymentmode->proprio         = $companypaymentmode->owner_name; // We may still need this for modulebuilder code because name of field is "proprio"
900 900
 
901 901
 		$companypaymentmode->exp_date_month  = (int) $event->data->object->card->exp_month;
902 902
 		$companypaymentmode->exp_date_year   = (int) $event->data->object->card->exp_year;
@@ -938,7 +938,7 @@  discard block
 block discarded – undo
938 938
 		$companypaymentmode->label           = '';
939 939
 		$companypaymentmode->number          = $db->escape($event->data->object->id);
940 940
 		$companypaymentmode->last_four       = $db->escape($event->data->object->card->last4);
941
-		$companypaymentmode->proprio         = $db->escape($event->data->object->billing_details->name);	// deprecated but still needed
941
+		$companypaymentmode->proprio         = $db->escape($event->data->object->billing_details->name); // deprecated but still needed
942 942
 		$companypaymentmode->owner_name      = $db->escape($event->data->object->billing_details->name);
943 943
 		$companypaymentmode->exp_date_month  = (int) $event->data->object->card->exp_month;
944 944
 		$companypaymentmode->exp_date_year   = (int) $event->data->object->card->exp_year;
@@ -994,8 +994,8 @@  discard block
 block discarded – undo
994 994
 	$paymentmethodstripeid = $object->payment_method;
995 995
 	$customer_id = $object->customer;
996 996
 	$reason = $object->reason;
997
-	$amountdisputestripe = $object->amount;			// In stripe format
998
-	$amountdispute = $stripe->convertAmount($amountdisputestripe, $currencyCodeType, 1);			// In real currency format
997
+	$amountdisputestripe = $object->amount; // In stripe format
998
+	$amountdispute = $stripe->convertAmount($amountdisputestripe, $currencyCodeType, 1); // In real currency format
999 999
 	$statusdispute = $object->status;
1000 1000
 
1001 1001
 	$pkey = '';
@@ -1010,15 +1010,15 @@  discard block
 block discarded – undo
1010 1010
 	if (!empty($balance_transactions_array) && is_array($balance_transactions_array)) {
1011 1011
 		foreach ($balance_transactions_array as $tmpval) {
1012 1012
 			if (isset($tmpval['fee'])) {
1013
-				$feesstripe += (int) $tmpval['fee'];		// In stripe format
1013
+				$feesstripe += (int) $tmpval['fee']; // In stripe format
1014 1014
 			}
1015 1015
 		}
1016 1016
 	}
1017
-	$fees = $stripe->convertAmount($feesstripe, $currencyCodeType, 1);			// In real currency format
1017
+	$fees = $stripe->convertAmount($feesstripe, $currencyCodeType, 1); // In real currency format
1018 1018
 
1019 1019
 	$invoice_id = 0;
1020
-	$paymentTypeCode = "";			// payment type according to Stripe
1021
-	$paymentTypeCodeInDolibarr = "";	// payment type according to Dolibarr
1020
+	$paymentTypeCode = ""; // payment type according to Stripe
1021
+	$paymentTypeCodeInDolibarr = ""; // payment type according to Dolibarr
1022 1022
 	$payment_amount = 0;
1023 1023
 	$payment_amountInDolibarr = 0;
1024 1024
 
@@ -1098,7 +1098,7 @@  discard block
 block discarded – undo
1098 1098
 		// If invoice was closed, we reopen it
1099 1099
 		if ($tmpinvoice->status == Facture::STATUS_CLOSED) {
1100 1100
 			// Switch back the invoice to status validated
1101
-			$result = $tmpinvoice->setStatut(Facture::STATUS_VALIDATED, null, '', 'none');	// Trigger will be run later
1101
+			$result = $tmpinvoice->setStatut(Facture::STATUS_VALIDATED, null, '', 'none'); // Trigger will be run later
1102 1102
 			if ($result < 0) {
1103 1103
 				$errormsg = $tmpinvoice->error.implode(', ', $tmpinvoice->errors);
1104 1104
 				$error++;
@@ -1170,7 +1170,7 @@  discard block
 block discarded – undo
1170 1170
 		$paiement->multicurrency_tx = $multicurrency_tx; // Array with all currency tx of payments dispatching
1171 1171
 		*/
1172 1172
 		$paiement->paiementid   = dol_getIdFromCode($db, 'PRE', 'c_paiement', 'code', 'id', 1);
1173
-		$paiement->num_payment  = $object->id;	// A string like 'du_...'
1173
+		$paiement->num_payment  = $object->id; // A string like 'du_...'
1174 1174
 		$paiement->note_public = 'Fund withdrawn by bank. Reason: '.$reason;
1175 1175
 		$paiement->note_private = '';
1176 1176
 		$paiement->fk_account   = $accountfrom->id;
@@ -1186,7 +1186,7 @@  discard block
 block discarded – undo
1186 1186
 			$error++;
1187 1187
 		}
1188 1188
 
1189
-		if (! $error && $tmpinvoice->status == Facture::STATUS_CLOSED) {
1189
+		if (!$error && $tmpinvoice->status == Facture::STATUS_CLOSED) {
1190 1190
 			// Switch back the invoice to status validated
1191 1191
 			$result = $tmpinvoice->setStatut(Facture::STATUS_VALIDATED, null, '', 'none');
1192 1192
 			if ($result < 0) {
@@ -1201,7 +1201,7 @@  discard block
 block discarded – undo
1201 1201
 			}
1202 1202
 		}
1203 1203
 
1204
-		if (! $error) {
1204
+		if (!$error) {
1205 1205
 			$paiement_id = $paiement->create($user, 0, $tmpinvoice->thirdparty); // This include regenerating documents
1206 1206
 			if ($paiement_id < 0) {
1207 1207
 				$errormsg = $paiement->error.implode(', ', $paiement->errors);
Please login to merge, or discard this patch.
htdocs/expedition/card.php 1 patch
Spacing   +366 added lines, -366 removed lines patch added patch discarded remove patch
@@ -49,29 +49,29 @@  discard block
 block discarded – undo
49 49
  * @var User $user
50 50
  */
51 51
 
52
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php';
53
-require_once DOL_DOCUMENT_ROOT . '/expedition/class/expedition.class.php';
54
-require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
55
-require_once DOL_DOCUMENT_ROOT . '/core/lib/product.lib.php';
56
-require_once DOL_DOCUMENT_ROOT . '/core/lib/sendings.lib.php';
57
-require_once DOL_DOCUMENT_ROOT . '/core/modules/expedition/modules_expedition.php';
58
-require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
59
-require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php';
60
-require_once DOL_DOCUMENT_ROOT . '/product/stock/class/entrepot.class.php';
61
-require_once DOL_DOCUMENT_ROOT . '/product/stock/class/productlot.class.php';
62
-require_once DOL_DOCUMENT_ROOT . '/commande/class/commande.class.php';
52
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
53
+require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php';
54
+require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
55
+require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
56
+require_once DOL_DOCUMENT_ROOT.'/core/lib/sendings.lib.php';
57
+require_once DOL_DOCUMENT_ROOT.'/core/modules/expedition/modules_expedition.php';
58
+require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
59
+require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
60
+require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
61
+require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php';
62
+require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
63 63
 if (isModEnabled("product") || isModEnabled("service")) {
64
-	require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
64
+	require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
65 65
 }
66 66
 if (isModEnabled("propal")) {
67
-	require_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php';
67
+	require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
68 68
 }
69 69
 if (isModEnabled('productbatch')) {
70
-	require_once DOL_DOCUMENT_ROOT . '/product/class/productbatch.class.php';
70
+	require_once DOL_DOCUMENT_ROOT.'/product/class/productbatch.class.php';
71 71
 }
72 72
 if (isModEnabled('project')) {
73
-	require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
74
-	require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php';
73
+	require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
74
+	require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
75 75
 }
76 76
 
77 77
 // Load translation files required by the page
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 if (empty($origin_id) && !empty($origin)) {
97 97
 	$origin_id  = GETPOSTINT('object_id'); // Id of order or propal
98 98
 }
99
-$socid  =  GETPOSTINT('socid');
99
+$socid = GETPOSTINT('socid');
100 100
 $ref = GETPOST('ref', 'alpha');
101 101
 $line_id = GETPOSTINT('lineid');
102 102
 $facid = GETPOSTINT('facid');
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 $confirm = GETPOST('confirm', 'alpha');
107 107
 $cancel = GETPOST('cancel', 'alpha');
108 108
 $rank      = (GETPOSTINT('rank') > 0) ? GETPOSTINT('rank') : -1;
109
-$lineid    =  GETPOSTINT('lineid');
109
+$lineid    = GETPOSTINT('lineid');
110 110
 $backtopage = GETPOST('backtopage', 'alpha');
111 111
 
112 112
 //PDF
@@ -124,12 +124,12 @@  discard block
 block discarded – undo
124 124
 $extrafields->fetch_name_optionals_label($objectorder->table_element_line);
125 125
 
126 126
 // Load object. Make an object->fetch
127
-include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'
127
+include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'
128 128
 
129 129
 // Permissions / Rights
130
-$usercanread    =  $user->hasRight("expedition", "lire");
131
-$usercancreate  =  $user->hasRight("expedition", "creer");
132
-$usercandelete  =  $user->hasRight("expedition", "supprimer");
130
+$usercanread    = $user->hasRight("expedition", "lire");
131
+$usercancreate  = $user->hasRight("expedition", "creer");
132
+$usercandelete  = $user->hasRight("expedition", "supprimer");
133 133
 
134 134
 // Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
135 135
 $hookmanager->initHooks(array('expeditioncard', 'globalcard'));
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 	$permissiontoeditextra = dol_eval((string) $extrafields->attributes[$object->table_element]['perms'][GETPOST('attribute', 'aZ09')]);
158 158
 }
159 159
 
160
-$upload_dir = $conf->expedition->dir_output . '/sending';
160
+$upload_dir = $conf->expedition->dir_output.'/sending';
161 161
 
162 162
 $editColspan = 0;
163 163
 $objectsrc = null;
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 	if ($cancel) {
208 208
 		if ($origin_id > 0) {
209 209
 			if ($origin == 'commande') {
210
-				header("Location: " . DOL_URL_ROOT . '/expedition/shipment.php?id=' . ((int) $origin_id));
210
+				header("Location: ".DOL_URL_ROOT.'/expedition/shipment.php?id='.((int) $origin_id));
211 211
 				exit;
212 212
 			}
213 213
 		} else {
@@ -216,10 +216,10 @@  discard block
 block discarded – undo
216 216
 		}
217 217
 	}
218 218
 
219
-	include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once'
219
+	include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once'
220 220
 
221 221
 	// Actions to build doc
222
-	include DOL_DOCUMENT_ROOT . '/core/actions_builddoc.inc.php';
222
+	include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
223 223
 
224 224
 	// Back to draft
225 225
 	if ($action == 'setdraft' && $permissiontoadd) {
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 		if ($result < 0) {
229 229
 			setEventMessages($object->error, $object->errors, 'errors');
230 230
 		} else {
231
-			header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id);
231
+			header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
232 232
 			exit;
233 233
 		}
234 234
 	}
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 		if ($result < 0) {
240 240
 			setEventMessages($object->error, $object->errors, 'errors');
241 241
 		} else {
242
-			header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id);
242
+			header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
243 243
 			exit;
244 244
 		}
245 245
 	}
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 			setEventMessages($object->error, $object->errors, 'errors');
261 261
 			$action = 'editref_customer';
262 262
 		} else {
263
-			header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id);
263
+			header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
264 264
 			exit;
265 265
 		}
266 266
 	}
@@ -389,16 +389,16 @@  discard block
 block discarded – undo
389 389
 			$product_batch_used = array();
390 390
 
391 391
 			for ($i = 0; $i < $num; $i++) {
392
-				$idl = "idl" . $i;
392
+				$idl = "idl".$i;
393 393
 
394 394
 				$sub_qty = array();
395 395
 				$subtotalqty = 0;
396 396
 
397 397
 				$j = 0;
398 398
 
399
-				$batch = "batchl" . $i . "_0";
400
-				$stockLocation = "ent1" . $i . "_0";
401
-				$qty = "qtyl" . $i;
399
+				$batch = "batchl".$i."_0";
400
+				$stockLocation = "ent1".$i."_0";
401
+				$qty = "qtyl".$i;
402 402
 
403 403
 				$is_batch_or_serial = 0;
404 404
 				if (!empty($objectsrc->lines[$i]->fk_product)) {
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
 				if (isModEnabled('productbatch') && $objectsrc->lines[$i]->product_tobatch) {
414 414
 					if (GETPOSTISSET($batch)) {
415 415
 						//shipment line with batch-enable product
416
-						$qty .= '_' . $j;
416
+						$qty .= '_'.$j;
417 417
 						while (GETPOSTISSET($batch)) {
418 418
 							// save line of detail into sub_qty
419 419
 							$sub_qty[$j]['q'] = price2num(GETPOST($qty, 'alpha'), 'MS'); // the qty we want to move for this stock record
@@ -432,8 +432,8 @@  discard block
 block discarded – undo
432 432
 							}
433 433
 
434 434
 							$j++;
435
-							$batch = "batchl" . $i . "_" . $j;
436
-							$qty = "qtyl" . $i . '_' . $j;
435
+							$batch = "batchl".$i."_".$j;
436
+							$qty = "qtyl".$i.'_'.$j;
437 437
 						}
438 438
 
439 439
 							$batch_line[$i]['detail'] = $sub_qty; // array of details
@@ -447,13 +447,13 @@  discard block
 block discarded – undo
447 447
 							// We try to set an amount
448 448
 							// Case we don't use the list of available qty for each warehouse/lot
449 449
 							// GUI does not allow this yet
450
-							setEventMessages($langs->trans("StockIsRequiredToChooseWhichLotToUse") . ' (' . $langs->trans("Line") . ' ' . GETPOSTINT($idl) . ')', null, 'errors');
450
+							setEventMessages($langs->trans("StockIsRequiredToChooseWhichLotToUse").' ('.$langs->trans("Line").' '.GETPOSTINT($idl).')', null, 'errors');
451 451
 							$error++;
452 452
 						}
453 453
 					}
454 454
 				} elseif (GETPOSTISSET($stockLocation)) {
455 455
 					//shipment line from multiple stock locations
456
-					$qty .= '_' . $j;
456
+					$qty .= '_'.$j;
457 457
 					while (GETPOSTISSET($stockLocation)) {
458 458
 						// save sub line of warehouse
459 459
 						$stockLine[$i][$j]['qty'] = price2num(GETPOST($qty, 'alpha'), 'MS');
@@ -464,8 +464,8 @@  discard block
 block discarded – undo
464 464
 						$subtotalqty += price2num(GETPOST($qty, 'alpha'), 'MS');
465 465
 
466 466
 						$j++;
467
-						$stockLocation = "ent1" . $i . "_" . $j;
468
-						$qty = "qtyl" . $i . '_' . $j;
467
+						$stockLocation = "ent1".$i."_".$j;
468
+						$qty = "qtyl".$i.'_'.$j;
469 469
 					}
470 470
 				} else {
471 471
 					//shipment line for product with no batch management and no multiple stock location
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
 				if (isset($extrafields->attributes[$object->table_element_line]['label']) && is_array($extrafields->attributes[$object->table_element_line]['label'])) {
489 489
 					// Get extra fields
490 490
 					foreach ($extrafields->attributes[$object->table_element_line]['label'] as $key => $value) {
491
-						unset($_POST["options_" . $key]);
491
+						unset($_POST["options_".$key]);
492 492
 					}
493 493
 				}
494 494
 			}
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
 			if (($totalqty > 0 || getDolGlobalString('SHIPMENT_GETS_ALL_ORDER_PRODUCTS')) && !$error) {		// There is at least one thing to ship and no error
497 497
 				$selected_subtotal_lines = GETPOST('subtotal_toselect', 'array:int');
498 498
 				for ($i = 0; $i < $num; $i++) {
499
-					$qty = "qtyl" . $i;
499
+					$qty = "qtyl".$i;
500 500
 
501 501
 					if (!isset($batch_line[$i])) {
502 502
 						// not batch mode
@@ -514,8 +514,8 @@  discard block
 block discarded – undo
514 514
 							}
515 515
 						} else {
516 516
 							if (GETPOSTFLOAT($qty) > 0 || getDolGlobalString('SHIPMENT_GETS_ALL_ORDER_PRODUCTS')) {
517
-								$ent = "entl" . $i;
518
-								$idl = "idl" . $i;
517
+								$ent = "entl".$i;
518
+								$idl = "idl".$i;
519 519
 								$entrepot_id = is_numeric(GETPOSTINT($ent)) ? GETPOSTINT($ent) : GETPOSTINT('entrepot_id');
520 520
 								if ($entrepot_id < 0) {
521 521
 									$entrepot_id = '';
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
 			} elseif (!$error) {
570 570
 				$labelfieldmissing = $langs->transnoentitiesnoconv("QtyToShip");
571 571
 				if (isModEnabled('stock')) {
572
-					$labelfieldmissing .= '/' . $langs->transnoentitiesnoconv("Warehouse");
572
+					$labelfieldmissing .= '/'.$langs->transnoentitiesnoconv("Warehouse");
573 573
 				}
574 574
 				setEventMessages($langs->trans("ErrorFieldRequired", $labelfieldmissing), null, 'errors');
575 575
 				$error++;
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
 				$line->extraparams = $objectsrc_line->extraparams;
586 586
 				$line->setExtraParameters();
587 587
 			}
588
-			header("Location: card.php?id=" . $object->id);
588
+			header("Location: card.php?id=".$object->id);
589 589
 			exit;
590 590
 		} else {
591 591
 			$db->rollback();
@@ -600,7 +600,7 @@  discard block
 block discarded – undo
600 600
 		if ($result > 0) {
601 601
 			$db->commit();
602 602
 
603
-			header("Location: " . DOL_URL_ROOT . '/delivery/card.php?action=create_delivery&token=' . newToken() . '&id=' . $result);
603
+			header("Location: ".DOL_URL_ROOT.'/delivery/card.php?action=create_delivery&token='.newToken().'&id='.$result);
604 604
 			exit;
605 605
 		} else {
606 606
 			$db->rollback();
@@ -653,7 +653,7 @@  discard block
 block discarded – undo
653 653
 		$also_update_stock = (GETPOST('alsoUpdateStock', 'alpha') ? 1 : 0);
654 654
 		$result = $object->delete($user, 0, (bool) $also_update_stock);
655 655
 		if ($result > 0) {
656
-			header("Location: " . DOL_URL_ROOT . '/expedition/index.php');
656
+			header("Location: ".DOL_URL_ROOT.'/expedition/index.php');
657 657
 			exit;
658 658
 		} else {
659 659
 			setEventMessages($object->error, $object->errors, 'errors');
@@ -690,7 +690,7 @@  discard block
 block discarded – undo
690 690
 				$object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
691 691
 			}
692 692
 
693
-			header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
693
+			header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
694 694
 			exit;
695 695
 		} else {
696 696
 			setEventMessages($object->error, $object->errors, 'errors');
@@ -719,7 +719,7 @@  discard block
 block discarded – undo
719 719
 				$object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
720 720
 			}
721 721
 
722
-			header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
722
+			header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
723 723
 			exit;
724 724
 		} else {
725 725
 			setEventMessages($object->error, $object->errors, 'errors');
@@ -727,7 +727,7 @@  discard block
 block discarded – undo
727 727
 	} elseif ($action == 'confirm_sign' && $confirm == 'yes' && $user->hasRight('expedition', 'creer')) {
728 728
 		$result = $object->setSignedStatus($user, GETPOSTINT('signed_status'), 0, 'SHIPPING_MODIFY');
729 729
 		if ($result >= 0) {
730
-			header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
730
+			header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
731 731
 			exit;
732 732
 		} else {
733 733
 			setEventMessages($object->error, $object->errors, 'errors');
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
 	} elseif ($action == 'confirm_unsign' && $confirm == 'yes' && $user->hasRight('expedition', 'creer')) {
736 736
 		$result = $object->setSignedStatus($user, Expedition::$SIGNED_STATUSES['STATUS_NO_SIGNATURE'], 0, 'SHIPPING_MODIFY');
737 737
 		if ($result >= 0) {
738
-			header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
738
+			header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
739 739
 			exit;
740 740
 		} else {
741 741
 			setEventMessages($object->error, $object->errors, 'errors');
@@ -744,7 +744,7 @@  discard block
 block discarded – undo
744 744
 		$datedelivery = dol_mktime(GETPOSTINT('liv_hour'), GETPOSTINT('liv_min'), 0, GETPOSTINT('liv_month'), GETPOSTINT('liv_day'), GETPOSTINT('liv_year'));
745 745
 
746 746
 		$object->fetch($id);
747
-		$result = $object->setDeliveryDate($user, $datedelivery);	// Set the planned delivery date
747
+		$result = $object->setDeliveryDate($user, $datedelivery); // Set the planned delivery date
748 748
 		if ($result < 0) {
749 749
 			setEventMessages($object->error, $object->errors, 'errors');
750 750
 		}
@@ -785,7 +785,7 @@  discard block
 block discarded – undo
785 785
 		}
786 786
 
787 787
 		if ($object->update($user) >= 0) {
788
-			header("Location: card.php?id=" . $object->id);
788
+			header("Location: card.php?id=".$object->id);
789 789
 			exit;
790 790
 		}
791 791
 		setEventMessages($object->error, $object->errors, 'errors');
@@ -794,7 +794,7 @@  discard block
 block discarded – undo
794 794
 		$object->fetch($id);
795 795
 		$result = $object->setBilled();
796 796
 		if ($result >= 0) {
797
-			header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
797
+			header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
798 798
 			exit();
799 799
 		}
800 800
 		setEventMessages($object->error, $object->errors, 'errors');
@@ -802,7 +802,7 @@  discard block
 block discarded – undo
802 802
 		$object->fetch($id);
803 803
 		$result = $object->setClosed();
804 804
 		if ($result >= 0) {
805
-			header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
805
+			header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
806 806
 			exit();
807 807
 		}
808 808
 		setEventMessages($object->error, $object->errors, 'errors');
@@ -836,7 +836,7 @@  discard block
 block discarded – undo
836 836
 		}
837 837
 
838 838
 		if (!$error) {
839
-			header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
839
+			header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
840 840
 			exit();
841 841
 		} else {
842 842
 			setEventMessages($line->error, $line->errors, 'errors');
@@ -866,7 +866,7 @@  discard block
 block discarded – undo
866 866
 			if (is_array($extralabelsline)) {
867 867
 				// Get extra fields
868 868
 				foreach ($extralabelsline as $key => $value) {
869
-					unset($_POST["options_" . $key]);
869
+					unset($_POST["options_".$key]);
870 870
 				}
871 871
 			}
872 872
 
@@ -923,7 +923,7 @@  discard block
 block discarded – undo
923 923
 					// Unset extrafield POST Data
924 924
 					if (is_array($extrafields->attributes[$object->table_element_line]['label'])) {
925 925
 						foreach ($extrafields->attributes[$object->table_element_line]['label'] as $key => $value) {
926
-							unset($_POST["options_" . $key]);
926
+							unset($_POST["options_".$key]);
927 927
 						}
928 928
 					}
929 929
 					$line->fk_product = $lines[$i]->fk_product;
@@ -931,8 +931,8 @@  discard block
 block discarded – undo
931 931
 						// line with lot
932 932
 						foreach ($lines[$i]->detail_batch as $detail_batch) {
933 933
 							$lotStock = new Productbatch($db);
934
-							$batch = "batchl" . $detail_batch->fk_expeditiondet . "_" . $detail_batch->fk_origin_stock;
935
-							$qty = "qtyl" . $detail_batch->fk_expeditiondet . '_' . $detail_batch->id;
934
+							$batch = "batchl".$detail_batch->fk_expeditiondet."_".$detail_batch->fk_origin_stock;
935
+							$qty = "qtyl".$detail_batch->fk_expeditiondet.'_'.$detail_batch->id;
936 936
 							$batch_id = GETPOSTINT($batch);
937 937
 							$batch_qty = GETPOSTFLOAT($qty);
938 938
 							if (!empty($batch_id)) {
@@ -968,8 +968,8 @@  discard block
 block discarded – undo
968 968
 						}
969 969
 						// add new batch
970 970
 						$lotStock = new Productbatch($db);
971
-						$batch = "batchl" . $line_id . "_0";
972
-						$qty = "qtyl" . $line_id . "_0";
971
+						$batch = "batchl".$line_id."_0";
972
+						$qty = "qtyl".$line_id."_0";
973 973
 						$batch_id = GETPOSTINT($batch);
974 974
 						$batch_qty = GETPOSTFLOAT($qty);
975 975
 						$lineIdToAddLot = 0;
@@ -1032,8 +1032,8 @@  discard block
 block discarded – undo
1032 1032
 							// line without lot
1033 1033
 							if ($lines[$i]->entrepot_id == 0) {
1034 1034
 								// single warehouse shipment line or line in several warehouses context but with warehouse not defined
1035
-								$stockLocation = "entl" . $line_id;
1036
-								$qty = "qtyl" . $line_id;
1035
+								$stockLocation = "entl".$line_id;
1036
+								$qty = "qtyl".$line_id;
1037 1037
 								$line->id = $line_id;
1038 1038
 								$line->entrepot_id = GETPOSTINT((string) $stockLocation);
1039 1039
 								$line->qty = GETPOSTFLOAT($qty);
@@ -1045,8 +1045,8 @@  discard block
 block discarded – undo
1045 1045
 								unset($_POST[$qty]);
1046 1046
 							} elseif ($lines[$i]->entrepot_id > 0) {
1047 1047
 								// single warehouse shipment line
1048
-								$stockLocation = "entl" . $line_id;
1049
-								$qty = "qtyl" . $line_id;
1048
+								$stockLocation = "entl".$line_id;
1049
+								$qty = "qtyl".$line_id;
1050 1050
 								$line->id = $line_id;
1051 1051
 								$line->entrepot_id = GETPOSTINT($stockLocation);
1052 1052
 								$line->qty = GETPOSTFLOAT($qty);
@@ -1060,8 +1060,8 @@  discard block
 block discarded – undo
1060 1060
 								// multi warehouse shipment lines
1061 1061
 								foreach ($lines[$i]->details_entrepot as $detail_entrepot) {
1062 1062
 									if (!$error) {
1063
-										$stockLocation = "entl" . $detail_entrepot->line_id;
1064
-										$qty = "qtyl" . $detail_entrepot->line_id;
1063
+										$stockLocation = "entl".$detail_entrepot->line_id;
1064
+										$qty = "qtyl".$detail_entrepot->line_id;
1065 1065
 										$warehouse = GETPOSTINT($stockLocation);
1066 1066
 										if (!empty($warehouse)) {
1067 1067
 											$line->id = $detail_entrepot->line_id;
@@ -1079,7 +1079,7 @@  discard block
 block discarded – undo
1079 1079
 									}
1080 1080
 								}
1081 1081
 							} elseif (!isModEnabled('stock') && !isModEnabled('productbatch')) { // both product batch and stock are not activated.
1082
-								$qty = "qtyl" . $line_id;
1082
+								$qty = "qtyl".$line_id;
1083 1083
 								$line->id = $line_id;
1084 1084
 								$line->qty = GETPOSTFLOAT($qty);
1085 1085
 								$line->entrepot_id = 0;
@@ -1093,7 +1093,7 @@  discard block
 block discarded – undo
1093 1093
 							}
1094 1094
 						} else {
1095 1095
 							// Product no predefined
1096
-							$qty = "qtyl" . $line_id;
1096
+							$qty = "qtyl".$line_id;
1097 1097
 							$line->id = $line_id;
1098 1098
 							$line->qty = GETPOSTFLOAT($qty);
1099 1099
 							$line->entrepot_id = 0;
@@ -1136,12 +1136,12 @@  discard block
 block discarded – undo
1136 1136
 					$object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
1137 1137
 				}
1138 1138
 			} else {
1139
-				header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // To redisplay the form being edited
1139
+				header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); // To redisplay the form being edited
1140 1140
 				exit();
1141 1141
 			}
1142 1142
 		}
1143 1143
 	} elseif ($action == 'updateline' && $permissiontoadd && GETPOST('cancel', 'alpha') == $langs->trans("Cancel")) {
1144
-		header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // To redisplay the form being edited
1144
+		header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); // To redisplay the form being edited
1145 1145
 		exit();
1146 1146
 	} elseif ($action == 'addline' && !$origin && getDolGlobalString('SHIPMENT_STANDALONE') && $usercancreate) {	// Add a new line
1147 1147
 		$langs->load('errors');
@@ -1342,7 +1342,7 @@  discard block
 block discarded – undo
1342 1342
 				$object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
1343 1343
 			}
1344 1344
 
1345
-			header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
1345
+			header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
1346 1346
 			exit;
1347 1347
 		} else {
1348 1348
 			$mesg = $object->error;
@@ -1367,14 +1367,14 @@  discard block
 block discarded – undo
1367 1367
 				$object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
1368 1368
 			}
1369 1369
 
1370
-			header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
1370
+			header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
1371 1371
 			exit;
1372 1372
 		} else {
1373 1373
 			$mesg = $object->error;
1374 1374
 		}
1375 1375
 	}
1376 1376
 
1377
-	include DOL_DOCUMENT_ROOT . '/core/actions_printing.inc.php';
1377
+	include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
1378 1378
 
1379 1379
 	// Actions to send emails
1380 1380
 	if (empty($id)) {
@@ -1384,15 +1384,15 @@  discard block
 block discarded – undo
1384 1384
 	$paramname = 'id';
1385 1385
 	$autocopy = 'MAIN_MAIL_AUTOCOPY_SHIPMENT_TO';
1386 1386
 	$mode = 'emailfromshipment';
1387
-	$trackid = 'shi' . $object->id;
1388
-	include DOL_DOCUMENT_ROOT . '/core/actions_sendmails.inc.php';
1387
+	$trackid = 'shi'.$object->id;
1388
+	include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
1389 1389
 }
1390 1390
 
1391 1391
 /*
1392 1392
  * View
1393 1393
  */
1394 1394
 
1395
-$title = $object->ref . ' - ' . $langs->trans("Card");
1395
+$title = $object->ref.' - '.$langs->trans("Card");
1396 1396
 if ($action == 'create') {
1397 1397
 	$title = $langs->trans("NewSending");
1398 1398
 }
@@ -1421,7 +1421,7 @@  discard block
 block discarded – undo
1421 1421
 if ($action == 'create' && !getDolGlobalString('SHIPMENT_STANDALONE')) {
1422 1422
 	print load_fiche_titre($langs->trans("CreateShipment"), '', 'dolly');
1423 1423
 
1424
-	print '<br>'  .$langs->trans("ShipmentCreationIsDoneFromOrder");
1424
+	print '<br>'.$langs->trans("ShipmentCreationIsDoneFromOrder");
1425 1425
 	$action = '';
1426 1426
 	$id = '';
1427 1427
 	$ref = '';
@@ -1443,12 +1443,12 @@  discard block
 block discarded – undo
1443 1443
 		$note_private = $object->getDefaultCreateValueFor('note_private');
1444 1444
 		$note_public = $object->getDefaultCreateValueFor('note_public');
1445 1445
 
1446
-		print '<form name="crea_expedition" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
1447
-		print '<input type="hidden" name="token" value="' . newToken() . '">';
1446
+		print '<form name="crea_expedition" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
1447
+		print '<input type="hidden" name="token" value="'.newToken().'">';
1448 1448
 		print '<input type="hidden" name="action" value="add">';
1449
-		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
1450
-		print '<input type="hidden" name="originid" value="' . $id . '">';
1451
-		print '<input type="hidden" name="backtopage" value="' . $backtopage . '">';
1449
+		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
1450
+		print '<input type="hidden" name="originid" value="'.$id.'">';
1451
+		print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
1452 1452
 
1453 1453
 		print dol_get_fiche_head([]);
1454 1454
 
@@ -1456,11 +1456,11 @@  discard block
 block discarded – undo
1456 1456
 
1457 1457
 		// Thirdparty
1458 1458
 		print '<tr>';
1459
-		print '<td class="fieldrequired">' . $langs->trans('ThirdParty') . '</td>';
1459
+		print '<td class="fieldrequired">'.$langs->trans('ThirdParty').'</td>';
1460 1460
 		if ($socid > 0) {
1461 1461
 			print '<td>';
1462 1462
 			print $soc->getNomUrl(1);
1463
-			print '<input type="hidden" name="socid" value="' . $soc->id . '">';
1463
+			print '<input type="hidden" name="socid" value="'.$soc->id.'">';
1464 1464
 			print '</td>';
1465 1465
 		} else {
1466 1466
 			print '<td class="valuefieldcreate">';
@@ -1494,10 +1494,10 @@  discard block
 block discarded – undo
1494 1494
 
1495 1495
 			$langs->load("projects");
1496 1496
 			print '<tr>';
1497
-			print '<td>' . $langs->trans("Project") . '</td><td colspan="2">';
1497
+			print '<td>'.$langs->trans("Project").'</td><td colspan="2">';
1498 1498
 			print img_picto('', 'project', 'class="pictofixedwidth"');
1499 1499
 			print $formproject->select_projects($soc->id, $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 1, 0, 'widthcentpercentminusxx');
1500
-			print ' <a class="paddingleft" href="' . DOL_URL_ROOT . '/projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?action=create&socid=' . $soc->id) . '"><span class="fa fa-plus-circle valignmiddle"></span></a>';
1500
+			print ' <a class="paddingleft" href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="fa fa-plus-circle valignmiddle"></span></a>';
1501 1501
 			print '</td>';
1502 1502
 			print '</tr>';
1503 1503
 		}
@@ -1525,7 +1525,7 @@  discard block
 block discarded – undo
1525 1525
 		print $langs->trans("Weight");
1526 1526
 		print '</td><td colspan="3">';
1527 1527
 		print img_picto('', 'fa-balance-scale', 'class="pictofixedwidth"');
1528
-		print '<input name="weight" size="4" value="' . GETPOSTINT('weight') . '"> ';
1528
+		print '<input name="weight" size="4" value="'.GETPOSTINT('weight').'"> ';
1529 1529
 		$text = $formproduct->selectMeasuringUnits("weight_units", "weight", (string) GETPOSTINT('weight_units'), 0, 2);
1530 1530
 		$htmltext = $langs->trans("KeepEmptyForAutoCalculation");
1531 1531
 		print $form->textwithpicto($text, $htmltext);
@@ -1533,12 +1533,12 @@  discard block
 block discarded – undo
1533 1533
 
1534 1534
 		// Dim
1535 1535
 		print '<tr><td>';
1536
-		print $langs->trans("Width") . ' x ' . $langs->trans("Height") . ' x ' . $langs->trans("Depth");
1536
+		print $langs->trans("Width").' x '.$langs->trans("Height").' x '.$langs->trans("Depth");
1537 1537
 		print ' </td><td colspan="3">';
1538 1538
 		print img_picto('', 'fa-ruler', 'class="pictofixedwidth"');
1539
-		print '<input name="sizeW" size="4" value="' . GETPOSTINT('sizeW') . '">';
1540
-		print ' x <input name="sizeH" size="4" value="' . GETPOSTINT('sizeH') . '">';
1541
-		print ' x <input name="sizeS" size="4" value="' . GETPOSTINT('sizeS') . '">';
1539
+		print '<input name="sizeW" size="4" value="'.GETPOSTINT('sizeW').'">';
1540
+		print ' x <input name="sizeH" size="4" value="'.GETPOSTINT('sizeH').'">';
1541
+		print ' x <input name="sizeS" size="4" value="'.GETPOSTINT('sizeS').'">';
1542 1542
 		print ' ';
1543 1543
 		$text = $formproduct->selectMeasuringUnits("size_units", "size", (string) GETPOSTINT('size_units'), 0, 2);
1544 1544
 		$htmltext = $langs->trans("KeepEmptyForAutoCalculation");
@@ -1598,7 +1598,7 @@  discard block
 block discarded – undo
1598 1598
 		}
1599 1599
 
1600 1600
 		// Note Public
1601
-		$htmltext ='';
1601
+		$htmltext = '';
1602 1602
 		print '<tr>';
1603 1603
 		print '<td class="tdtop">';
1604 1604
 		print $form->textwithpicto($langs->trans('NotePublic'), $htmltext);
@@ -1645,13 +1645,13 @@  discard block
 block discarded – undo
1645 1645
 				$entrepot = new Entrepot($db);
1646 1646
 			}
1647 1647
 
1648
-			print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
1649
-			print '<input type="hidden" name="token" value="' . newToken() . '">';
1648
+			print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
1649
+			print '<input type="hidden" name="token" value="'.newToken().'">';
1650 1650
 			print '<input type="hidden" name="action" value="add">';
1651
-			print '<input type="hidden" name="origin" value="' . $origin . '">';
1652
-			print '<input type="hidden" name="origin_id" value="' . $object->id . '">';
1651
+			print '<input type="hidden" name="origin" value="'.$origin.'">';
1652
+			print '<input type="hidden" name="origin_id" value="'.$object->id.'">';
1653 1653
 			if (GETPOSTINT('entrepot_id')) {
1654
-				print '<input type="hidden" name="entrepot_id" value="' . GETPOSTINT('entrepot_id') . '">';
1654
+				print '<input type="hidden" name="entrepot_id" value="'.GETPOSTINT('entrepot_id').'">';
1655 1655
 			}
1656 1656
 
1657 1657
 			print dol_get_fiche_head([]);
@@ -1681,13 +1681,13 @@  discard block
 block discarded – undo
1681 1681
 				print $langs->trans('RefCustomer');
1682 1682
 			}
1683 1683
 			print '</td><td colspan="3">';
1684
-			print '<input type="text" name="ref_customer" value="' . $object->ref_client . '" />';
1684
+			print '<input type="text" name="ref_customer" value="'.$object->ref_client.'" />';
1685 1685
 			print '</td>';
1686 1686
 			print '</tr>';
1687 1687
 
1688 1688
 			// Thirdparty
1689
-			print '<tr><td class="titlefieldcreate fieldrequired">' . $langs->trans('Company') . '</td>';
1690
-			print '<td colspan="3">' . $soc->getNomUrl(1) . '</td>';
1689
+			print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans('Company').'</td>';
1690
+			print '<td colspan="3">'.$soc->getNomUrl(1).'</td>';
1691 1691
 			print '</tr>';
1692 1692
 
1693 1693
 			// Project
@@ -1701,16 +1701,16 @@  discard block
 block discarded – undo
1701 1701
 				}
1702 1702
 				$langs->load("projects");
1703 1703
 				print '<tr>';
1704
-				print '<td>' . $langs->trans("Project") . '</td><td colspan="2">';
1704
+				print '<td>'.$langs->trans("Project").'</td><td colspan="2">';
1705 1705
 				print img_picto('', 'project', 'class="pictofixedwidth"');
1706 1706
 				print $formproject->select_projects($soc->id, $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 1, 0, 'widthcentpercentminusxx');
1707
-				print ' <a class="paddingleft" href="' . DOL_URL_ROOT . '/projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?action=create&socid=' . $soc->id) . '"><span class="fa fa-plus-circle valignmiddle"></span></a>';
1707
+				print ' <a class="paddingleft" href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="fa fa-plus-circle valignmiddle"></span></a>';
1708 1708
 				print '</td>';
1709 1709
 				print '</tr>';
1710 1710
 			}
1711 1711
 
1712 1712
 			// Date delivery planned
1713
-			print '<tr><td>' . $langs->trans("DateDeliveryPlanned") . '</td>';
1713
+			print '<tr><td>'.$langs->trans("DateDeliveryPlanned").'</td>';
1714 1714
 			print '<td colspan="3">';
1715 1715
 			print img_picto('', 'action', 'class="pictofixedwidth"');
1716 1716
 			$date_delivery = ($date_delivery ? $date_delivery : $object->delivery_date); // $date_delivery comes from GETPOST
@@ -1719,7 +1719,7 @@  discard block
 block discarded – undo
1719 1719
 			print '</tr>';
1720 1720
 
1721 1721
 			// Date shipment (sending)
1722
-			print '<tr><td>' . $langs->trans("DateShipping") . '</td>';
1722
+			print '<tr><td>'.$langs->trans("DateShipping").'</td>';
1723 1723
 			print '<td colspan="3">';
1724 1724
 			print img_picto('', 'action', 'class="pictofixedwidth"');
1725 1725
 			//$date_shipping = ($date_shipping ? $date_shipping : $object->date_shipping); // $date_shipping comes from GETPOST
@@ -1728,7 +1728,7 @@  discard block
 block discarded – undo
1728 1728
 			print '</tr>';
1729 1729
 
1730 1730
 			// Note Public
1731
-			print '<tr><td>' . $langs->trans("NotePublic") . '</td>';
1731
+			print '<tr><td>'.$langs->trans("NotePublic").'</td>';
1732 1732
 			print '<td colspan="3">';
1733 1733
 			$doleditor = new DolEditor('note_public', $object->note_public, '', 60, 'dolibarr_notes', 'In', false, false, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PUBLIC') ? 0 : 1, ROWS_3, '90%');
1734 1734
 			print $doleditor->Create(1);
@@ -1736,7 +1736,7 @@  discard block
 block discarded – undo
1736 1736
 
1737 1737
 			// Note Private
1738 1738
 			if ($object->note_private && !$user->socid) {
1739
-				print '<tr><td>' . $langs->trans("NotePrivate") . '</td>';
1739
+				print '<tr><td>'.$langs->trans("NotePrivate").'</td>';
1740 1740
 				print '<td colspan="3">';
1741 1741
 				$doleditor = new DolEditor('note_private', $object->note_private, '', 60, 'dolibarr_notes', 'In', false, false, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PRIVATE') ? 0 : 1, ROWS_3, '90%');
1742 1742
 				print $doleditor->Create(1);
@@ -1748,7 +1748,7 @@  discard block
 block discarded – undo
1748 1748
 			print $langs->trans("Weight");
1749 1749
 			print '</td><td colspan="3">';
1750 1750
 			print img_picto('', 'fa-balance-scale', 'class="pictofixedwidth"');
1751
-			print '<input name="weight" size="4" value="' . GETPOSTINT('weight') . '"> ';
1751
+			print '<input name="weight" size="4" value="'.GETPOSTINT('weight').'"> ';
1752 1752
 			$text = $formproduct->selectMeasuringUnits("weight_units", "weight", (string) GETPOSTINT('weight_units'), 0, 2);
1753 1753
 			$htmltext = $langs->trans("KeepEmptyForAutoCalculation");
1754 1754
 			print $form->textwithpicto($text, $htmltext);
@@ -1756,12 +1756,12 @@  discard block
 block discarded – undo
1756 1756
 
1757 1757
 			// Dim
1758 1758
 			print '<tr><td>';
1759
-			print $langs->trans("Width") . ' x ' . $langs->trans("Height") . ' x ' . $langs->trans("Depth");
1759
+			print $langs->trans("Width").' x '.$langs->trans("Height").' x '.$langs->trans("Depth");
1760 1760
 			print ' </td><td colspan="3">';
1761 1761
 			print img_picto('', 'fa-ruler', 'class="pictofixedwidth"');
1762
-			print '<input name="sizeW" size="4" value="' . GETPOSTINT('sizeW') . '">';
1763
-			print ' x <input name="sizeH" size="4" value="' . GETPOSTINT('sizeH') . '">';
1764
-			print ' x <input name="sizeS" size="4" value="' . GETPOSTINT('sizeS') . '">';
1762
+			print '<input name="sizeW" size="4" value="'.GETPOSTINT('sizeW').'">';
1763
+			print ' x <input name="sizeH" size="4" value="'.GETPOSTINT('sizeH').'">';
1764
+			print ' x <input name="sizeS" size="4" value="'.GETPOSTINT('sizeS').'">';
1765 1765
 			print ' ';
1766 1766
 			$text = $formproduct->selectMeasuringUnits("size_units", "size", (string) GETPOSTINT('size_units'), 0, 2);
1767 1767
 			$htmltext = $langs->trans("KeepEmptyForAutoCalculation");
@@ -1769,7 +1769,7 @@  discard block
 block discarded – undo
1769 1769
 			print '</td></tr>';
1770 1770
 
1771 1771
 			// Delivery method
1772
-			print "<tr><td>" . $langs->trans("DeliveryMethod") . "</td>";
1772
+			print "<tr><td>".$langs->trans("DeliveryMethod")."</td>";
1773 1773
 			print '<td colspan="3">';
1774 1774
 			$expe->fetch_delivery_methods();
1775 1775
 			print img_picto('', 'dolly', 'class="pictofixedwidth"');
@@ -1780,16 +1780,16 @@  discard block
 block discarded – undo
1780 1780
 			print "</td></tr>\n";
1781 1781
 
1782 1782
 			// Tracking number
1783
-			print "<tr><td>" . $langs->trans("TrackingNumber") . "</td>";
1783
+			print "<tr><td>".$langs->trans("TrackingNumber")."</td>";
1784 1784
 			print '<td colspan="3">';
1785 1785
 			print img_picto('', 'barcode', 'class="pictofixedwidth"');
1786
-			print '<input name="tracking_number" size="20" value="' . GETPOST('tracking_number', 'alpha') . '">';
1786
+			print '<input name="tracking_number" size="20" value="'.GETPOST('tracking_number', 'alpha').'">';
1787 1787
 			print "</td></tr>\n";
1788 1788
 
1789 1789
 			// Incoterms
1790 1790
 			if (isModEnabled('incoterm')) {
1791 1791
 				print '<tr>';
1792
-				print '<td><label for="incoterm_id">' . $form->textwithpicto($langs->trans("IncotermLabel"), $object->label_incoterms, 1) . '</label></td>';
1792
+				print '<td><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), $object->label_incoterms, 1).'</label></td>';
1793 1793
 				print '<td colspan="3" class="maxwidthonsmartphone">';
1794 1794
 				print img_picto('', 'incoterm', 'class="pictofixedwidth"');
1795 1795
 				print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''));
@@ -1797,10 +1797,10 @@  discard block
 block discarded – undo
1797 1797
 			}
1798 1798
 
1799 1799
 			// Document model
1800
-			include_once DOL_DOCUMENT_ROOT . '/core/modules/expedition/modules_expedition.php';
1800
+			include_once DOL_DOCUMENT_ROOT.'/core/modules/expedition/modules_expedition.php';
1801 1801
 			$list = ModelePdfExpedition::liste_modeles($db);
1802 1802
 			if (is_countable($list) && count($list) > 1) {
1803
-				print "<tr><td>" . $langs->trans("DefaultModel") . "</td>";
1803
+				print "<tr><td>".$langs->trans("DefaultModel")."</td>";
1804 1804
 				print '<td colspan="3">';
1805 1805
 				print img_picto('', 'pdf', 'class="pictofixedwidth"');
1806 1806
 				print $form->selectarray('model', $list, getDolGlobalString('EXPEDITION_ADDON_PDF'), 0, 0, 0, '', 0, 0, 0, '', 'widthcentpercentminusx');
@@ -1809,7 +1809,7 @@  discard block
 block discarded – undo
1809 1809
 
1810 1810
 			// Other attributes. Fields from hook formObjectOptions and Extrafields.
1811 1811
 			// $objectsrc is Commande|Facture
1812
-			$objectsav = $object;	// Because Expedition is $expe and not $object that is wrongly a duplicate of $objectsrc.
1812
+			$objectsav = $object; // Because Expedition is $expe and not $object that is wrongly a duplicate of $objectsrc.
1813 1813
 			$object = $expe;
1814 1814
 			// Propagate extrafieldsvalue from source object to shipment object
1815 1815
 			if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && !empty($extrafields->attributes[$object->table_element]['label'])) {
@@ -1836,22 +1836,22 @@  discard block
 block discarded – undo
1836 1836
 
1837 1837
 			$numAsked = count($object->lines);
1838 1838
 
1839
-			print '<script type="text/javascript">' . "\n";
1840
-			print 'jQuery(document).ready(function() {' . "\n";
1839
+			print '<script type="text/javascript">'."\n";
1840
+			print 'jQuery(document).ready(function() {'."\n";
1841 1841
 			print 'jQuery("#autofill").click(function() {';
1842 1842
 			$i = 0;
1843 1843
 			while ($i < $numAsked) {
1844
-				print 'jQuery("#qtyl' . $i . '").val(jQuery("#qtyasked' . $i . '").val() - jQuery("#qtydelivered' . $i . '").val());' . "\n";
1844
+				print 'jQuery("#qtyl'.$i.'").val(jQuery("#qtyasked'.$i.'").val() - jQuery("#qtydelivered'.$i.'").val());'."\n";
1845 1845
 				if (isModEnabled('productbatch')) {
1846
-					print 'jQuery("#qtyl' . $i . '_' . $i . '").val(jQuery("#qtyasked' . $i . '").val() - jQuery("#qtydelivered' . $i . '").val());' . "\n";
1846
+					print 'jQuery("#qtyl'.$i.'_'.$i.'").val(jQuery("#qtyasked'.$i.'").val() - jQuery("#qtydelivered'.$i.'").val());'."\n";
1847 1847
 				}
1848 1848
 				$i++;
1849 1849
 			}
1850
-			print 'return false; });' . "\n";
1851
-			print 'jQuery("#autoreset").click(function() { console.log("Reset values to 0"); jQuery(".qtyl").val(0);' . "\n";
1852
-			print 'return false; });' . "\n";
1853
-			print '});' . "\n";
1854
-			print '</script>' . "\n";
1850
+			print 'return false; });'."\n";
1851
+			print 'jQuery("#autoreset").click(function() { console.log("Reset values to 0"); jQuery(".qtyl").val(0);'."\n";
1852
+			print 'return false; });'."\n";
1853
+			print '});'."\n";
1854
+			print '</script>'."\n";
1855 1855
 
1856 1856
 			print '<br>';
1857 1857
 
@@ -1884,26 +1884,26 @@  discard block
 block discarded – undo
1884 1884
 				}
1885 1885
 				print $langs->trans("Description");
1886 1886
 				print '</td>';
1887
-				print '<td class="center">' . $langs->trans("QtyOrdered") . '</td>';
1888
-				print '<td class="center">' . $langs->trans("QtyShipped") . '</td>';
1889
-				print '<td class="center">' . $langs->trans("QtyToShip");
1887
+				print '<td class="center">'.$langs->trans("QtyOrdered").'</td>';
1888
+				print '<td class="center">'.$langs->trans("QtyShipped").'</td>';
1889
+				print '<td class="center">'.$langs->trans("QtyToShip");
1890 1890
 				if (!isModEnabled('productbatch')) {
1891
-					print '<br><a href="#" id="autofill" class="opacitymedium link cursor cursorpointer">' . img_picto($langs->trans("Autofill"), 'autofill', 'class="paddingrightonly"') . '</a>';
1891
+					print '<br><a href="#" id="autofill" class="opacitymedium link cursor cursorpointer">'.img_picto($langs->trans("Autofill"), 'autofill', 'class="paddingrightonly"').'</a>';
1892 1892
 					print ' / ';
1893 1893
 				} else {
1894 1894
 					print '<br>';
1895 1895
 				}
1896
-				print '<span id="autoreset" class="opacitymedium link cursor cursorpointer">' . img_picto($langs->trans("Reset"), 'eraser') . '</span>';
1896
+				print '<span id="autoreset" class="opacitymedium link cursor cursorpointer">'.img_picto($langs->trans("Reset"), 'eraser').'</span>';
1897 1897
 				print '</td>';
1898 1898
 				if (isModEnabled('stock')) {
1899 1899
 					if (!isModEnabled('productbatch')) {
1900
-						print '<td class="left">' . $langs->trans("Warehouse") . ' (' . $langs->trans("Stock") . ')</td>';
1900
+						print '<td class="left">'.$langs->trans("Warehouse").' ('.$langs->trans("Stock").')</td>';
1901 1901
 					} else {
1902
-						print '<td class="left">' . $langs->trans("Warehouse") . ' / ' . $langs->trans("Batch") . ' (' . $langs->trans("Stock") . ')</td>';
1902
+						print '<td class="left">'.$langs->trans("Warehouse").' / '.$langs->trans("Batch").' ('.$langs->trans("Stock").')</td>';
1903 1903
 					}
1904 1904
 				}
1905 1905
 				if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) {
1906
-					print '<td class="left">' . $langs->trans('StockEntryDate') . '</td>';
1906
+					print '<td class="left">'.$langs->trans('StockEntryDate').'</td>';
1907 1907
 				}
1908 1908
 				print "</tr>\n";
1909 1909
 			}
@@ -1940,8 +1940,8 @@  discard block
 block discarded – undo
1940 1940
 						$type = 1;
1941 1941
 					}
1942 1942
 
1943
-					print '<!-- line for order line ' . $line->id . ' -->' . "\n";
1944
-					print '<tr class="oddeven" id="row-' . $line->id . '">' . "\n";
1943
+					print '<!-- line for order line '.$line->id.' -->'."\n";
1944
+					print '<tr class="oddeven" id="row-'.$line->id.'">'."\n";
1945 1945
 
1946 1946
 					$qtyProdCom = $line->qty;
1947 1947
 					$productChildrenNb = 0;
@@ -1962,7 +1962,7 @@  discard block
 block discarded – undo
1962 1962
 						//var_dump($product->stock_warehouse[1]);
1963 1963
 
1964 1964
 						print '<td>';
1965
-						print '<a name="' . $line->id . '"></a>'; // ancre pour retourner sur la ligne
1965
+						print '<a name="'.$line->id.'"></a>'; // ancre pour retourner sur la ligne
1966 1966
 
1967 1967
 						// Show product and description
1968 1968
 						$product_static->type = $line->fk_product_type;
@@ -1975,7 +1975,7 @@  discard block
 block discarded – undo
1975 1975
 						$showdescinproductdesc = getDolGlobalString('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE');
1976 1976
 
1977 1977
 						$text = $product_static->getNomUrl(1);
1978
-						$text .= ' - ' . (!empty($line->label) ? $line->label : $line->product_label);
1978
+						$text .= ' - '.(!empty($line->label) ? $line->label : $line->product_label);
1979 1979
 						$description = ($showdescinproductdesc ? '' : dol_htmlentitiesbr($line->desc));
1980 1980
 						$description .= empty($product->stockable_product) ? $langs->trans('StockDisabled') : $langs->trans('StockEnabled');
1981 1981
 						print $form->textwithtooltip($text, $description, 3, 0, '', (string) $i);
@@ -1985,7 +1985,7 @@  discard block
 block discarded – undo
1985 1985
 
1986 1986
 						// Add description in form
1987 1987
 						if ($showdescinproductdesc) {
1988
-							print ($line->desc && $line->desc != $line->product_label) ? '<br>' . dol_htmlentitiesbr($line->desc) : '';
1988
+							print ($line->desc && $line->desc != $line->product_label) ? '<br>'.dol_htmlentitiesbr($line->desc) : '';
1989 1989
 						}
1990 1990
 
1991 1991
 						print '</td>';
@@ -1998,10 +1998,10 @@  discard block
 block discarded – undo
1998 1998
 						}
1999 1999
 
2000 2000
 						if (!empty($line->label)) {
2001
-							$text .= ' <strong>' . $line->label . '</strong>';
2001
+							$text .= ' <strong>'.$line->label.'</strong>';
2002 2002
 							print $form->textwithtooltip($text, $line->desc, 3, 0, '', (string) $i);
2003 2003
 						} else {
2004
-							print $text . ' ' . nl2br($line->desc);
2004
+							print $text.' '.nl2br($line->desc);
2005 2005
 						}
2006 2006
 
2007 2007
 						// Show range
@@ -2016,16 +2016,16 @@  discard block
 block discarded – undo
2016 2016
 					}
2017 2017
 
2018 2018
 					// Qty
2019
-					print '<td class="center">' . $line->qty;
2020
-					print '<input name="qtyasked' . $indiceAsked . '" id="qtyasked' . $indiceAsked . '" type="hidden" value="' . $line->qty . '">';
2021
-					print '' . $unit_order . '</td>';
2019
+					print '<td class="center">'.$line->qty;
2020
+					print '<input name="qtyasked'.$indiceAsked.'" id="qtyasked'.$indiceAsked.'" type="hidden" value="'.$line->qty.'">';
2021
+					print ''.$unit_order.'</td>';
2022 2022
 
2023 2023
 					// Qty already shipped
2024 2024
 					print '<td class="center">';
2025 2025
 					$quantityDelivered = isset($object->expeditions[$line->id]) ? $object->expeditions[$line->id] : '';
2026 2026
 					print $quantityDelivered;
2027
-					print '<input name="qtydelivered' . $indiceAsked . '" id="qtydelivered' . $indiceAsked . '" type="hidden" value="' . $quantityDelivered . '">';
2028
-					print '' . $unit_order . '</td>';
2027
+					print '<input name="qtydelivered'.$indiceAsked.'" id="qtydelivered'.$indiceAsked.'" type="hidden" value="'.$quantityDelivered.'">';
2028
+					print ''.$unit_order.'</td>';
2029 2029
 
2030 2030
 					// Qty to ship
2031 2031
 					$quantityAsked = $line->qty;
@@ -2056,19 +2056,19 @@  discard block
 block discarded – undo
2056 2056
 							// Quantity to send
2057 2057
 							print '<td class="center">';
2058 2058
 							if ($line->product_type == Product::TYPE_PRODUCT || getDolGlobalString('STOCK_SUPPORTS_SERVICES') || ($line->product_type == Product::TYPE_SERVICE && getDolGlobalString('SHIPMENT_SUPPORTS_SERVICES'))) {
2059
-								if (GETPOSTINT('qtyl' . $indiceAsked)) {
2060
-									$deliverableQty = GETPOSTINT('qtyl' . $indiceAsked);
2059
+								if (GETPOSTINT('qtyl'.$indiceAsked)) {
2060
+									$deliverableQty = GETPOSTINT('qtyl'.$indiceAsked);
2061 2061
 								}
2062
-								print '<input name="idl' . $indiceAsked . '" type="hidden" value="' . $line->id . '">';
2062
+								print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">';
2063 2063
 								$qtylValue = $deliverableQty;
2064 2064
 								if (getDolGlobalBool('SHIPMENT_DONT_PREFILL_QTY', false)) {
2065 2065
 									$qtylValue = '';
2066 2066
 								}
2067
-								print '<input name="qtyl' . $indiceAsked . '" id="qtyl' . $indiceAsked . '" class="qtyl right" type="text" size="4" value="' . $qtylValue . '">';
2067
+								print '<input name="qtyl'.$indiceAsked.'" id="qtyl'.$indiceAsked.'" class="qtyl right" type="text" size="4" value="'.$qtylValue.'">';
2068 2068
 							} else {
2069 2069
 								if (getDolGlobalString('SHIPMENT_GETS_ALL_ORDER_PRODUCTS')) {
2070
-									print '<input name="idl' . $indiceAsked . '" type="hidden" value="' . $line->id . '">';
2071
-									print '<input name="qtyl' . $indiceAsked . '" id="qtyl' . $indiceAsked . '" type="hidden" value="0">';
2070
+									print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">';
2071
+									print '<input name="qtyl'.$indiceAsked.'" id="qtyl'.$indiceAsked.'" type="hidden" value="0">';
2072 2072
 								}
2073 2073
 
2074 2074
 								print $langs->trans("NA");
@@ -2080,8 +2080,8 @@  discard block
 block discarded – undo
2080 2080
 								print '<td class="left">';
2081 2081
 								if ($line->product_type == Product::TYPE_PRODUCT || getDolGlobalString('STOCK_SUPPORTS_SERVICES')) {   // Type of product need stock change ?
2082 2082
 									// Show warehouse combo list
2083
-									$ent = "entl" . $indiceAsked;
2084
-									$idl = "idl" . $indiceAsked;
2083
+									$ent = "entl".$indiceAsked;
2084
+									$idl = "idl".$indiceAsked;
2085 2085
 									$tmpentrepot_id = is_numeric(GETPOST($ent)) ? GETPOSTINT($ent) : $warehouse_id;
2086 2086
 									if ($line->fk_product > 0) {
2087 2087
 										print '<!-- Show warehouse selection -->';
@@ -2091,24 +2091,24 @@  discard block
 block discarded – undo
2091 2091
 											$stockMin = 0;
2092 2092
 										}
2093 2093
 										if ($productChildrenNb > 0) {
2094
-											print $formproduct->selectWarehouses($tmpentrepot_id, 'entl' . $indiceAsked, '', 1, 0, 0, '', 0, 0, array(), 'minwidth200', array(), 1, $stockMin, 'stock DESC, e.ref');
2094
+											print $formproduct->selectWarehouses($tmpentrepot_id, 'entl'.$indiceAsked, '', 1, 0, 0, '', 0, 0, array(), 'minwidth200', array(), 1, $stockMin, 'stock DESC, e.ref');
2095 2095
 										} else {
2096 2096
 											if ($product->stockable_product == Product::ENABLED_STOCK) {
2097
-												print $formproduct->selectWarehouses($tmpentrepot_id, 'entl' . $indiceAsked, '', 1, 0, $line->fk_product, '', 1, 0, array(), 'minwidth200', array(), 1, $stockMin, 'stock DESC, e.ref');
2097
+												print $formproduct->selectWarehouses($tmpentrepot_id, 'entl'.$indiceAsked, '', 1, 0, $line->fk_product, '', 1, 0, array(), 'minwidth200', array(), 1, $stockMin, 'stock DESC, e.ref');
2098 2098
 											} else {
2099
-												print img_warning() . ' ' . $langs->trans('StockDisabled');
2099
+												print img_warning().' '.$langs->trans('StockDisabled');
2100 2100
 											}
2101 2101
 										}
2102 2102
 
2103 2103
 										if ($tmpentrepot_id > 0 && $tmpentrepot_id == $warehouse_id) {
2104 2104
 											//print $stock.' '.$quantityToBeDelivered;
2105 2105
 											if ($stock < $quantityToBeDelivered) {
2106
-												print ' ' . img_warning($langs->trans("StockTooLow")); // Stock too low for this $warehouse_id but you can change warehouse
2106
+												print ' '.img_warning($langs->trans("StockTooLow")); // Stock too low for this $warehouse_id but you can change warehouse
2107 2107
 											}
2108 2108
 										}
2109 2109
 									}
2110 2110
 								} else {
2111
-									print '<span class="opacitymedium">(' . $langs->trans("Service") . ')</span><input name="entl' . $indiceAsked . '" id="entl' . $indiceAsked . '" type="hidden" value="0">';
2111
+									print '<span class="opacitymedium">('.$langs->trans("Service").')</span><input name="entl'.$indiceAsked.'" id="entl'.$indiceAsked.'" type="hidden" value="0">';
2112 2112
 								}
2113 2113
 								print '</td>';
2114 2114
 							}
@@ -2129,9 +2129,9 @@  discard block
 block discarded – undo
2129 2129
 											$img = img_warning($langs->trans("StockTooLow"));
2130 2130
 										}
2131 2131
 										print "<tr class=\"oddeven\"><td>&nbsp; &nbsp; &nbsp; ->
2132
-												<a href=\"" . DOL_URL_ROOT . "/product/card.php?id=" . $value['id'] . "\">" . $value['fullpath'] . "
2133
-												</a> (" . $value['nb'] . ")</td><td class=\"center\"> " . $value['nb_total'] . "</td><td>&nbsp;</td><td>&nbsp;</td>
2134
-												<td class=\"center\">" . $value['stock'] . " " . $img . "</td>";
2132
+												<a href=\"" . DOL_URL_ROOT."/product/card.php?id=".$value['id']."\">".$value['fullpath']."
2133
+												</a> (" . $value['nb'].")</td><td class=\"center\"> ".$value['nb_total']."</td><td>&nbsp;</td><td>&nbsp;</td>
2134
+												<td class=\"center\">" . $value['stock']." ".$img."</td>";
2135 2135
 										if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) {
2136 2136
 											print '<td></td>';
2137 2137
 										} //StockEntrydate
@@ -2161,7 +2161,7 @@  discard block
 block discarded – undo
2161 2161
 									$nbofsuggested++;
2162 2162
 								}
2163 2163
 							}
2164
-							print '<input name="idl' . $indiceAsked . '" type="hidden" value="' . $line->id . '">';
2164
+							print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">';
2165 2165
 							if (is_object($product->stock_warehouse[$warehouse_id]) && count($product->stock_warehouse[$warehouse_id]->detail_batch)) {
2166 2166
 								foreach ($product->stock_warehouse[$warehouse_id]->detail_batch as $dbatch) {	// $dbatch is instance of Productbatch
2167 2167
 									//var_dump($dbatch);
@@ -2187,7 +2187,7 @@  discard block
 block discarded – undo
2187 2187
 										$deliverableQty = 0;
2188 2188
 									}
2189 2189
 
2190
-									$inputName = 'qtyl' . $indiceAsked . '_' . $subj;
2190
+									$inputName = 'qtyl'.$indiceAsked.'_'.$subj;
2191 2191
 									if (GETPOSTISSET($inputName)) {
2192 2192
 										$deliverableQty = GETPOST($inputName, 'int');
2193 2193
 									}
@@ -2195,37 +2195,37 @@  discard block
 block discarded – undo
2195 2195
 									$tooltipClass = $tooltipTitle = '';
2196 2196
 									if (!empty($alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)])) {
2197 2197
 										$tooltipClass = ' classfortooltip';
2198
-										$tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines') . ' : ' . $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)];
2198
+										$tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines').' : '.$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)];
2199 2199
 									} else {
2200 2200
 										$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0;
2201 2201
 									}
2202 2202
 									$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = $deliverableQty + $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)];
2203 2203
 
2204
-									print '<!-- subj=' . $subj . '/' . $nbofsuggested . ' --><tr ' . ((($subj + 1) == $nbofsuggested) ? 'oddeven' : '') . '>';
2204
+									print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested) ? 'oddeven' : '').'>';
2205 2205
 									print '<td colspan="3" ></td><td class="center">';
2206 2206
 									$qtylValue = $deliverableQty;
2207 2207
 									if (getDolGlobalBool('SHIPMENT_DONT_PREFILL_QTY', false)) {
2208 2208
 										$qtylValue = '';
2209 2209
 									}
2210
-									print '<input class="qtyl ' . $tooltipClass . ' right" title="' . $tooltipTitle . '" name="qtyl' . $indiceAsked . '_' . $subj . '" id="qtyl' . $indiceAsked . '_' . $subj . '" type="text" size="4" value="' . $qtylValue . '">';
2210
+									print '<input class="qtyl '.$tooltipClass.' right" title="'.$tooltipTitle.'" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="'.$qtylValue.'">';
2211 2211
 									print '</td>';
2212 2212
 
2213 2213
 									print '<!-- Show details of lot -->';
2214 2214
 									print '<td class="left">';
2215 2215
 
2216
-									print $staticwarehouse->getNomUrl(0) . ' / ';
2216
+									print $staticwarehouse->getNomUrl(0).' / ';
2217 2217
 
2218
-									print '<input name="batchl' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $dbatch->id . '">';
2218
+									print '<input name="batchl'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$dbatch->id.'">';
2219 2219
 
2220 2220
 									$detail = '';
2221
-									$detail .= $langs->trans("Batch") . ': ' . $dbatch->batch;
2221
+									$detail .= $langs->trans("Batch").': '.$dbatch->batch;
2222 2222
 									if (!getDolGlobalString('PRODUCT_DISABLE_SELLBY') && !empty($dbatch->sellby)) {
2223
-										$detail .= ' - ' . $langs->trans("SellByDate") . ': ' . dol_print_date($dbatch->sellby, "day");
2223
+										$detail .= ' - '.$langs->trans("SellByDate").': '.dol_print_date($dbatch->sellby, "day");
2224 2224
 									}
2225 2225
 									if (!getDolGlobalString('PRODUCT_DISABLE_EATBY') && !empty($dbatch->eatby)) {
2226
-										$detail .= ' - ' . $langs->trans("EatByDate") . ': ' . dol_print_date($dbatch->eatby, "day");
2226
+										$detail .= ' - '.$langs->trans("EatByDate").': '.dol_print_date($dbatch->eatby, "day");
2227 2227
 									}
2228
-									$detail .= ' - ' . $langs->trans("Qty") . ': ' . $dbatch->qty;
2228
+									$detail .= ' - '.$langs->trans("Qty").': '.$dbatch->qty;
2229 2229
 									$detail .= '<br>';
2230 2230
 									print $detail;
2231 2231
 
@@ -2236,18 +2236,18 @@  discard block
 block discarded – undo
2236 2236
 									$subj++;
2237 2237
 									print '</td>';
2238 2238
 									if (getDolGlobalInt('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) {
2239
-										print '<td>' . dol_print_date($dbatch->context['stock_entry_date'], 'day') . '</td>'; //StockEntrydate
2239
+										print '<td>'.dol_print_date($dbatch->context['stock_entry_date'], 'day').'</td>'; //StockEntrydate
2240 2240
 									}
2241 2241
 									print '</tr>';
2242 2242
 								}
2243 2243
 							} else {
2244 2244
 								print '<!-- Case there is no details of lot at all -->';
2245 2245
 								print '<tr class="oddeven"><td colspan="3"></td><td class="center">';
2246
-								print '<input class="qtyl right" name="qtyl' . $indiceAsked . '_' . $subj . '" id="qtyl' . $indiceAsked . '_' . $subj . '" type="text" size="4" value="0" disabled="disabled"> ';
2246
+								print '<input class="qtyl right" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="0" disabled="disabled"> ';
2247 2247
 								print '</td>';
2248 2248
 
2249 2249
 								print '<td class="left">';
2250
-								print img_warning() . ' ' . $langs->trans("NoProductToShipFoundIntoStock", $staticwarehouse->label);
2250
+								print img_warning().' '.$langs->trans("NoProductToShipFoundIntoStock", $staticwarehouse->label);
2251 2251
 								print '</td>';
2252 2252
 								if (getDolGlobalInt('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) {
2253 2253
 									print '<td></td>';
@@ -2263,9 +2263,9 @@  discard block
 block discarded – undo
2263 2263
 							if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) {
2264 2264
 								print '<td></td>';
2265 2265
 							} //StockEntrydate
2266
-							print '</tr>' . "\n"; // end line and start a new one for each warehouse
2266
+							print '</tr>'."\n"; // end line and start a new one for each warehouse
2267 2267
 
2268
-							print '<input name="idl' . $indiceAsked . '" type="hidden" value="' . $line->id . '">';
2268
+							print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">';
2269 2269
 							$subj = 0;
2270 2270
 							// Define nb of lines suggested for this order line
2271 2271
 							$nbofsuggested = 0;
@@ -2289,8 +2289,8 @@  discard block
 block discarded – undo
2289 2289
 									$deliverableQty = min($quantityToBeDelivered, $stock);
2290 2290
 									$deliverableQty = max(0, $deliverableQty);
2291 2291
 									// Quantity to send
2292
-									print '<!-- subj=' . $subj . '/' . $nbofsuggested . ' --><tr ' . ((($subj + 1) == $nbofsuggested) ? 'oddeven' : '') . '>';
2293
-									print '<td colspan="3" ></td><td class="center"><!-- qty to ship (no lot management for product line indiceAsked=' . $indiceAsked . ') -->';
2292
+									print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested) ? 'oddeven' : '').'>';
2293
+									print '<td colspan="3" ></td><td class="center"><!-- qty to ship (no lot management for product line indiceAsked='.$indiceAsked.') -->';
2294 2294
 									if ($line->product_type == Product::TYPE_PRODUCT || getDolGlobalString('STOCK_SUPPORTS_SERVICES') || getDolGlobalString('SHIPMENT_SUPPORTS_SERVICES')) {
2295 2295
 										if (isset($alreadyQtySetted[$line->fk_product][intval($warehouse_id)])) {
2296 2296
 											$deliverableQty = min($quantityToBeDelivered, $stock - $alreadyQtySetted[$line->fk_product][intval($warehouse_id)]);
@@ -2309,14 +2309,14 @@  discard block
 block discarded – undo
2309 2309
 										$tooltipClass = $tooltipTitle = '';
2310 2310
 										if (!empty($alreadyQtySetted[$line->fk_product][intval($warehouse_id)])) {
2311 2311
 											$tooltipClass = ' classfortooltip';
2312
-											$tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines') . ' : ' . $alreadyQtySetted[$line->fk_product][intval($warehouse_id)];
2312
+											$tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines').' : '.$alreadyQtySetted[$line->fk_product][intval($warehouse_id)];
2313 2313
 										} else {
2314 2314
 											$alreadyQtySetted[$line->fk_product][intval($warehouse_id)] = 0;
2315 2315
 										}
2316 2316
 
2317 2317
 										$alreadyQtySetted[$line->fk_product][intval($warehouse_id)] = $deliverableQty + $alreadyQtySetted[$line->fk_product][intval($warehouse_id)];
2318 2318
 
2319
-										$inputName = 'qtyl' . $indiceAsked . '_' . $subj;
2319
+										$inputName = 'qtyl'.$indiceAsked.'_'.$subj;
2320 2320
 										if (GETPOSTISSET($inputName)) {
2321 2321
 											$deliverableQty = GETPOSTINT($inputName);
2322 2322
 										}
@@ -2324,11 +2324,11 @@  discard block
 block discarded – undo
2324 2324
 										if (getDolGlobalBool('SHIPMENT_DONT_PREFILL_QTY', false)) {
2325 2325
 											$qtylValue = '';
2326 2326
 										}
2327
-										print '<input class="qtyl' . $tooltipClass . ' right" title="' . $tooltipTitle . '" name="qtyl' . $indiceAsked . '_' . $subj . '" id="qtyl' . $indiceAsked . '" type="text" size="4" value="' . $qtylValue . '">';
2328
-										print '<input name="ent1' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $warehouse_id . '">';
2327
+										print '<input class="qtyl'.$tooltipClass.' right" title="'.$tooltipTitle.'" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'" type="text" size="4" value="'.$qtylValue.'">';
2328
+										print '<input name="ent1'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$warehouse_id.'">';
2329 2329
 									} else {
2330 2330
 										if (getDolGlobalString('SHIPMENT_GETS_ALL_ORDER_PRODUCTS')) {
2331
-											print '<input name="qtyl' . $indiceAsked . '_' . $subj . '" id="qtyl' . $indiceAsked . '" type="hidden" value="0">';
2331
+											print '<input name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'" type="hidden" value="0">';
2332 2332
 										}
2333 2333
 
2334 2334
 										print $langs->trans("NA");
@@ -2339,16 +2339,16 @@  discard block
 block discarded – undo
2339 2339
 									print '<td class="left">';
2340 2340
 									if ($line->product_type == Product::TYPE_PRODUCT || getDolGlobalString('STOCK_SUPPORTS_SERVICES')) {
2341 2341
 										if ($product->stockable_product == Product::ENABLED_STOCK || $productChildrenNb > 0) {
2342
-											print $tmpwarehouseObject->getNomUrl(0) . ' ';
2342
+											print $tmpwarehouseObject->getNomUrl(0).' ';
2343 2343
 											if ($productChildrenNb <= 0) {
2344 2344
 												print '<!-- Show details of stock -->';
2345
-												print '(' . $stock . ')';
2345
+												print '('.$stock.')';
2346 2346
 											}
2347 2347
 										} else {
2348
-											print img_warning() . ' ' . $langs->trans('StockDisabled');
2348
+											print img_warning().' '.$langs->trans('StockDisabled');
2349 2349
 										}
2350 2350
 									} else {
2351
-										print '<span class="opacitymedium">(' . $langs->trans("Service") . ')</span>';
2351
+										print '<span class="opacitymedium">('.$langs->trans("Service").')</span>';
2352 2352
 									}
2353 2353
 									print '</td>';
2354 2354
 									$quantityToBeDelivered -= $deliverableQty;
@@ -2375,9 +2375,9 @@  discard block
 block discarded – undo
2375 2375
 										}
2376 2376
 										print '<tr class"oddeven"><td>';
2377 2377
 										print "&nbsp; &nbsp; &nbsp; ->
2378
-											<a href=\"" . DOL_URL_ROOT . "/product/card.php?id=" . $value['id'] . "\">" . $value['fullpath'] . "
2379
-											</a> (" . $value['nb'] . ")</td><td class=\"center\"> " . $value['nb_total'] . "</td><td>&nbsp;</td><td>&nbsp;</td>
2380
-											<td class=\"center\">" . $value['stock'] . " " . $img . "</td>";
2378
+											<a href=\"" . DOL_URL_ROOT."/product/card.php?id=".$value['id']."\">".$value['fullpath']."
2379
+											</a> (" . $value['nb'].")</td><td class=\"center\"> ".$value['nb_total']."</td><td>&nbsp;</td><td>&nbsp;</td>
2380
+											<td class=\"center\">" . $value['stock']." ".$img."</td>";
2381 2381
 										if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) {
2382 2382
 											print '<td></td>';
2383 2383
 										} //StockEntrydate
@@ -2394,7 +2394,7 @@  discard block
 block discarded – undo
2394 2394
 							print '</tr>'; // end line and start a new one for lot/serial
2395 2395
 
2396 2396
 							$subj = 0;
2397
-							print '<input name="idl' . $indiceAsked . '" type="hidden" value="' . $line->id . '">';
2397
+							print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">';
2398 2398
 
2399 2399
 							$tmpwarehouseObject = new Entrepot($db);
2400 2400
 							$productlotObject = new Productlot($db);
@@ -2436,7 +2436,7 @@  discard block
 block discarded – undo
2436 2436
 											$deliverableQty = 0;
2437 2437
 										}
2438 2438
 
2439
-										$inputName = 'qtyl' . $indiceAsked . '_' . $subj;
2439
+										$inputName = 'qtyl'.$indiceAsked.'_'.$subj;
2440 2440
 										if (GETPOSTISSET($inputName)) {
2441 2441
 											$deliverableQty = GETPOSTINT($inputName);
2442 2442
 										}
@@ -2444,29 +2444,29 @@  discard block
 block discarded – undo
2444 2444
 										$tooltipClass = $tooltipTitle = '';
2445 2445
 										if (!empty($alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)])) {
2446 2446
 											$tooltipClass = ' classfortooltip';
2447
-											$tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines') . ' : ' . $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)];
2447
+											$tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines').' : '.$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)];
2448 2448
 										} else {
2449 2449
 											$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0;
2450 2450
 										}
2451 2451
 										$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = $deliverableQty + $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)];
2452 2452
 
2453
-										print '<!-- subj=' . $subj . '/' . $nbofsuggested . ' --><tr ' . ((($subj + 1) == $nbofsuggested) ? 'oddeven' : '') . '><td colspan="3"></td><td class="center">';
2453
+										print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested) ? 'oddeven' : '').'><td colspan="3"></td><td class="center">';
2454 2454
 										$qtylValue = $deliverableQty;
2455 2455
 										if (getDolGlobalBool('SHIPMENT_DONT_PREFILL_QTY', false)) {
2456 2456
 											$qtylValue = '';
2457 2457
 										}
2458
-										print '<input class="qtyl right ' . $tooltipClass . '" title="' . $tooltipTitle . '" name="' . $inputName . '" id="' . $inputName . '" type="text" size="4" value="' . $qtylValue . '">';
2458
+										print '<input class="qtyl right '.$tooltipClass.'" title="'.$tooltipTitle.'" name="'.$inputName.'" id="'.$inputName.'" type="text" size="4" value="'.$qtylValue.'">';
2459 2459
 										print '</td>';
2460 2460
 
2461 2461
 										print '<td class="left">';
2462 2462
 
2463
-										print $tmpwarehouseObject->getNomUrl(0) . ' / ';
2463
+										print $tmpwarehouseObject->getNomUrl(0).' / ';
2464 2464
 
2465 2465
 										print '<!-- Show details of lot -->';
2466
-										print '<input name="batchl' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $dbatch->id . '">';
2466
+										print '<input name="batchl'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$dbatch->id.'">';
2467 2467
 
2468 2468
 										//print '|'.$line->fk_product.'|'.$dbatch->batch.'|<br>';
2469
-										print $langs->trans("Batch") . ': ';
2469
+										print $langs->trans("Batch").': ';
2470 2470
 										$result = $productlotObject->fetch(0, $line->fk_product, $dbatch->batch);
2471 2471
 										if ($result > 0) {
2472 2472
 											print $productlotObject->getNomUrl(1);
@@ -2474,12 +2474,12 @@  discard block
 block discarded – undo
2474 2474
 											print $langs->trans("TableLotIncompleteRunRepairWithParamStandardEqualConfirmed");
2475 2475
 										}
2476 2476
 										if (!getDolGlobalString('PRODUCT_DISABLE_SELLBY') && !empty($dbatch->sellby)) {
2477
-											print ' - ' . $langs->trans("SellByDate") . ': ' . dol_print_date($dbatch->sellby, "day");
2477
+											print ' - '.$langs->trans("SellByDate").': '.dol_print_date($dbatch->sellby, "day");
2478 2478
 										}
2479 2479
 										if (!getDolGlobalString('PRODUCT_DISABLE_EATBY') && !empty($dbatch->eatby)) {
2480
-											print ' - ' . $langs->trans("EatByDate") . ': ' . dol_print_date($dbatch->eatby, "day");
2480
+											print ' - '.$langs->trans("EatByDate").': '.dol_print_date($dbatch->eatby, "day");
2481 2481
 										}
2482
-										print ' (' . $dbatch->qty . ')';
2482
+										print ' ('.$dbatch->qty.')';
2483 2483
 										$quantityToBeDelivered -= $deliverableQty;
2484 2484
 										if ($quantityToBeDelivered < 0) {
2485 2485
 											$quantityToBeDelivered = 0;
@@ -2488,7 +2488,7 @@  discard block
 block discarded – undo
2488 2488
 										$subj++;
2489 2489
 										print '</td>';
2490 2490
 										if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) {
2491
-											print '<td class="left">' . dol_print_date($dbatch->context['stock_entry_date'], 'day') . '</td>';
2491
+											print '<td class="left">'.dol_print_date($dbatch->context['stock_entry_date'], 'day').'</td>';
2492 2492
 										}
2493 2493
 										print '</tr>';
2494 2494
 									}
@@ -2515,7 +2515,7 @@  discard block
 block discarded – undo
2515 2515
 								}
2516 2516
 								print '<input class="qtyl right" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="0"'.($disabled ? ' '.$disabled : '').'> ';
2517 2517
 								if (empty($disabled) && (!getDolGlobalInt('STOCK_DISALLOW_NEGATIVE_TRANSFER') || $product->stockable_product == Product::DISABLED_STOCK)) {
2518
-									print '<input name="ent1' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $warehouse_selected_id . '">';
2518
+									print '<input name="ent1'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$warehouse_selected_id.'">';
2519 2519
 								}
2520 2520
 							} elseif ($line->product_type == Product::TYPE_SERVICE && getDolGlobalString('SHIPMENT_SUPPORTS_SERVICES')) {
2521 2521
 								$disabled = '';
@@ -2527,7 +2527,7 @@  discard block
 block discarded – undo
2527 2527
 								}
2528 2528
 								print '<input class="qtyl right" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="'.$quantityToBeDelivered.'"'.($disabled ? ' '.$disabled : '').'> ';
2529 2529
 								if (empty($disabled) && !getDolGlobalInt('STOCK_DISALLOW_NEGATIVE_TRANSFER')) {
2530
-									print '<input name="ent1' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $warehouse_selected_id . '">';
2530
+									print '<input name="ent1'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$warehouse_selected_id.'">';
2531 2531
 								}
2532 2532
 							} else {
2533 2533
 								print $langs->trans("NA");
@@ -2539,20 +2539,20 @@  discard block
 block discarded – undo
2539 2539
 								if ($warehouse_selected_id > 0 && $product->stockable_product == Product::ENABLED_STOCK) {
2540 2540
 									$warehouseObject = new Entrepot($db);
2541 2541
 									$warehouseObject->fetch($warehouse_selected_id);
2542
-									print img_warning() . ' ' . $langs->trans("NoProductToShipFoundIntoStock", $warehouseObject->label);
2542
+									print img_warning().' '.$langs->trans("NoProductToShipFoundIntoStock", $warehouseObject->label);
2543 2543
 								} else {
2544 2544
 									if ($line->fk_product) {
2545 2545
 										if ($product->stockable_product == Product::ENABLED_STOCK) {
2546
-											print img_warning() . ' ' . $langs->trans('StockTooLow');
2546
+											print img_warning().' '.$langs->trans('StockTooLow');
2547 2547
 										} else {
2548
-											print img_warning() . ' ' . $langs->trans('StockDisabled');
2548
+											print img_warning().' '.$langs->trans('StockDisabled');
2549 2549
 										}
2550 2550
 									} else {
2551 2551
 										print '';
2552 2552
 									}
2553 2553
 								}
2554 2554
 							} else {
2555
-								print '<span class="opacitymedium">(' . $langs->trans("Service") . ')</span>';
2555
+								print '<span class="opacitymedium">('.$langs->trans("Service").')</span>';
2556 2556
 							}
2557 2557
 							print '</td>';
2558 2558
 							if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) {
@@ -2596,7 +2596,7 @@  discard block
 block discarded – undo
2596 2596
 		}
2597 2597
 	}
2598 2598
 } elseif ($object->id > 0) {
2599
-	'@phan-var-force Expedition $object';  // Need to force it (type overridden earlier)
2599
+	'@phan-var-force Expedition $object'; // Need to force it (type overridden earlier)
2600 2600
 
2601 2601
 	// Edit and view mode
2602 2602
 
@@ -2636,7 +2636,7 @@  discard block
 block discarded – undo
2636 2636
 			);
2637 2637
 		}
2638 2638
 		$formconfirm = $form->formconfirm(
2639
-			$_SERVER['PHP_SELF'] . '?id=' . $object->id,
2639
+			$_SERVER['PHP_SELF'].'?id='.$object->id,
2640 2640
 			$langs->trans('DeleteSending'),
2641 2641
 			$langs->trans("ConfirmDeleteSending", $object->ref),
2642 2642
 			'confirm_delete',
@@ -2657,7 +2657,7 @@  discard block
 block discarded – undo
2657 2657
 			$title = "DeleteTitleLine";
2658 2658
 			$question = "ConfirmDeleteTitleLine";
2659 2659
 		}
2660
-		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans($title), $langs->trans($question), 'confirm_delete_subtotalline', $formconfirm, 'no', 1);
2660
+		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans($title), $langs->trans($question), 'confirm_delete_subtotalline', $formconfirm, 'no', 1);
2661 2661
 	}
2662 2662
 
2663 2663
 	// Confirm validation
@@ -2671,13 +2671,13 @@  discard block
 block discarded – undo
2671 2671
 
2672 2672
 		$text = $langs->trans("ConfirmValidateSending", $numref);
2673 2673
 		if (getDolGlobalString('STOCK_CALCULATE_ON_SHIPMENT')) {
2674
-			$text .= '<br>' . img_picto('', 'movement', 'class="pictofixedwidth"') . $langs->trans("StockMovementWillBeRecorded") . '.';
2674
+			$text .= '<br>'.img_picto('', 'movement', 'class="pictofixedwidth"').$langs->trans("StockMovementWillBeRecorded").'.';
2675 2675
 		} elseif (getDolGlobalString('STOCK_CALCULATE_ON_SHIPMENT_CLOSE')) {
2676
-			$text .= '<br>' . img_picto('', 'movement', 'class="pictofixedwidth"') . $langs->trans("StockMovementNotYetRecorded") . '.';
2676
+			$text .= '<br>'.img_picto('', 'movement', 'class="pictofixedwidth"').$langs->trans("StockMovementNotYetRecorded").'.';
2677 2677
 		}
2678 2678
 
2679 2679
 		if (isModEnabled('notification')) {
2680
-			require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
2680
+			require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
2681 2681
 			$notify = new Notify($db);
2682 2682
 			$text .= '<br>';
2683 2683
 			$text .= $notify->confirmMessage('SHIPPING_VALIDATE', $object->socid, $object);
@@ -2688,14 +2688,14 @@  discard block
 block discarded – undo
2688 2688
 
2689 2689
 	// Confirm cancellation
2690 2690
 	if ($action == 'cancel') {
2691
-		$formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id, $langs->trans('CancelSending'), $langs->trans("ConfirmCancelSending", $object->ref), 'confirm_cancel', '', 0, 1);
2691
+		$formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('CancelSending'), $langs->trans("ConfirmCancelSending", $object->ref), 'confirm_cancel', '', 0, 1);
2692 2692
 	}
2693 2693
 
2694 2694
 	// Confirm sign
2695 2695
 	if ($action == 'sign') {
2696 2696
 		$text = $langs->trans('ConfirmSignShipping');
2697 2697
 		if (isModEnabled('notification')) {
2698
-			require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
2698
+			require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
2699 2699
 			$notify = new Notify($db);
2700 2700
 			$text .= '<br>';
2701 2701
 			$text .= $notify->confirmMessage('SHIPPING_MODIFY', $object->socid, $object);
@@ -2705,7 +2705,7 @@  discard block
 block discarded – undo
2705 2705
 			'type' 		=> 'select',
2706 2706
 			'name' 		=> 'signed_status',
2707 2707
 			'select_show_empty' => 0,
2708
-			'label'		=> '<span class="fieldrequired">' . $langs->trans('SignStatus') . '</span>',
2708
+			'label'		=> '<span class="fieldrequired">'.$langs->trans('SignStatus').'</span>',
2709 2709
 			'values'	=> $object->getSignedStatusLocalisedArray()
2710 2710
 		];
2711 2711
 		$formconfirm = $form->formconfirm(dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id]), $langs->trans('SignShipping'), $text, 'confirm_sign', $formquestion, 0, 1);
@@ -2715,7 +2715,7 @@  discard block
 block discarded – undo
2715 2715
 	if ($action == 'unsign') {
2716 2716
 		$text = $langs->trans('ConfirmUnsignShipping');
2717 2717
 		if (isModEnabled('notification')) {
2718
-			require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
2718
+			require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
2719 2719
 			$notify = new Notify($db);
2720 2720
 			$text .= '<br>';
2721 2721
 			$text .= $notify->confirmMessage('SHIPPING_MODIFY', $object->socid, $object);
@@ -2751,14 +2751,14 @@  discard block
 block discarded – undo
2751 2751
 	}
2752 2752
 
2753 2753
 	// Shipment card
2754
-	$linkback = '<a href="' . DOL_URL_ROOT . '/expedition/list.php?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
2754
+	$linkback = '<a href="'.DOL_URL_ROOT.'/expedition/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
2755 2755
 	$morehtmlref = '<div class="refidno">';
2756 2756
 	// Ref customer shipment
2757 2757
 	$morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->hasRight('expedition', 'creer'), 'string', '', 0, 1);
2758
-	$morehtmlref .= $form->editfieldval("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->hasRight('expedition', 'creer'), 'string' . (isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1);
2758
+	$morehtmlref .= $form->editfieldval("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->hasRight('expedition', 'creer'), 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1);
2759 2759
 
2760 2760
 	// Thirdparty
2761
-	$morehtmlref .= '<br>' . $object->thirdparty->getNomUrl(1);
2761
+	$morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1);
2762 2762
 
2763 2763
 	// Project
2764 2764
 	if ($origin && $origin_id > 0) {
@@ -2790,16 +2790,16 @@  discard block
 block discarded – undo
2790 2790
 			if ($permissiontoadd) {
2791 2791
 				$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
2792 2792
 				if ($action != 'classify') {
2793
-					$morehtmlref .= '<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> ';
2793
+					$morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> ';
2794 2794
 				}
2795
-				$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
2795
+				$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
2796 2796
 			} else {
2797 2797
 				if (!empty($object->fk_project)) {
2798 2798
 					$proj = new Project($db);
2799 2799
 					$proj->fetch($object->fk_project);
2800 2800
 					$morehtmlref .= $proj->getNomUrl(1);
2801 2801
 					if ($proj->title) {
2802
-						$morehtmlref .= '<span class="opacitymedium"> - ' . dol_escape_htmltag($proj->title) . '</span>';
2802
+						$morehtmlref .= '<span class="opacitymedium"> - '.dol_escape_htmltag($proj->title).'</span>';
2803 2803
 					}
2804 2804
 				}
2805 2805
 			}
@@ -2818,7 +2818,7 @@  discard block
 block discarded – undo
2818 2818
 	// Linked documents
2819 2819
 	if (!empty($typeobject) && $typeobject == 'commande' && $object->origin_object->id && isModEnabled('order')) {
2820 2820
 		print '<tr><td>';
2821
-		print $langs->trans("RefOrder") . '</td>';
2821
+		print $langs->trans("RefOrder").'</td>';
2822 2822
 		print '<td>';
2823 2823
 		print $objectsrc->getNomUrl(1, 'commande');
2824 2824
 		print "</td>\n";
@@ -2826,7 +2826,7 @@  discard block
 block discarded – undo
2826 2826
 	}
2827 2827
 	if (!empty($typeobject) && $typeobject == 'propal' && $object->origin_object->id && isModEnabled("propal")) {
2828 2828
 		print '<tr><td>';
2829
-		print $langs->trans("RefProposal") . '</td>';
2829
+		print $langs->trans("RefProposal").'</td>';
2830 2830
 		print '<td>';
2831 2831
 		print $objectsrc->getNomUrl(1, 'expedition');
2832 2832
 		print "</td>\n";
@@ -2834,8 +2834,8 @@  discard block
 block discarded – undo
2834 2834
 	}
2835 2835
 
2836 2836
 	// Date creation
2837
-	print '<tr><td class="titlefieldmiddle">' . $langs->trans("DateCreation") . '</td>';
2838
-	print '<td>' . dol_print_date($object->date_creation, "dayhour") . "</td>\n";
2837
+	print '<tr><td class="titlefieldmiddle">'.$langs->trans("DateCreation").'</td>';
2838
+	print '<td>'.dol_print_date($object->date_creation, "dayhour")."</td>\n";
2839 2839
 	print '</tr>';
2840 2840
 
2841 2841
 	// Delivery date planned
@@ -2844,16 +2844,16 @@  discard block
 block discarded – undo
2844 2844
 	print $langs->trans('DateDeliveryPlanned');
2845 2845
 	print '</td>';
2846 2846
 	if ($action != 'editdate_livraison') {
2847
-		print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editdate_livraison&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->trans('SetDeliveryDate'), 1) . '</a></td>';
2847
+		print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editdate_livraison&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).'</a></td>';
2848 2848
 	}
2849 2849
 	print '</tr></table>';
2850 2850
 	print '</td><td>';
2851 2851
 	if ($action == 'editdate_livraison') {
2852
-		print '<form name="setdate_livraison" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
2853
-		print '<input type="hidden" name="token" value="' . newToken() . '">';
2852
+		print '<form name="setdate_livraison" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
2853
+		print '<input type="hidden" name="token" value="'.newToken().'">';
2854 2854
 		print '<input type="hidden" name="action" value="setdate_livraison">';
2855 2855
 		print $form->selectDate($object->date_delivery ? $object->date_delivery : -1, 'liv_', 1, 1, 0, "setdate_livraison", 1, 0);
2856
-		print '<input type="submit" class="button button-edit smallpaddingimp" value="' . $langs->trans('Modify') . '">';
2856
+		print '<input type="submit" class="button button-edit smallpaddingimp" value="'.$langs->trans('Modify').'">';
2857 2857
 		print '</form>';
2858 2858
 	} else {
2859 2859
 		print $object->date_delivery ? dol_print_date($object->date_delivery, 'dayhour') : '&nbsp;';
@@ -2867,16 +2867,16 @@  discard block
 block discarded – undo
2867 2867
 	print $langs->trans('DateShipping');
2868 2868
 	print '</td>';
2869 2869
 	if ($action != 'editdate_shipping') {
2870
-		print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editdate_shipping&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->trans('SetShippingDate'), 1) . '</a></td>';
2870
+		print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editdate_shipping&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetShippingDate'), 1).'</a></td>';
2871 2871
 	}
2872 2872
 	print '</tr></table>';
2873 2873
 	print '</td><td>';
2874 2874
 	if ($action == 'editdate_shipping') {
2875
-		print '<form name="setdate_shipping" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
2876
-		print '<input type="hidden" name="token" value="' . newToken() . '">';
2875
+		print '<form name="setdate_shipping" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
2876
+		print '<input type="hidden" name="token" value="'.newToken().'">';
2877 2877
 		print '<input type="hidden" name="action" value="setdate_shipping">';
2878 2878
 		print $form->selectDate($object->date_shipping ? $object->date_shipping : -1, 'ship_', 1, 1, 0, "setdate_shipping", 1, 0);
2879
-		print '<input type="submit" class="button button-edit smallpaddingimp" value="' . $langs->trans('Modify') . '">';
2879
+		print '<input type="submit" class="button button-edit smallpaddingimp" value="'.$langs->trans('Modify').'">';
2880 2880
 		print '</form>';
2881 2881
 	} else {
2882 2882
 		print $object->date_shipping ? dol_print_date($object->date_shipping, 'dayhour') : '&nbsp;';
@@ -2890,24 +2890,24 @@  discard block
 block discarded – undo
2890 2890
 	print '</td><td>';
2891 2891
 
2892 2892
 	if ($action == 'edittrueWeight') {
2893
-		print '<form name="settrueweight" action="' . $_SERVER["PHP_SELF"] . '" method="post">';
2893
+		print '<form name="settrueweight" action="'.$_SERVER["PHP_SELF"].'" method="post">';
2894 2894
 		print '<input name="action" value="settrueWeight" type="hidden">';
2895
-		print '<input name="id" value="' . $object->id . '" type="hidden">';
2896
-		print '<input type="hidden" name="token" value="' . newToken() . '">';
2897
-		print '<input id="trueWeight" name="trueWeight" value="' . $object->trueWeight . '" type="text" class="width50 valignmiddle">';
2895
+		print '<input name="id" value="'.$object->id.'" type="hidden">';
2896
+		print '<input type="hidden" name="token" value="'.newToken().'">';
2897
+		print '<input id="trueWeight" name="trueWeight" value="'.$object->trueWeight.'" type="text" class="width50 valignmiddle">';
2898 2898
 		print $formproduct->selectMeasuringUnits("weight_units", "weight", (string) $object->weight_units, 0, 2, 'maxwidth125 valignmiddle');
2899
-		print ' <input class="button smallpaddingimp valignmiddle" name="modify" value="' . $langs->trans("Modify") . '" type="submit">';
2900
-		print ' <input class="button button-cancel smallpaddingimp valignmiddle" name="cancel" value="' . $langs->trans("Cancel") . '" type="submit">';
2899
+		print ' <input class="button smallpaddingimp valignmiddle" name="modify" value="'.$langs->trans("Modify").'" type="submit">';
2900
+		print ' <input class="button button-cancel smallpaddingimp valignmiddle" name="cancel" value="'.$langs->trans("Cancel").'" type="submit">';
2901 2901
 		print '</form>';
2902 2902
 	} else {
2903 2903
 		print $object->trueWeight;
2904
-		print ($object->trueWeight && $object->weight_units != '') ? ' ' . measuringUnitString(0, "weight", $object->weight_units) : '';
2904
+		print ($object->trueWeight && $object->weight_units != '') ? ' '.measuringUnitString(0, "weight", $object->weight_units) : '';
2905 2905
 	}
2906 2906
 
2907 2907
 	// Calculated
2908 2908
 	if ($totalWeight > 0) {
2909 2909
 		if (!empty($object->trueWeight)) {
2910
-			print ' (' . $langs->trans("SumOfProductWeights") . ': ';
2910
+			print ' ('.$langs->trans("SumOfProductWeights").': ';
2911 2911
 		}
2912 2912
 		print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, getDolGlobalInt('MAIN_WEIGHT_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_WEIGHT_DEFAULT_UNIT', 'no'));
2913 2913
 		if (!empty($object->trueWeight)) {
@@ -2917,34 +2917,34 @@  discard block
 block discarded – undo
2917 2917
 	print '</td></tr>';
2918 2918
 
2919 2919
 	// Width
2920
-	print '<tr><td>' . $form->editfieldkey("Width", 'trueWidth', $object->trueWidth, $object, $user->hasRight('expedition', 'creer')) . '</td><td>';
2920
+	print '<tr><td>'.$form->editfieldkey("Width", 'trueWidth', $object->trueWidth, $object, $user->hasRight('expedition', 'creer')).'</td><td>';
2921 2921
 	print $form->editfieldval("Width", 'trueWidth', $object->trueWidth, $object, $user->hasRight('expedition', 'creer'));
2922
-	print ($object->trueWidth && $object->width_units != '') ? ' ' . measuringUnitString(0, "size", $object->width_units) : '';
2922
+	print ($object->trueWidth && $object->width_units != '') ? ' '.measuringUnitString(0, "size", $object->width_units) : '';
2923 2923
 	print '</td></tr>';
2924 2924
 
2925 2925
 	// Height
2926
-	print '<tr><td>' . $form->editfieldkey("Height", 'trueHeight', $object->trueHeight, $object, $user->hasRight('expedition', 'creer')) . '</td><td>';
2926
+	print '<tr><td>'.$form->editfieldkey("Height", 'trueHeight', $object->trueHeight, $object, $user->hasRight('expedition', 'creer')).'</td><td>';
2927 2927
 	if ($action == 'edittrueHeight') {
2928
-		print '<form name="settrueHeight" action="' . $_SERVER["PHP_SELF"] . '" method="post">';
2928
+		print '<form name="settrueHeight" action="'.$_SERVER["PHP_SELF"].'" method="post">';
2929 2929
 		print '<input name="action" value="settrueHeight" type="hidden">';
2930
-		print '<input name="id" value="' . $object->id . '" type="hidden">';
2931
-		print '<input type="hidden" name="token" value="' . newToken() . '">';
2932
-		print '<input id="trueHeight" name="trueHeight" value="' . $object->trueHeight . '" type="text" class="width50">';
2930
+		print '<input name="id" value="'.$object->id.'" type="hidden">';
2931
+		print '<input type="hidden" name="token" value="'.newToken().'">';
2932
+		print '<input id="trueHeight" name="trueHeight" value="'.$object->trueHeight.'" type="text" class="width50">';
2933 2933
 		print $formproduct->selectMeasuringUnits("size_units", "size", $object->size_units, 0, 2);
2934
-		print ' <input class="button smallpaddingimp" name="modify" value="' . $langs->trans("Modify") . '" type="submit">';
2935
-		print ' <input class="button button-cancel smallpaddingimp" name="cancel" value="' . $langs->trans("Cancel") . '" type="submit">';
2934
+		print ' <input class="button smallpaddingimp" name="modify" value="'.$langs->trans("Modify").'" type="submit">';
2935
+		print ' <input class="button button-cancel smallpaddingimp" name="cancel" value="'.$langs->trans("Cancel").'" type="submit">';
2936 2936
 		print '</form>';
2937 2937
 	} else {
2938 2938
 		print $object->trueHeight;
2939
-		print ($object->trueHeight && $object->height_units != '') ? ' ' . measuringUnitString(0, "size", $object->height_units) : '';
2939
+		print ($object->trueHeight && $object->height_units != '') ? ' '.measuringUnitString(0, "size", $object->height_units) : '';
2940 2940
 	}
2941 2941
 
2942 2942
 	print '</td></tr>';
2943 2943
 
2944 2944
 	// Depth
2945
-	print '<tr><td>' . $form->editfieldkey("Depth", 'trueDepth', $object->trueDepth, $object, $user->hasRight('expedition', 'creer')) . '</td><td>';
2945
+	print '<tr><td>'.$form->editfieldkey("Depth", 'trueDepth', $object->trueDepth, $object, $user->hasRight('expedition', 'creer')).'</td><td>';
2946 2946
 	print $form->editfieldval("Depth", 'trueDepth', $object->trueDepth, $object, $user->hasRight('expedition', 'creer'));
2947
-	print ($object->trueDepth && $object->depth_units != '') ? ' ' . measuringUnitString(0, "size", $object->depth_units) : '';
2947
+	print ($object->trueDepth && $object->depth_units != '') ? ' '.measuringUnitString(0, "size", $object->depth_units) : '';
2948 2948
 	print '</td></tr>';
2949 2949
 
2950 2950
 	// Volume
@@ -2963,12 +2963,12 @@  discard block
 block discarded – undo
2963 2963
 		if ($volumeUnit < 50) {
2964 2964
 			print showDimensionInBestUnit($calculatedVolume, $volumeUnit, "volume", $langs, getDolGlobalInt('MAIN_VOLUME_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_VOLUME_DEFAULT_UNIT', 'no'));
2965 2965
 		} else {
2966
-			print $calculatedVolume . ' ' . measuringUnitString(0, "volume", $volumeUnit);
2966
+			print $calculatedVolume.' '.measuringUnitString(0, "volume", $volumeUnit);
2967 2967
 		}
2968 2968
 	}
2969 2969
 	if ($totalVolume > 0) {
2970 2970
 		if ($calculatedVolume) {
2971
-			print ' (' . $langs->trans("SumOfProductVolumes") . ': ';
2971
+			print ' ('.$langs->trans("SumOfProductVolumes").': ';
2972 2972
 		}
2973 2973
 		print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, getDolGlobalInt('MAIN_VOLUME_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_VOLUME_DEFAULT_UNIT', 'no'));
2974 2974
 		//if (empty($calculatedVolume)) print ' ('.$langs->trans("Calculated").')';
@@ -2981,7 +2981,7 @@  discard block
 block discarded – undo
2981 2981
 
2982 2982
 	// Other attributes
2983 2983
 	//$cols = 2;
2984
-	include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
2984
+	include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
2985 2985
 
2986 2986
 	print '</table>';
2987 2987
 
@@ -2998,33 +2998,33 @@  discard block
 block discarded – undo
2998 2998
 	print '</td>';
2999 2999
 
3000 3000
 	if ($action != 'editshipping_method_id' && $permissiontoadd) {
3001
-		print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editshipping_method_id&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->trans('SetSendingMethod'), 1) . '</a></td>';
3001
+		print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editshipping_method_id&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetSendingMethod'), 1).'</a></td>';
3002 3002
 	}
3003 3003
 	print '</tr></table>';
3004 3004
 	print '</td><td>';
3005 3005
 	if ($action == 'editshipping_method_id') {
3006
-		print '<form name="setshipping_method_id" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
3007
-		print '<input type="hidden" name="token" value="' . newToken() . '">';
3006
+		print '<form name="setshipping_method_id" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
3007
+		print '<input type="hidden" name="token" value="'.newToken().'">';
3008 3008
 		print '<input type="hidden" name="action" value="setshipping_method_id">';
3009 3009
 		$object->fetch_delivery_methods();
3010 3010
 		print $form->selectarray("shipping_method_id", $object->meths, $object->shipping_method_id, 1, 0, 0, "", 1);
3011 3011
 		if ($user->admin) {
3012 3012
 			print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
3013 3013
 		}
3014
-		print '<input type="submit" class="button button-edit smallpaddingimp" value="' . $langs->trans('Modify') . '">';
3014
+		print '<input type="submit" class="button button-edit smallpaddingimp" value="'.$langs->trans('Modify').'">';
3015 3015
 		print '</form>';
3016 3016
 	} else {
3017 3017
 		if ($object->shipping_method_id > 0) {
3018 3018
 			// Get code using getLabelFromKey
3019 3019
 			$code = $langs->getLabelFromKey($db, (string) $object->shipping_method_id, 'c_shipment_mode', 'rowid', 'code');
3020
-			print $langs->trans("SendingMethod" . strtoupper($code));
3020
+			print $langs->trans("SendingMethod".strtoupper($code));
3021 3021
 		}
3022 3022
 	}
3023 3023
 	print '</td>';
3024 3024
 	print '</tr>';
3025 3025
 
3026 3026
 	// Tracking Number
3027
-	print '<tr><td class="titlefieldmiddle">' . $form->editfieldkey("TrackingNumber", 'tracking_number', $object->tracking_number, $object, $user->hasRight('expedition', 'creer')) . '</td><td>';
3027
+	print '<tr><td class="titlefieldmiddle">'.$form->editfieldkey("TrackingNumber", 'tracking_number', $object->tracking_number, $object, $user->hasRight('expedition', 'creer')).'</td><td>';
3028 3028
 	print $form->editfieldval("TrackingNumber", 'tracking_number', $object->tracking_url, $object, $user->hasRight('expedition', 'creer'), 'safehtmlstring', $object->tracking_number);
3029 3029
 	print '</td></tr>';
3030 3030
 
@@ -3035,7 +3035,7 @@  discard block
 block discarded – undo
3035 3035
 		print $langs->trans('IncotermLabel');
3036 3036
 		print '<td><td class="right">';
3037 3037
 		if ($permissiontoadd) {
3038
-			print '<a class="editfielda" href="' . DOL_URL_ROOT . '/expedition/card.php?id=' . $object->id . '&action=editincoterm&token=' . newToken() . '">' . img_edit() . '</a>';
3038
+			print '<a class="editfielda" href="'.DOL_URL_ROOT.'/expedition/card.php?id='.$object->id.'&action=editincoterm&token='.newToken().'">'.img_edit().'</a>';
3039 3039
 		} else {
3040 3040
 			print '&nbsp;';
3041 3041
 		}
@@ -3045,7 +3045,7 @@  discard block
 block discarded – undo
3045 3045
 		if ($action != 'editincoterm') {
3046 3046
 			print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1);
3047 3047
 		} else {
3048
-			print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'] . '?id=' . $object->id);
3048
+			print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'].'?id='.$object->id);
3049 3049
 		}
3050 3050
 		print '</td></tr>';
3051 3051
 	}
@@ -3122,11 +3122,11 @@  discard block
 block discarded – undo
3122 3122
 	// Lines of products of origin
3123 3123
 	if (!empty($object->origin) && $object->origin_id > 0) {
3124 3124
 		if ($action == 'editline') {
3125
-			print '	<form name="updateline" id="updateline" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;lineid=' . $line_id . '" method="POST">
3126
-			<input type="hidden" name="token" value="' . newToken() . '">
3125
+			print '	<form name="updateline" id="updateline" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;lineid='.$line_id.'" method="POST">
3126
+			<input type="hidden" name="token" value="' . newToken().'">
3127 3127
 			<input type="hidden" name="action" value="updateline">
3128 3128
 			<input type="hidden" name="mode" value="">
3129
-			<input type="hidden" name="id" value="' . $object->id . '">
3129
+			<input type="hidden" name="id" value="' . $object->id.'">
3130 3130
 			';
3131 3131
 		}
3132 3132
 		print '<br>';
@@ -3140,11 +3140,11 @@  discard block
 block discarded – undo
3140 3140
 			print '<td width="5" class="center linecolnum">&nbsp;</td>';
3141 3141
 		}
3142 3142
 		// Product/Service
3143
-		print '<td  class="linecoldescription" >' . $langs->trans("Products") . '</td>';
3143
+		print '<td  class="linecoldescription" >'.$langs->trans("Products").'</td>';
3144 3144
 		// Qty
3145
-		print '<td class="center linecolqty">' . $langs->trans("QtyOrdered") . '</td>';
3145
+		print '<td class="center linecolqty">'.$langs->trans("QtyOrdered").'</td>';
3146 3146
 		if ($origin_id > 0) {
3147
-			print '<td class="center linecolqtyinothershipments">' . $langs->trans("QtyInOtherShipments") . '</td>';
3147
+			print '<td class="center linecolqtyinothershipments">'.$langs->trans("QtyInOtherShipments").'</td>';
3148 3148
 		}
3149 3149
 		if ($action == 'editline') {
3150 3150
 			$editColspan = 3;
@@ -3154,35 +3154,35 @@  discard block
 block discarded – undo
3154 3154
 			if (!isModEnabled('productbatch')) {
3155 3155
 				$editColspan--;
3156 3156
 			}
3157
-			print '<td class="center linecoleditlineotherinfo" colspan="' . $editColspan . '">';
3157
+			print '<td class="center linecoleditlineotherinfo" colspan="'.$editColspan.'">';
3158 3158
 			if ($object->status <= 1) {
3159 3159
 				print $langs->trans("QtyToShip");
3160 3160
 			} else {
3161 3161
 				print $langs->trans("QtyShipped");
3162 3162
 			}
3163 3163
 			if (isModEnabled('stock')) {
3164
-				print ' - ' . $langs->trans("WarehouseSource");
3164
+				print ' - '.$langs->trans("WarehouseSource");
3165 3165
 			}
3166 3166
 			if (isModEnabled('productbatch')) {
3167
-				print ' - ' . $langs->trans("Batch");
3167
+				print ' - '.$langs->trans("Batch");
3168 3168
 			}
3169 3169
 			print '</td>';
3170 3170
 		} else {
3171 3171
 			if ($object->status <= 1) {
3172
-				print '<td class="center linecolqtytoship">' . $langs->trans("QtyToShip") . '</td>';
3172
+				print '<td class="center linecolqtytoship">'.$langs->trans("QtyToShip").'</td>';
3173 3173
 			} else {
3174
-				print '<td class="center linecolqtyshipped">' . $langs->trans("QtyShipped") . '</td>';
3174
+				print '<td class="center linecolqtyshipped">'.$langs->trans("QtyShipped").'</td>';
3175 3175
 			}
3176 3176
 			if (isModEnabled('stock')) {
3177
-				print '<td class="left linecolwarehousesource">' . $langs->trans("WarehouseSource") . '</td>';
3177
+				print '<td class="left linecolwarehousesource">'.$langs->trans("WarehouseSource").'</td>';
3178 3178
 			}
3179 3179
 
3180 3180
 			if (isModEnabled('productbatch')) {
3181
-				print '<td class="left linecolbatch">' . $langs->trans("Batch") . '</td>';
3181
+				print '<td class="left linecolbatch">'.$langs->trans("Batch").'</td>';
3182 3182
 			}
3183 3183
 		}
3184
-		print '<td class="center linecolweight">' . $langs->trans("CalculatedWeight") . '</td>';
3185
-		print '<td class="center linecolvolume">' . $langs->trans("CalculatedVolume") . '</td>';
3184
+		print '<td class="center linecolweight">'.$langs->trans("CalculatedWeight").'</td>';
3185
+		print '<td class="center linecolvolume">'.$langs->trans("CalculatedVolume").'</td>';
3186 3186
 		//print '<td class="center">'.$langs->trans("Size").'</td>';
3187 3187
 		if ($object->status == 0) {
3188 3188
 			print '<td class="linecoledit"></td>';
@@ -3217,13 +3217,13 @@  discard block
 block discarded – undo
3217 3217
 			//if (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY')) $sql .= ", l.rowid as livraison_id, l.ref as livraison_ref, l.date_delivery, ld.qty as qty_received";
3218 3218
 			$sql .= ', p.label as product_label, p.ref, p.fk_product_type, p.rowid as prodid, p.tosell as product_tosell, p.tobuy as product_tobuy, p.tobatch as product_tobatch';
3219 3219
 			$sql .= ', p.description as product_desc';
3220
-			$sql .= " FROM " . MAIN_DB_PREFIX . "expeditiondet as ed";
3221
-			$sql .= ", " . MAIN_DB_PREFIX . "expedition as e";
3222
-			$sql .= ", " . MAIN_DB_PREFIX . $origin . "det as obj";
3220
+			$sql .= " FROM ".MAIN_DB_PREFIX."expeditiondet as ed";
3221
+			$sql .= ", ".MAIN_DB_PREFIX."expedition as e";
3222
+			$sql .= ", ".MAIN_DB_PREFIX.$origin."det as obj";
3223 3223
 			//if (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY')) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."delivery as l ON l.fk_expedition = e.rowid LEFT JOIN ".MAIN_DB_PREFIX."deliverydet as ld ON ld.fk_delivery = l.rowid  AND obj.rowid = ld.fk_origin_line";
3224
-			$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON obj.fk_product = p.rowid";
3225
-			$sql .= " WHERE e.entity IN (" . getEntity('expedition') . ")";
3226
-			$sql .= " AND obj.fk_" . $origin . " = " . ((int) $origin_id);
3224
+			$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON obj.fk_product = p.rowid";
3225
+			$sql .= " WHERE e.entity IN (".getEntity('expedition').")";
3226
+			$sql .= " AND obj.fk_".$origin." = ".((int) $origin_id);
3227 3227
 			$sql .= " AND obj.rowid = ed.fk_elementdet";
3228 3228
 			$sql .= " AND ed.fk_expedition = e.rowid";
3229 3229
 			//if ($filter) $sql.= $filter;
@@ -3269,12 +3269,12 @@  discard block
 block discarded – undo
3269 3269
 			}
3270 3270
 
3271 3271
 			if (empty($reshook) && $lines[$i]->product_type != "9") {
3272
-				print '<!-- origin line id = ' . $lines[$i]->origin_line_id . ' -->'; // id of order line
3273
-				print '<tr class="oddeven" id="row-' . $lines[$i]->id . '" data-id="' . $lines[$i]->id . '" data-element="' . $lines[$i]->element . '" >';
3272
+				print '<!-- origin line id = '.$lines[$i]->origin_line_id.' -->'; // id of order line
3273
+				print '<tr class="oddeven" id="row-'.$lines[$i]->id.'" data-id="'.$lines[$i]->id.'" data-element="'.$lines[$i]->element.'" >';
3274 3274
 
3275 3275
 				// #
3276 3276
 				if (getDolGlobalString('MAIN_VIEW_LINE_NUMBER')) {
3277
-					print '<td class="center linecolnum">' . ($i + 1) . '</td>';
3277
+					print '<td class="center linecolnum">'.($i + 1).'</td>';
3278 3278
 				}
3279 3279
 
3280 3280
 				// Predefined product or service
@@ -3319,12 +3319,12 @@  discard block
 block discarded – undo
3319 3319
 					$product_static->stockable_product = $lines[$i]->stockable_product;
3320 3320
 
3321 3321
 					$text = $product_static->getNomUrl(1);
3322
-					$text .= ' - ' . $label;
3322
+					$text .= ' - '.$label;
3323 3323
 					$description = (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE') ? '' : dol_htmlentitiesbr($lines[$i]->description));
3324 3324
 					print $form->textwithtooltip($text, $description, 3, 0, '', (string) $i);
3325 3325
 					print_date_range(!empty($lines[$i]->date_start) ? $lines[$i]->date_start : '', !empty($lines[$i]->date_end) ? $lines[$i]->date_end : '');
3326 3326
 					if (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE')) {
3327
-						print (!empty($lines[$i]->description) && $lines[$i]->description != $lines[$i]->product) ? '<br>' . dol_htmlentitiesbr($lines[$i]->description) : '';
3327
+						print (!empty($lines[$i]->description) && $lines[$i]->description != $lines[$i]->product) ? '<br>'.dol_htmlentitiesbr($lines[$i]->description) : '';
3328 3328
 					}
3329 3329
 					print "</td>\n";
3330 3330
 				} else {
@@ -3336,10 +3336,10 @@  discard block
 block discarded – undo
3336 3336
 					}
3337 3337
 
3338 3338
 					if (!empty($lines[$i]->label)) {
3339
-						$text .= ' <strong>' . $lines[$i]->label . '</strong>';
3339
+						$text .= ' <strong>'.$lines[$i]->label.'</strong>';
3340 3340
 						print $form->textwithtooltip($text, $lines[$i]->description, 3, 0, '', (string) $i);
3341 3341
 					} else {
3342
-						print $text . ' ' . nl2br($lines[$i]->description);
3342
+						print $text.' '.nl2br($lines[$i]->description);
3343 3343
 					}
3344 3344
 
3345 3345
 					print_date_range($lines[$i]->date_start, $lines[$i]->date_end);
@@ -3352,7 +3352,7 @@  discard block
 block discarded – undo
3352 3352
 				}
3353 3353
 
3354 3354
 				// Qty ordered
3355
-				print '<td class="center linecolqty">' . $lines[$i]->qty_asked . ' ' . $unit_order . '</td>';
3355
+				print '<td class="center linecolqty">'.$lines[$i]->qty_asked.' '.$unit_order.'</td>';
3356 3356
 
3357 3357
 				// Qty in other shipments (with shipment and warehouse used)
3358 3358
 				if ($origin_id > 0) {
@@ -3373,8 +3373,8 @@  discard block
 block discarded – undo
3373 3373
 								}
3374 3374
 								$shipment_static->fetch($shipmentline_var['shipment_id']);
3375 3375
 								$htmltooltip .= $shipment_static->getNomUrl(1, '', 0, 0, 1);
3376
-								$htmltooltip .= ' - ' . $shipmentline_var['qty_shipped'];
3377
-								$htmltooltip .= ' - ' . $langs->trans("DateValidation") . ' : ' . (empty($shipmentline_var['date_valid']) ? $langs->trans("Draft") : dol_print_date($shipmentline_var['date_valid'], 'dayhour'));
3376
+								$htmltooltip .= ' - '.$shipmentline_var['qty_shipped'];
3377
+								$htmltooltip .= ' - '.$langs->trans("DateValidation").' : '.(empty($shipmentline_var['date_valid']) ? $langs->trans("Draft") : dol_print_date($shipmentline_var['date_valid'], 'dayhour'));
3378 3378
 								/*if (isModEnabled('stock') && $shipmentline_var['warehouse'] > 0) {
3379 3379
 									$warehousestatic->fetch($shipmentline_var['warehouse']);
3380 3380
 									$htmltext .= '<br>'.$langs->trans("FromLocation").' : '.$warehousestatic->getNomUrl(1, '', 0, 1);
@@ -3384,39 +3384,39 @@  discard block
 block discarded – undo
3384 3384
 								$qtyalreadysent += $shipmentline_var['qty_shipped'];
3385 3385
 							}
3386 3386
 							if ($j) {
3387
-								$htmltooltip = $langs->trans("QtyInOtherShipments") . '...<br><br>' . $htmltooltip . '<br><input type="submit" name="dummyhiddenbuttontogetfocus" style="display:none" autofocus>';
3387
+								$htmltooltip = $langs->trans("QtyInOtherShipments").'...<br><br>'.$htmltooltip.'<br><input type="submit" name="dummyhiddenbuttontogetfocus" style="display:none" autofocus>';
3388 3388
 							}
3389 3389
 						}
3390 3390
 					}
3391
-					print $form->textwithpicto((string) $qtyalreadysent, $htmltooltip, 1, 'info', '', 0, 3, 'tooltip' . $lines[$i]->id);
3391
+					print $form->textwithpicto((string) $qtyalreadysent, $htmltooltip, 1, 'info', '', 0, 3, 'tooltip'.$lines[$i]->id);
3392 3392
 					print '</td>';
3393 3393
 				}
3394 3394
 
3395 3395
 				if ($action == 'editline' && $lines[$i]->id == $line_id) {
3396 3396
 					// edit mode
3397
-					print '<td colspan="' . $editColspan . '" class="center"><table class="nobordernopadding centpercent">';
3397
+					print '<td colspan="'.$editColspan.'" class="center"><table class="nobordernopadding centpercent">';
3398 3398
 					if (is_array($lines[$i]->detail_batch) && count($lines[$i]->detail_batch) > 0) {
3399 3399
 						print '<!-- case edit 1 -->';
3400 3400
 						$line = new ExpeditionLigne($db);
3401 3401
 						foreach ($lines[$i]->detail_batch as $detail_batch) {
3402 3402
 							print '<tr>';
3403 3403
 							// Qty to ship or shipped
3404
-							print '<td><input class="qtyl right" name="qtyl' . $detail_batch->fk_expeditiondet . '_' . $detail_batch->id . '" id="qtyl' . $line_id . '_' . $detail_batch->id . '" type="text" size="4" value="' . $detail_batch->qty . '"></td>';
3404
+							print '<td><input class="qtyl right" name="qtyl'.$detail_batch->fk_expeditiondet.'_'.$detail_batch->id.'" id="qtyl'.$line_id.'_'.$detail_batch->id.'" type="text" size="4" value="'.$detail_batch->qty.'"></td>';
3405 3405
 							// Batch number management
3406 3406
 							if ($lines[$i]->entrepot_id == 0) {
3407 3407
 								// only show lot numbers from src warehouse when shipping from multiple warehouses
3408 3408
 								$line->fetch($detail_batch->fk_expeditiondet);
3409 3409
 							}
3410 3410
 							$entrepot_id = !empty($detail_batch->entrepot_id) ? $detail_batch->entrepot_id : $lines[$i]->entrepot_id;
3411
-							print '<td>' . $formproduct->selectLotStock($detail_batch->fk_origin_stock, 'batchl' . $detail_batch->fk_expeditiondet . '_' . $detail_batch->fk_origin_stock, '', 1, 0, $lines[$i]->fk_product, $entrepot_id) . '</td>';
3411
+							print '<td>'.$formproduct->selectLotStock($detail_batch->fk_origin_stock, 'batchl'.$detail_batch->fk_expeditiondet.'_'.$detail_batch->fk_origin_stock, '', 1, 0, $lines[$i]->fk_product, $entrepot_id).'</td>';
3412 3412
 							print '</tr>';
3413 3413
 						}
3414 3414
 						// add a 0 qty lot row to be able to add a lot
3415 3415
 						print '<tr>';
3416 3416
 						// Qty to ship or shipped
3417
-						print '<td><input class="qtyl" name="qtyl' . $line_id . '_0" id="qtyl' . $line_id . '_0" type="text" size="4" value="0"></td>';
3417
+						print '<td><input class="qtyl" name="qtyl'.$line_id.'_0" id="qtyl'.$line_id.'_0" type="text" size="4" value="0"></td>';
3418 3418
 						// Batch number management
3419
-						print '<td>' . $formproduct->selectLotStock('', 'batchl' . $line_id . '_0', '', 1, 0, $lines[$i]->fk_product) . '</td>';
3419
+						print '<td>'.$formproduct->selectLotStock('', 'batchl'.$line_id.'_0', '', 1, 0, $lines[$i]->fk_product).'</td>';
3420 3420
 						print '</tr>';
3421 3421
 					} elseif (isModEnabled('stock')) {
3422 3422
 						if ($lines[$i]->fk_product > 0) {
@@ -3424,13 +3424,13 @@  discard block
 block discarded – undo
3424 3424
 								print '<!-- case edit 2 -->';
3425 3425
 								print '<tr>';
3426 3426
 								// Qty to ship or shipped
3427
-								print '<td><input class="qtyl right" name="qtyl' . $line_id . '" id="qtyl' . $line_id . '" type="text" size="4" value="' . $lines[$i]->qty_shipped . '">' . $unit_order . '</td>';
3427
+								print '<td><input class="qtyl right" name="qtyl'.$line_id.'" id="qtyl'.$line_id.'" type="text" size="4" value="'.$lines[$i]->qty_shipped.'">'.$unit_order.'</td>';
3428 3428
 								// Warehouse source
3429
-								print '<td>' . $formproduct->selectWarehouses($lines[$i]->entrepot_id, 'entl' . $line_id, '', 1, 0, $lines[$i]->fk_product, '', 1, 0, array(), 'minwidth200') . '</td>';
3429
+								print '<td>'.$formproduct->selectWarehouses($lines[$i]->entrepot_id, 'entl'.$line_id, '', 1, 0, $lines[$i]->fk_product, '', 1, 0, array(), 'minwidth200').'</td>';
3430 3430
 								// Batch number management
3431 3431
 								print '<td>';
3432 3432
 								if (isModEnabled('productbatch')) {
3433
-									print ' - ' . $langs->trans("NA");
3433
+									print ' - '.$langs->trans("NA");
3434 3434
 								}
3435 3435
 								print '</td>';
3436 3436
 								print '</tr>';
@@ -3439,13 +3439,13 @@  discard block
 block discarded – undo
3439 3439
 								foreach ($lines[$i]->details_entrepot as $detail_entrepot) {
3440 3440
 									print '<tr>';
3441 3441
 									// Qty to ship or shipped
3442
-									print '<td><input class="qtyl right" name="qtyl' . $detail_entrepot->line_id . '" id="qtyl' . $detail_entrepot->line_id . '" type="text" size="4" value="' . $detail_entrepot->qty_shipped . '">' . $unit_order . '</td>';
3442
+									print '<td><input class="qtyl right" name="qtyl'.$detail_entrepot->line_id.'" id="qtyl'.$detail_entrepot->line_id.'" type="text" size="4" value="'.$detail_entrepot->qty_shipped.'">'.$unit_order.'</td>';
3443 3443
 									// Warehouse source
3444
-									print '<td>' . $formproduct->selectWarehouses($detail_entrepot->entrepot_id, 'entl' . $detail_entrepot->line_id, '', 1, 0, $lines[$i]->fk_product, '', 1, 0, array(), 'minwidth200') . '</td>';
3444
+									print '<td>'.$formproduct->selectWarehouses($detail_entrepot->entrepot_id, 'entl'.$detail_entrepot->line_id, '', 1, 0, $lines[$i]->fk_product, '', 1, 0, array(), 'minwidth200').'</td>';
3445 3445
 									// Batch number management
3446 3446
 									print '<td>';
3447 3447
 									if (isModEnabled('productbatch')) {
3448
-										print ' - ' . $langs->trans("NA");
3448
+										print ' - '.$langs->trans("NA");
3449 3449
 									}
3450 3450
 									print '</td>';
3451 3451
 									print '</tr>';
@@ -3454,19 +3454,19 @@  discard block
 block discarded – undo
3454 3454
 								print '<!-- case edit 4 -->';
3455 3455
 								print '<tr>';
3456 3456
 								// Qty to ship or shipped
3457
-								print '<td><input class="qtyl right" name="qtyl' . $line_id . '" id="qtyl' . $line_id . '" type="text" size="4" value="' . $lines[$i]->qty_shipped . '"></td>';
3458
-								print '<td><span class="opacitymedium">(' . $langs->trans("Service") . ')</span></td>';
3457
+								print '<td><input class="qtyl right" name="qtyl'.$line_id.'" id="qtyl'.$line_id.'" type="text" size="4" value="'.$lines[$i]->qty_shipped.'"></td>';
3458
+								print '<td><span class="opacitymedium">('.$langs->trans("Service").')</span></td>';
3459 3459
 								print '<td></td>';
3460 3460
 								print '</tr>';
3461 3461
 							} else {
3462 3462
 								print '<!-- case edit 5 -->';
3463
-								print '<tr><td colspan="3">' . $langs->trans("ErrorStockIsNotEnough") . '</td></tr>';
3463
+								print '<tr><td colspan="3">'.$langs->trans("ErrorStockIsNotEnough").'</td></tr>';
3464 3464
 							}
3465 3465
 						} else {
3466 3466
 							print '<!-- case edit 6 -->';
3467 3467
 							print '<tr>';
3468 3468
 							// Qty to ship or shipped
3469
-							print '<td><input class="qtyl right" name="qtyl' . $line_id . '" id="qtyl' . $line_id . '" type="text" size="4" value="' . $lines[$i]->qty_shipped . '">' . $unit_order . '</td>';
3469
+							print '<td><input class="qtyl right" name="qtyl'.$line_id.'" id="qtyl'.$line_id.'" type="text" size="4" value="'.$lines[$i]->qty_shipped.'">'.$unit_order.'</td>';
3470 3470
 							// Warehouse source
3471 3471
 							print '<td></td>';
3472 3472
 							// Batch number management
@@ -3477,7 +3477,7 @@  discard block
 block discarded – undo
3477 3477
 						print '<!-- case edit 7 -->';
3478 3478
 						print '<tr>';
3479 3479
 						// Qty to ship or shipped
3480
-						print '<td><input class="qtyl right" name="qtyl' . $line_id . '" id="qtyl' . $line_id . '" type="text" size="4" value="' . $lines[$i]->qty_shipped . '"></td>';
3480
+						print '<td><input class="qtyl right" name="qtyl'.$line_id.'" id="qtyl'.$line_id.'" type="text" size="4" value="'.$lines[$i]->qty_shipped.'"></td>';
3481 3481
 						// Warehouse source
3482 3482
 						print '<td></td>';
3483 3483
 						// Batch number management
@@ -3488,13 +3488,13 @@  discard block
 block discarded – undo
3488 3488
 					print '</table></td>';
3489 3489
 				} else {
3490 3490
 					// Qty to ship or shipped
3491
-					print '<td class="linecolqtytoship center">' . $lines[$i]->qty_shipped . ' ' . $unit_order . '</td>';
3491
+					print '<td class="linecolqtytoship center">'.$lines[$i]->qty_shipped.' '.$unit_order.'</td>';
3492 3492
 
3493 3493
 					// Warehouse source
3494 3494
 					if (isModEnabled('stock')) {
3495 3495
 						print '<td class="linecolwarehousesource tdoverflowmax200">';
3496 3496
 						if ($lines[$i]->product_type == Product::TYPE_SERVICE && getDolGlobalString('SHIPMENT_SUPPORTS_SERVICES')) {
3497
-							print '<span class="opacitymedium">(' . $langs->trans("Service") . ')</span>';
3497
+							print '<span class="opacitymedium">('.$langs->trans("Service").')</span>';
3498 3498
 						} elseif ($lines[$i]->entrepot_id > 0 && $lines[$i]->stockable_product == Product::ENABLED_STOCK) {
3499 3499
 							$warehouse_id = $lines[$i]->entrepot_id;
3500 3500
 							if (!isset($conf->cache['warehouse'][$warehouse_id])) {
@@ -3517,10 +3517,10 @@  discard block
 block discarded – undo
3517 3517
 									} else {
3518 3518
 										$warehouse = $conf->cache['warehouse'][$warehouse_id];
3519 3519
 									}
3520
-									$detail .= $langs->trans("DetailWarehouseFormat", $warehouse->label, $detail_entrepot->qty_shipped) . '<br>';
3520
+									$detail .= $langs->trans("DetailWarehouseFormat", $warehouse->label, $detail_entrepot->qty_shipped).'<br>';
3521 3521
 								}
3522 3522
 							}
3523
-							print $form->textwithtooltip(img_picto('', 'object_stock') . ' ' . $langs->trans("DetailWarehouseNumber"), $detail);
3523
+							print $form->textwithtooltip(img_picto('', 'object_stock').' '.$langs->trans("DetailWarehouseNumber"), $detail);
3524 3524
 						} elseif (count($lines[$i]->detail_children ?? []) > 1) {
3525 3525
 							$detail = '';
3526 3526
 							foreach ($lines[$i]->detail_children as $child_product_id => $child_stock_list) {
@@ -3534,7 +3534,7 @@  discard block
 block discarded – undo
3534 3534
 									} else {
3535 3535
 										$child_product = $conf->cache['product'][$child_product_id];
3536 3536
 									}
3537
-									$child_product_label = $child_product->ref . ' ' . $child_product->label;
3537
+									$child_product_label = $child_product->ref.' '.$child_product->label;
3538 3538
 
3539 3539
 									// get warehouse from cache
3540 3540
 									if (!isset($conf->cache['warehouse'][$warehouse_id])) {
@@ -3544,10 +3544,10 @@  discard block
 block discarded – undo
3544 3544
 									} else {
3545 3545
 										$child_warehouse = $conf->cache['warehouse'][$warehouse_id];
3546 3546
 									}
3547
-									$detail .= $langs->trans('DetailChildrenFormat', $child_product_label, $child_warehouse->label, price2num($total_qty, 'MS')) . '<br>';
3547
+									$detail .= $langs->trans('DetailChildrenFormat', $child_product_label, $child_warehouse->label, price2num($total_qty, 'MS')).'<br>';
3548 3548
 								}
3549 3549
 							}
3550
-							print $form->textwithtooltip(img_picto('', 'object_stock') . ' ' . $langs->trans('DetailWarehouseNumber'), $detail);
3550
+							print $form->textwithtooltip(img_picto('', 'object_stock').' '.$langs->trans('DetailWarehouseNumber'), $detail);
3551 3551
 						}
3552 3552
 						print '</td>';
3553 3553
 					}
@@ -3560,17 +3560,17 @@  discard block
 block discarded – undo
3560 3560
 							if ($lines[$i]->product_tobatch) {
3561 3561
 								$detail = '';
3562 3562
 								foreach ($lines[$i]->detail_batch as $dbatch) {	// $dbatch is instance of ExpeditionLineBatch
3563
-									$detail .= $langs->trans("Batch") . ': ' . $dbatch->batch;
3563
+									$detail .= $langs->trans("Batch").': '.$dbatch->batch;
3564 3564
 									if (!getDolGlobalString('PRODUCT_DISABLE_SELLBY')) {
3565
-										$detail .= ' - ' . $langs->trans("SellByDate") . ': ' . dol_print_date($dbatch->sellby, "day");
3565
+										$detail .= ' - '.$langs->trans("SellByDate").': '.dol_print_date($dbatch->sellby, "day");
3566 3566
 									}
3567 3567
 									if (!getDolGlobalString('PRODUCT_DISABLE_EATBY')) {
3568
-										$detail .= ' - ' . $langs->trans("EatByDate") . ': ' . dol_print_date($dbatch->eatby, "day");
3568
+										$detail .= ' - '.$langs->trans("EatByDate").': '.dol_print_date($dbatch->eatby, "day");
3569 3569
 									}
3570
-									$detail .= ' - ' . $langs->trans("Qty") . ': ' . $dbatch->qty;
3570
+									$detail .= ' - '.$langs->trans("Qty").': '.$dbatch->qty;
3571 3571
 									$detail .= '<br>';
3572 3572
 								}
3573
-								print $form->textwithtooltip(img_picto('', 'object_barcode') . ' ' . $langs->trans("DetailBatchNumber"), $detail);
3573
+								print $form->textwithtooltip(img_picto('', 'object_barcode').' '.$langs->trans("DetailBatchNumber"), $detail);
3574 3574
 							} else {
3575 3575
 								print $langs->trans("NA");
3576 3576
 							}
@@ -3584,7 +3584,7 @@  discard block
 block discarded – undo
3584 3584
 				// Weight
3585 3585
 				print '<td class="center linecolweight">';
3586 3586
 				if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) {
3587
-					print $lines[$i]->weight * $lines[$i]->qty_shipped . ' ' . measuringUnitString(0, "weight", $lines[$i]->weight_units);
3587
+					print $lines[$i]->weight * $lines[$i]->qty_shipped.' '.measuringUnitString(0, "weight", $lines[$i]->weight_units);
3588 3588
 				} else {
3589 3589
 					print '&nbsp;';
3590 3590
 				}
@@ -3593,7 +3593,7 @@  discard block
 block discarded – undo
3593 3593
 				// Volume
3594 3594
 				print '<td class="center linecolvolume">';
3595 3595
 				if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) {
3596
-					print $lines[$i]->volume * $lines[$i]->qty_shipped . ' ' . measuringUnitString(0, "volume", $lines[$i]->volume_units);
3596
+					print $lines[$i]->volume * $lines[$i]->qty_shipped.' '.measuringUnitString(0, "volume", $lines[$i]->volume_units);
3597 3597
 				} else {
3598 3598
 					print '&nbsp;';
3599 3599
 				}
@@ -3604,11 +3604,11 @@  discard block
 block discarded – undo
3604 3604
 
3605 3605
 				if ($action == 'editline' && $lines[$i]->id == $line_id) {
3606 3606
 					print '<td class="center" colspan="2" valign="middle">';
3607
-					print '<input type="submit" class="button button-save" id="savelinebutton marginbottomonly" name="save" value="' . $langs->trans("Save") . '"><br>';
3608
-					print '<input type="submit" class="button button-cancel" id="cancellinebutton" name="cancel" value="' . $langs->trans("Cancel") . '"><br>';
3607
+					print '<input type="submit" class="button button-save" id="savelinebutton marginbottomonly" name="save" value="'.$langs->trans("Save").'"><br>';
3608
+					print '<input type="submit" class="button button-cancel" id="cancellinebutton" name="cancel" value="'.$langs->trans("Cancel").'"><br>';
3609 3609
 					print '</td>';
3610 3610
 				} elseif ($object->status == Expedition::STATUS_DRAFT) {
3611
-					$edit_url = $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=editline&token=' . newToken() . '&lineid=' . $lines[$i]->id;
3611
+					$edit_url = $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=editline&token='.newToken().'&lineid='.$lines[$i]->id;
3612 3612
 					if (getDolGlobalInt('PRODUIT_SOUSPRODUITS')) {
3613 3613
 						$product_id = $lines[$i]->fk_product;
3614 3614
 						if (!isset($conf->cache['product'][$product_id])) {
@@ -3620,16 +3620,16 @@  discard block
 block discarded – undo
3620 3620
 						}
3621 3621
 
3622 3622
 						if ($product->hasFatherOrChild(1)) {
3623
-							$edit_url = dol_buildpath('/expedition/dispatch.php?id=' . $object->id, 1);
3623
+							$edit_url = dol_buildpath('/expedition/dispatch.php?id='.$object->id, 1);
3624 3624
 						}
3625 3625
 					}
3626 3626
 
3627 3627
 					// edit-delete buttons
3628 3628
 					print '<td class="linecoledit center">';
3629
-					print '<a class="editfielda reposition" href="' . $edit_url . '">' . img_edit() . '</a>';
3629
+					print '<a class="editfielda reposition" href="'.$edit_url.'">'.img_edit().'</a>';
3630 3630
 					print '</td>';
3631 3631
 					print '<td class="linecoldelete" width="10">';
3632
-					print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=deleteline&token=' . newToken() . '&lineid=' . $lines[$i]->id . '">' . img_delete() . '</a>';
3632
+					print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=deleteline&token='.newToken().'&lineid='.$lines[$i]->id.'">'.img_delete().'</a>';
3633 3633
 					print '</td>';
3634 3634
 
3635 3635
 					// Display lines extrafields
@@ -3675,7 +3675,7 @@  discard block
 block discarded – undo
3675 3675
 		}
3676 3676
 		// TODO Show also lines ordered but not delivered
3677 3677
 		if (empty($num_prod)) {
3678
-			print '<tr><td colspan="8"><span class="opacitymedium">' . $langs->trans("NoLineGoOnTabToAddSome", $langs->transnoentitiesnoconv("ShipmentDistribution")) . '</span></td></tr>';
3678
+			print '<tr><td colspan="8"><span class="opacitymedium">'.$langs->trans("NoLineGoOnTabToAddSome", $langs->transnoentitiesnoconv("ShipmentDistribution")).'</span></td></tr>';
3679 3679
 		}
3680 3680
 
3681 3681
 		print "</table>\n";
@@ -3704,21 +3704,21 @@  discard block
 block discarded – undo
3704 3704
 				if ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('expedition', 'creer'))
3705 3705
 					|| (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('expedition', 'shipping_advance', 'validate'))
3706 3706
 				) {
3707
-					print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"] . '?action=valid&token=' . newToken() . '&id=' . $object->id, '');
3707
+					print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=valid&token='.newToken().'&id='.$object->id, '');
3708 3708
 				} else {
3709
-					print dolGetButtonAction($langs->trans('NotAllowed'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF'] . '#', '', false);
3709
+					print dolGetButtonAction($langs->trans('NotAllowed'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
3710 3710
 				}
3711 3711
 			}
3712 3712
 
3713 3713
 			// 0=draft, 1=validated/delivered, 2=closed/delivered
3714 3714
 			if ($object->status == Expedition::STATUS_VALIDATED && !getDolGlobalString('STOCK_CALCULATE_ON_SHIPMENT')) {
3715 3715
 				if ($user->hasRight('expedition', 'creer')) {
3716
-					print dolGetButtonAction('', $langs->trans('SetToDraft'), 'default', $_SERVER["PHP_SELF"] . '?action=setdraft&token=' . newToken() . '&id=' . $object->id, '');
3716
+					print dolGetButtonAction('', $langs->trans('SetToDraft'), 'default', $_SERVER["PHP_SELF"].'?action=setdraft&token='.newToken().'&id='.$object->id, '');
3717 3717
 				}
3718 3718
 			}
3719 3719
 			if ($object->status == Expedition::STATUS_CLOSED) {
3720 3720
 				if ($user->hasRight('expedition', 'creer')) {
3721
-					print dolGetButtonAction('', $langs->trans('ReOpen'), 'default', $_SERVER["PHP_SELF"] . '?action=reopen&token=' . newToken() . '&id=' . $object->id, '');
3721
+					print dolGetButtonAction('', $langs->trans('ReOpen'), 'default', $_SERVER["PHP_SELF"].'?action=reopen&token='.newToken().'&id='.$object->id, '');
3722 3722
 				}
3723 3723
 			}
3724 3724
 
@@ -3726,9 +3726,9 @@  discard block
 block discarded – undo
3726 3726
 			if (empty($user->socid)) {
3727 3727
 				if ($object->status > 0) {
3728 3728
 					if (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('expedition', 'shipping_advance', 'send')) {
3729
-						print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER["PHP_SELF"] . '?action=presend&token=' . newToken() . '&id=' . $object->id . '&mode=init#formmailbeforetitle', '');
3729
+						print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', '');
3730 3730
 					} else {
3731
-						print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER['PHP_SELF'] . '#', '', false);
3731
+						print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER['PHP_SELF'].'#', '', false);
3732 3732
 					}
3733 3733
 				}
3734 3734
 			}
@@ -3736,15 +3736,15 @@  discard block
 block discarded – undo
3736 3736
 			// This is just to generate a delivery receipt when option to do this is on
3737 3737
 			//var_dump($object->linkedObjectsIds['delivery']);
3738 3738
 			if (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY') && ($object->status == Expedition::STATUS_VALIDATED || $object->status == Expedition::STATUS_CLOSED) && $user->hasRight('expedition', 'delivery', 'creer') && empty($object->linkedObjectsIds['delivery'])) {
3739
-				print dolGetButtonAction('', $langs->trans('CreateDeliveryOrder'), 'default', $_SERVER["PHP_SELF"] . '?action=create_delivery&token=' . newToken() . '&id=' . $object->id, '');
3739
+				print dolGetButtonAction('', $langs->trans('CreateDeliveryOrder'), 'default', $_SERVER["PHP_SELF"].'?action=create_delivery&token='.newToken().'&id='.$object->id, '');
3740 3740
 			}
3741 3741
 
3742 3742
 			// Sign (to set to status "Signed" without using the online signature page)
3743 3743
 			if ($object->status > Expedition::STATUS_DRAFT) {
3744 3744
 				if ($object->signed_status != Expedition::$SIGNED_STATUSES['STATUS_SIGNED_ALL']) {
3745
-					print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=sign&token=' . newToken() . '">' . $langs->trans("SignShipping") . '</a></div>';
3745
+					print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=sign&token='.newToken().'">'.$langs->trans("SignShipping").'</a></div>';
3746 3746
 				} else {
3747
-					print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=unsign&token=' . newToken() . '">' . $langs->trans("UnsignShipping") . '</a></div>';
3747
+					print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=unsign&token='.newToken().'">'.$langs->trans("UnsignShipping").'</a></div>';
3748 3748
 				}
3749 3749
 			}
3750 3750
 
@@ -3752,7 +3752,7 @@  discard block
 block discarded – undo
3752 3752
 			if (isModEnabled('invoice') && ($object->status == Expedition::STATUS_VALIDATED || $object->status == Expedition::STATUS_CLOSED)) {
3753 3753
 				if ($user->hasRight('facture', 'creer')) {
3754 3754
 					if (getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT') !== '0') {
3755
-						print dolGetButtonAction('', $langs->trans('CreateBill'), 'default', DOL_URL_ROOT . '/compta/facture/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid, '');
3755
+						print dolGetButtonAction('', $langs->trans('CreateBill'), 'default', DOL_URL_ROOT.'/compta/facture/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid, '');
3756 3756
 					}
3757 3757
 				}
3758 3758
 			}
@@ -3761,22 +3761,22 @@  discard block
 block discarded – undo
3761 3761
 			if ($object->status == Expedition::STATUS_VALIDATED) {
3762 3762
 				if ($user->hasRight('expedition', 'creer') && $object->status > 0) {
3763 3763
 					if (!$object->billed && getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT') !== '0') {
3764
-						print dolGetButtonAction('', $langs->trans('ClassifyBilled'), 'default', $_SERVER["PHP_SELF"] . '?action=classifybilled&token=' . newToken() . '&id=' . $object->id, '');
3764
+						print dolGetButtonAction('', $langs->trans('ClassifyBilled'), 'default', $_SERVER["PHP_SELF"].'?action=classifybilled&token='.newToken().'&id='.$object->id, '');
3765 3765
 					}
3766
-					print dolGetButtonAction('', $langs->trans("Close"), 'default', $_SERVER["PHP_SELF"] . '?action=classifyclosed&token=' . newToken() . '&id=' . $object->id, '');
3766
+					print dolGetButtonAction('', $langs->trans("Close"), 'default', $_SERVER["PHP_SELF"].'?action=classifyclosed&token='.newToken().'&id='.$object->id, '');
3767 3767
 				}
3768 3768
 			}
3769 3769
 
3770 3770
 			// Cancel
3771 3771
 			if ($object->status == Expedition::STATUS_VALIDATED) {
3772 3772
 				if ($user->hasRight('expedition', 'creer')) {
3773
-					print dolGetButtonAction('', $langs->trans('Cancel'), 'danger', $_SERVER["PHP_SELF"] . '?action=cancel&token=' . newToken() . '&id=' . $object->id . '&mode=init#formmailbeforetitle', '');
3773
+					print dolGetButtonAction('', $langs->trans('Cancel'), 'danger', $_SERVER["PHP_SELF"].'?action=cancel&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', '');
3774 3774
 				}
3775 3775
 			}
3776 3776
 
3777 3777
 			// Delete
3778 3778
 			if ($user->hasRight('expedition', 'supprimer')) {
3779
-				print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"] . '?action=delete&token=' . newToken() . '&id=' . $object->id, '');
3779
+				print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id, '');
3780 3780
 			}
3781 3781
 		}
3782 3782
 
@@ -3792,9 +3792,9 @@  discard block
 block discarded – undo
3792 3792
 		print '<div class="fichecenter"><div class="fichehalfleft">';
3793 3793
 
3794 3794
 		$objectref = dol_sanitizeFileName($object->ref);
3795
-		$filedir = $conf->expedition->dir_output . "/sending/" . $objectref;
3795
+		$filedir = $conf->expedition->dir_output."/sending/".$objectref;
3796 3796
 
3797
-		$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
3797
+		$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
3798 3798
 
3799 3799
 		$genallowed = $user->hasRight('expedition', 'lire');
3800 3800
 		$delallowed = $user->hasRight('expedition', 'creer');
@@ -3815,20 +3815,20 @@  discard block
 block discarded – undo
3815 3815
 
3816 3816
 		if ($object->statut != Expedition::STATUS_DRAFT && $useonlinesignature) {
3817 3817
 			print '<br><!-- Link to sign -->';
3818
-			require_once DOL_DOCUMENT_ROOT . '/core/lib/signature.lib.php';
3819
-			print showOnlineSignatureUrl('expedition', $object->ref, $object) . '<br>';
3818
+			require_once DOL_DOCUMENT_ROOT.'/core/lib/signature.lib.php';
3819
+			print showOnlineSignatureUrl('expedition', $object->ref, $object).'<br>';
3820 3820
 		}
3821 3821
 
3822 3822
 		print '</div><div class="fichehalfright">';
3823 3823
 
3824 3824
 
3825 3825
 		// List of actions on element
3826
-		include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
3826
+		include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
3827 3827
 		$formactions = new FormActions($db);
3828 3828
 
3829 3829
 		//button to go to messaging from the events box
3830 3830
 		$MAXEVENT = 10;
3831
-		$morehtmlcenter = dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT . '/expedition/messaging.php?id=' . $object->id);
3831
+		$morehtmlcenter = dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT.'/expedition/messaging.php?id='.$object->id);
3832 3832
 
3833 3833
 		$somethingshown = $formactions->showactions($object, 'shipping', $socid, 1, '', $MAXEVENT, '', $morehtmlcenter);
3834 3834
 		print '</div></div>';
@@ -3847,10 +3847,10 @@  discard block
 block discarded – undo
3847 3847
 	// Presend form
3848 3848
 	$modelmail = 'shipping_send';
3849 3849
 	$defaulttopic = 'SendShippingRef';
3850
-	$diroutput = $conf->expedition->dir_output . '/sending';
3851
-	$trackid = 'shi' . $object->id;
3850
+	$diroutput = $conf->expedition->dir_output.'/sending';
3851
+	$trackid = 'shi'.$object->id;
3852 3852
 
3853
-	include DOL_DOCUMENT_ROOT . '/core/tpl/card_presend.tpl.php';
3853
+	include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
3854 3854
 }
3855 3855
 
3856 3856
 // End of page
Please login to merge, or discard this patch.