Completed
Branch develop (30659b)
by
unknown
24:06
created
htdocs/compta/facture/card.php 1 patch
Spacing   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -91,14 +91,14 @@  discard block
 block discarded – undo
91 91
 }
92 92
 
93 93
 // General $Variables
94
-$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('facid'));    // For backward compatibility
94
+$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('facid')); // For backward compatibility
95 95
 $ref = GETPOST('ref', 'alpha');
96 96
 $socid = GETPOSTINT('socid');
97 97
 $action = GETPOST('action', 'aZ09');
98 98
 $confirm = GETPOST('confirm', 'alpha');
99 99
 $cancel = GETPOST('cancel', 'alpha');
100
-$backtopage = GETPOST('backtopage', 'alpha');					// if not set, a default page will be used
101
-$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');	// if not set, $backtopage will be used
100
+$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used
101
+$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used
102 102
 $lineid = GETPOSTINT('lineid');
103 103
 $origin = GETPOST('origin', 'alpha');
104 104
 $originid = (GETPOSTINT('originid') ? GETPOSTINT('originid') : GETPOSTINT('origin_id')); // For backward compatibility
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 					setEventMessages('', $warningMsgLineList, 'warnings');
268 268
 				}
269 269
 
270
-				header("Location: " . $_SERVER['PHP_SELF'] . '?facid=' . $result);
270
+				header("Location: ".$_SERVER['PHP_SELF'].'?facid='.$result);
271 271
 				exit();
272 272
 			} else {
273 273
 				$langs->load("errors");
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
 		// Validation
393 393
 		$object->fetch($id);
394 394
 
395
-		if ((preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) &&	// empty should not happened, but when it occurs, the test save life
395
+		if ((preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) && // empty should not happened, but when it occurs, the test save life
396 396
 			getDolGlobalString('FAC_FORCE_DATE_VALIDATION')								// If option enabled, we force invoice date
397 397
 		) {
398 398
 			$object->date = dol_now();
@@ -834,8 +834,8 @@  discard block
 block discarded – undo
834 834
 			// We check if invoice has payments
835 835
 			$totalpaid = 0;
836 836
 			$sql = 'SELECT pf.amount';
837
-			$sql .= ' FROM ' . MAIN_DB_PREFIX . 'paiement_facture as pf';
838
-			$sql .= ' WHERE pf.fk_facture = ' . ((int) $object->id);
837
+			$sql .= ' FROM '.MAIN_DB_PREFIX.'paiement_facture as pf';
838
+			$sql .= ' WHERE pf.fk_facture = '.((int) $object->id);
839 839
 
840 840
 			$result = $db->query($sql);
841 841
 			if ($result) {
@@ -911,7 +911,7 @@  discard block
 block discarded – undo
911 911
 					$tempTva->datev = $object->date;
912 912
 					$tempTva->datep = $object->date;
913 913
 					$tempTva->amount = $amount;
914
-					$tempTva->label = $langs->trans('WithholdingTax') . ' - ' . $object->ref;
914
+					$tempTva->label = $langs->trans('WithholdingTax').' - '.$object->ref;
915 915
 					//$tempTva->paye = 1;
916 916
 					$valid = $tempTva->getIdForLabel($tempTva->label);
917 917
 					if (!$valid) {
@@ -939,7 +939,7 @@  discard block
 block discarded – undo
939 939
 				if ($result < 0) {
940 940
 					setEventMessages($object->error, $object->errors, 'errors');
941 941
 				} else {
942
-					$object->fetch($object->id);	// Reload properties
942
+					$object->fetch($object->id); // Reload properties
943 943
 				}
944 944
 			}
945 945
 		} else {
@@ -955,7 +955,7 @@  discard block
 block discarded – undo
955 955
 			if ($result < 0) {
956 956
 				setEventMessages($object->error, $object->errors, 'errors');
957 957
 			} else {
958
-				$object->fetch($object->id);	// Reload properties
958
+				$object->fetch($object->id); // Reload properties
959 959
 			}
960 960
 		} else {
961 961
 			setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Reason")), null, 'errors');
@@ -1156,7 +1156,7 @@  discard block
 block discarded – undo
1156 1156
 					// Set invoice as paid
1157 1157
 					$result = $object->setPaid($user);
1158 1158
 					if ($result >= 0) {
1159
-						$object->fetch($object->id);	// Reload properties
1159
+						$object->fetch($object->id); // Reload properties
1160 1160
 						$db->commit();
1161 1161
 					} else {
1162 1162
 						setEventMessages($object->error, $object->errors, 'errors');
@@ -1207,7 +1207,7 @@  discard block
 block discarded – undo
1207 1207
 			$error++;
1208 1208
 		}
1209 1209
 
1210
-		$dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver');	// If we enter the 02 january, we need to save the 02 january for server
1210
+		$dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server
1211 1211
 		$date_pointoftax = dol_mktime(0, 0, 0, GETPOSTINT('date_pointoftaxmonth'), GETPOSTINT('date_pointoftaxday'), GETPOSTINT('date_pointoftaxyear'), 'tzserver');
1212 1212
 
1213 1213
 		// Replacement invoice
@@ -1239,7 +1239,7 @@  discard block
 block discarded – undo
1239 1239
 				$object->note_private		= trim(GETPOST('note_private', 'restricthtml'));
1240 1240
 				$object->ref_client			= GETPOST('ref_client', 'alphanohtml');
1241 1241
 				$object->ref_customer		= GETPOST('ref_client', 'alphanohtml');
1242
-				$object->model_pdf          = GETPOST('model', 'alphanohtml');
1242
+				$object->model_pdf = GETPOST('model', 'alphanohtml');
1243 1243
 				$object->fk_project			= GETPOSTINT('projectid');
1244 1244
 				$object->cond_reglement_id	= GETPOSTINT('cond_reglement_id');
1245 1245
 				$object->mode_reglement_id	= GETPOSTINT('mode_reglement_id');
@@ -1300,9 +1300,9 @@  discard block
 block discarded – undo
1300 1300
 				$object->note_private		= trim(GETPOST('note_private', 'restricthtml'));
1301 1301
 				$object->ref_client			= GETPOST('ref_client', 'alphanohtml');
1302 1302
 				$object->ref_customer		= GETPOST('ref_client', 'alphanohtml');
1303
-				$object->model_pdf          = GETPOST('model');
1303
+				$object->model_pdf = GETPOST('model');
1304 1304
 				$object->fk_project			= GETPOSTINT('projectid');
1305
-				$object->cond_reglement_id	= 0;		// No payment term for a credit note
1305
+				$object->cond_reglement_id	= 0; // No payment term for a credit note
1306 1306
 				$object->mode_reglement_id	= GETPOSTINT('mode_reglement_id');
1307 1307
 				$object->fk_account         = GETPOSTINT('fk_account');
1308 1308
 				//$object->remise_absolue		= price2num(GETPOST('remise_absolue'), 'MU');
@@ -1629,7 +1629,7 @@  discard block
 block discarded – undo
1629 1629
 				$object->note_public		= trim(GETPOST('note_public', 'restricthtml'));
1630 1630
 				$object->note_private       = trim(GETPOST('note_private', 'restricthtml'));
1631 1631
 				$object->ref_client			= GETPOST('ref_client');
1632
-				$object->ref_customer		= GETPOST('ref_client');
1632
+				$object->ref_customer = GETPOST('ref_client');
1633 1633
 				$object->model_pdf          = GETPOST('model');
1634 1634
 				$object->fk_project			= GETPOSTINT('projectid');
1635 1635
 				$object->cond_reglement_id	= (GETPOSTINT('type') == 3 ? 1 : GETPOST('cond_reglement_id'));
@@ -1693,7 +1693,7 @@  discard block
 block discarded – undo
1693 1693
 						$element = $subelement = 'expedition';
1694 1694
 					}
1695 1695
 
1696
-					$object->origin = $origin;		// deprecated
1696
+					$object->origin = $origin; // deprecated
1697 1697
 					$object->origin_type = $origin;
1698 1698
 					$object->origin_id = $originid;
1699 1699
 
@@ -1728,7 +1728,7 @@  discard block
 block discarded – undo
1728 1728
 						dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines or deposit lines");
1729 1729
 						$result = $srcobject->fetch($object->origin_id);
1730 1730
 
1731
-						$i = -1;  // Ensure initialised for static analysis, but with invalid idx.
1731
+						$i = -1; // Ensure initialised for static analysis, but with invalid idx.
1732 1732
 						// If deposit invoice - down payment with 1 line (fixed amount or percent)
1733 1733
 						if (GETPOST('type') == Facture::TYPE_DEPOSIT && in_array($typeamount, array('amount', 'variable'))) {
1734 1734
 							// Define the array $amountdeposit
@@ -2153,7 +2153,7 @@  discard block
 block discarded – undo
2153 2153
 				if (!empty($origin) && !empty($originid)) {
2154 2154
 					include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
2155 2155
 
2156
-					$object->origin = $origin;		// deprecated
2156
+					$object->origin = $origin; // deprecated
2157 2157
 					$object->origin_type = $origin;
2158 2158
 					$object->origin_id = $originid;
2159 2159
 
@@ -2179,7 +2179,7 @@  discard block
 block discarded – undo
2179 2179
 						$line->fk_prev_id = $line->id;
2180 2180
 						$line->fetch_optionals();
2181 2181
 						if (getDolGlobalInt('INVOICE_USE_SITUATION') == 2) {
2182
-							$line->situation_percent = 0;  // New situation percent must be 0 (No cumulative)
2182
+							$line->situation_percent = 0; // New situation percent must be 0 (No cumulative)
2183 2183
 						} else {
2184 2184
 							$line->situation_percent = $line->get_prev_progress($object->id); // get good progress including credit note
2185 2185
 						}
@@ -2296,7 +2296,7 @@  discard block
 block discarded – undo
2296 2296
 		} else {
2297 2297
 			$db->rollback();
2298 2298
 			$action = 'create';
2299
-			$_GET["origin"] = $_POST["origin"];		// Keep GET and POST here ?
2299
+			$_GET["origin"] = $_POST["origin"]; // Keep GET and POST here ?
2300 2300
 			$_GET["originid"] = $_POST["originid"]; // Keep GET and POST here ?
2301 2301
 			setEventMessages($object->error, $object->errors, 'errors');
2302 2302
 		}
@@ -2762,7 +2762,7 @@  discard block
 block discarded – undo
2762 2762
 			 */
2763 2763
 
2764 2764
 			// Margin
2765
-			$fournprice = (int) (GETPOST('fournprice'.$predef) ? GETPOST('fournprice'.$predef) : '');				// This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only
2765
+			$fournprice = (int) (GETPOST('fournprice'.$predef) ? GETPOST('fournprice'.$predef) : ''); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only
2766 2766
 			$buyingprice = price2num(GETPOST('buying_price'.$predef) != '' ? GETPOST('buying_price'.$predef) : ''); // If buying_price is '0', we must keep this value
2767 2767
 
2768 2768
 
@@ -2900,7 +2900,7 @@  discard block
 block discarded – undo
2900 2900
 				if ($prod->price_min > $line->subprice) {
2901 2901
 					$price_subprice = price($line->subprice, 0, $outlangs, 1, -1, -1, 'auto');
2902 2902
 					$price_price_min = price($prod->price_min, 0, $outlangs, 1, -1, -1, 'auto');
2903
-					setEventMessages($prod->ref . ' - ' . $prod->label . ' (' . $price_subprice . ' < ' . $price_price_min . ' ' . strtolower($langs->trans("MinPrice")) . ')' . "\n", null, 'warnings');
2903
+					setEventMessages($prod->ref.' - '.$prod->label.' ('.$price_subprice.' < '.$price_price_min.' '.strtolower($langs->trans("MinPrice")).')'."\n", null, 'warnings');
2904 2904
 				} else {
2905 2905
 					setEventMessages($prod->error, $prod->errors, 'errors');
2906 2906
 				}
@@ -3051,7 +3051,7 @@  discard block
 block discarded – undo
3051 3051
 		$localtax2_rate = get_localtax($vat_rate, 2, $object->thirdparty);
3052 3052
 
3053 3053
 		// Add buying price
3054
-		$fournprice = (int) (GETPOST('fournprice') ? GETPOST('fournprice') : '');				// This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only
3054
+		$fournprice = (int) (GETPOST('fournprice') ? GETPOST('fournprice') : ''); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only
3055 3055
 		$buyingprice = price2num(GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we must keep this value
3056 3056
 
3057 3057
 		// Prepare a price equivalent for minimum price check
@@ -3094,7 +3094,7 @@  discard block
 block discarded – undo
3094 3094
 		// Define special_code for special lines
3095 3095
 		$special_code = GETPOSTINT('special_code');
3096 3096
 		if ($special_code == 3) {
3097
-			$special_code = 0;	// Options should not exists on invoices
3097
+			$special_code = 0; // Options should not exists on invoices
3098 3098
 		}
3099 3099
 
3100 3100
 		$line = new FactureLigne($db);
@@ -3548,7 +3548,7 @@  discard block
 block discarded – undo
3548 3548
 
3549 3549
 
3550 3550
 	if ($action == 'update_extras' && $permissiontoeditextra) {
3551
-		$object->oldcopy = dol_clone($object, 2);  // @phan-suppress-current-line PhanTypeMismatchProperty
3551
+		$object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty
3552 3552
 
3553 3553
 		$attribute_name = GETPOST('attribute', 'aZ09');
3554 3554
 
@@ -3664,13 +3664,13 @@  discard block
 block discarded – undo
3664 3664
 	$mode_reglement_id = GETPOSTINT('mode_reglement_id');
3665 3665
 	$fk_account = GETPOSTINT('fk_account');
3666 3666
 
3667
-	$dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver');	// If we enter the 02 january, we need to save the 02 january for server
3667
+	$dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server
3668 3668
 	if (empty($dateinvoice)) {
3669
-		$dateinvoice = (getDolGlobalString('MAIN_DO_NOT_AUTOFILL_DATE_INVOICE') ? -1 : '');		// By default '' so we will autofill date. -1 means keep empty.
3669
+		$dateinvoice = (getDolGlobalString('MAIN_DO_NOT_AUTOFILL_DATE_INVOICE') ? -1 : ''); // By default '' so we will autofill date. -1 means keep empty.
3670 3670
 	}
3671 3671
 
3672 3672
 	// Load objectsrc
3673
-	$objectsrc = null;  // Initialise
3673
+	$objectsrc = null; // Initialise
3674 3674
 	//$remise_absolue = 0;
3675 3675
 	if (!empty($origin) && !empty($originid)) {
3676 3676
 		// Parse element/subelement (ex: project_task)
@@ -3754,8 +3754,8 @@  discard block
 block discarded – undo
3754 3754
 				$fk_account        = (!empty($expesrc->fk_account) ? $expesrc->fk_account : (!empty($soc->fk_account) ? $soc->fk_account : 0));
3755 3755
 
3756 3756
 				if (isModEnabled('multicurrency')) {
3757
-					$currency_code 	= (!empty($expesrc->multicurrency_code) ? $expesrc->multicurrency_code : (!empty($soc->multicurrency_code) ? $soc->multicurrency_code : $objectsrc->multicurrency_code));
3758
-					$currency_tx 	= (!empty($expesrc->multicurrency_tx) ? $expesrc->multicurrency_tx : (!empty($soc->multicurrency_tx) ? $soc->multicurrency_tx : $objectsrc->multicurrency_tx));
3757
+					$currency_code = (!empty($expesrc->multicurrency_code) ? $expesrc->multicurrency_code : (!empty($soc->multicurrency_code) ? $soc->multicurrency_code : $objectsrc->multicurrency_code));
3758
+					$currency_tx = (!empty($expesrc->multicurrency_tx) ? $expesrc->multicurrency_tx : (!empty($soc->multicurrency_tx) ? $soc->multicurrency_tx : $objectsrc->multicurrency_tx));
3759 3759
 				}
3760 3760
 
3761 3761
 				// replicate input reason
@@ -3853,7 +3853,7 @@  discard block
 block discarded – undo
3853 3853
 	print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="POST" id="formtocreate" name="formtocreate">';
3854 3854
 	print '<input type="hidden" name="token" value="'.newToken().'">';
3855 3855
 	print '<input type="hidden" name="action" id="formtocreateaction" value="add">';
3856
-	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
3856
+	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
3857 3857
 	if ($soc->id > 0) {
3858 3858
 		print '<input type="hidden" name="socid" value="'.$soc->id.'">'."\n";
3859 3859
 	}
@@ -4042,7 +4042,7 @@  discard block
 block discarded – undo
4042 4042
 			print $form->selectarray('typestandard', $arraylist, GETPOST('typestandard', 'aZ09'), 0, 0, 0, '', 1);
4043 4043
 			print '</td>';*/
4044 4044
 			if (!getDolGlobalInt('INVOICE_DEPOSIT_INVOICE_ONLY_SAME_LINES')) {
4045
-				print '<span class="opacitymedium marginleftonly">' . $langs->trans('PercentOfOriginalObject') . '</span>:<input class="right" placeholder="100%" type="text" id="valuestandardinvoice" name="valuestandardinvoice" size="3" value="' . (GETPOSTISSET('valuestandardinvoice') ? GETPOST('valuestandardinvoice', 'alpha') : '100%') . '"/>';
4045
+				print '<span class="opacitymedium marginleftonly">'.$langs->trans('PercentOfOriginalObject').'</span>:<input class="right" placeholder="100%" type="text" id="valuestandardinvoice" name="valuestandardinvoice" size="3" value="'.(GETPOSTISSET('valuestandardinvoice') ? GETPOST('valuestandardinvoice', 'alpha') : '100%').'"/>';
4046 4046
 			}
4047 4047
 		}
4048 4048
 		print '</div></div>'."\n";
@@ -4397,8 +4397,8 @@  discard block
 block discarded – undo
4397 4397
 		if ($socid > 0) {
4398 4398
 			print '<tr><td>'.$langs->trans('DiscountStillRemaining').'</td><td colspan="2">';
4399 4399
 
4400
-			$thirdparty = $soc;	// used by object_discounts.tpl.php
4401
-			$discount_type = 0;	// used by object_discounts.tpl.php
4400
+			$thirdparty = $soc; // used by object_discounts.tpl.php
4401
+			$discount_type = 0; // used by object_discounts.tpl.php
4402 4402
 			$backtopage = $_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.urlencode((string) (GETPOST('origin'))).'&originid='.urlencode((string) (GETPOSTINT('originid')));
4403 4403
 
4404 4404
 			// loading object_discounts.tpl.php from module core/tpl if exists
@@ -4458,7 +4458,7 @@  discard block
 block discarded – undo
4458 4458
 			if (empty($retained_warranty)) {
4459 4459
 				if ($objectsrc !== null && property_exists($objectsrc, 'retained_warranty') && !empty($objectsrc->retained_warranty)) { // use previous situation value
4460 4460
 					// Facture->retained_warranty  (does not exist on Expedition)
4461
-					$retained_warranty = $objectsrc->retained_warranty;  // @phan-suppress-current-line PhanUndeclaredProperty
4461
+					$retained_warranty = $objectsrc->retained_warranty; // @phan-suppress-current-line PhanUndeclaredProperty
4462 4462
 				}
4463 4463
 			}
4464 4464
 			$retained_warranty_js_default = !empty($retained_warranty) ? $retained_warranty : getDolGlobalString('INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT');
@@ -4967,7 +4967,7 @@  discard block
 block discarded – undo
4967 4967
 		$nbMandated = 0;
4968 4968
 		foreach ($object->lines as $line) {
4969 4969
 			$res = $line->fetch_product();
4970
-			if ($res  > 0) {
4970
+			if ($res > 0) {
4971 4971
 				if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) {
4972 4972
 					$nbMandated++;
4973 4973
 					break;
@@ -5210,7 +5210,7 @@  discard block
 block discarded – undo
5210 5210
 	}
5211 5211
 	// Ref customer
5212 5212
 	$morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_customer, $object, (int) $usercancreate, 'string', '', 0, 1);
5213
-	$morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_customer, $object, (int) $usercancreate, 'string'.(getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1);
5213
+	$morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_customer, $object, (int) $usercancreate, 'string'.(getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1);
5214 5214
 	// Thirdparty
5215 5215
 	$morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1, 'customer');
5216 5216
 	if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $object->thirdparty->id > 0) {
@@ -5342,7 +5342,7 @@  discard block
 block discarded – undo
5342 5342
 			print '</td><td class="valuefield fieldname_type">';
5343 5343
 			print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" name="formposinfo">';
5344 5344
 			print '<input type="hidden" name="action" value="setposinfo">';
5345
-			print '<input type="hidden" name="token" value="' . newToken() . '">';
5345
+			print '<input type="hidden" name="token" value="'.newToken().'">';
5346 5346
 			if ($action == 'editposinfo') {
5347 5347
 				print '<input type="text" class="maxwidth150" name="posmodule" placeholder="'.$langs->trans("POSModule").'" value="'.$object->module_source.'"> ';
5348 5348
 				print '<input type="text" class="maxwidth100" name="posterminal" placeholder="'.$langs->trans("Terminal").'" value="'.$object->pos_source.'">';
@@ -5705,45 +5705,45 @@  discard block
 block discarded – undo
5705 5705
 		}
5706 5706
 		print '<tr>';
5707 5707
 		// Amount HT
5708
-		print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>';
5709
-		print '<td class="nowraponall amountcard right">' . price($sign * $object->total_ht, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
5708
+		print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>';
5709
+		print '<td class="nowraponall amountcard right">'.price($sign * $object->total_ht, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
5710 5710
 		if (isModEnabled("multicurrency") && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) {
5711 5711
 			// Multicurrency Amount HT
5712
-			print '<td class="nowraponall amountcard right">' . price($sign * $object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
5712
+			print '<td class="nowraponall amountcard right">'.price($sign * $object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
5713 5713
 		}
5714 5714
 		print '</tr>';
5715 5715
 
5716 5716
 		print '<tr>';
5717 5717
 		// Amount VAT
5718
-		print '<td>' . $langs->trans('AmountVAT') . '</td>';
5719
-		print '<td class="nowraponall amountcard right">' . price($sign * $object->total_tva, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
5718
+		print '<td>'.$langs->trans('AmountVAT').'</td>';
5719
+		print '<td class="nowraponall amountcard right">'.price($sign * $object->total_tva, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
5720 5720
 		if (isModEnabled("multicurrency") && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) {
5721 5721
 			// Multicurrency Amount VAT
5722
-			print '<td class="nowraponall amountcard right">' . price($sign * $object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
5722
+			print '<td class="nowraponall amountcard right">'.price($sign * $object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
5723 5723
 		}
5724 5724
 		print '</tr>';
5725 5725
 
5726 5726
 		// Amount Local Taxes
5727 5727
 		if (($mysoc->localtax1_assuj == "1" && $mysoc->useLocalTax(1)) || $object->total_localtax1 != 0) {
5728 5728
 			print '<tr>';
5729
-			print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
5730
-			print '<td class="nowraponall amountcard right">' . price($sign * $object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
5729
+			print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>';
5730
+			print '<td class="nowraponall amountcard right">'.price($sign * $object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
5731 5731
 			if (isModEnabled("multicurrency") && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) {
5732 5732
 				$object->multicurrency_total_localtax1 = (float) price2num($object->total_localtax1 * $object->multicurrency_tx, 'MT');
5733 5733
 
5734
-				print '<td class="nowraponall amountcard right">' . price($sign * $object->multicurrency_total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
5734
+				print '<td class="nowraponall amountcard right">'.price($sign * $object->multicurrency_total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
5735 5735
 			}
5736 5736
 			print '</tr>';
5737 5737
 		}
5738 5738
 
5739 5739
 		if (($mysoc->localtax2_assuj == "1" && $mysoc->useLocalTax(2)) || $object->total_localtax2 != 0) {
5740 5740
 			print '<tr>';
5741
-			print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>';
5742
-			print '<td class="nowraponall amountcard right">' . price($sign * $object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
5741
+			print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>';
5742
+			print '<td class="nowraponall amountcard right">'.price($sign * $object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
5743 5743
 			if (isModEnabled("multicurrency") && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) {
5744 5744
 				$object->multicurrency_total_localtax2 = (float) price2num($object->total_localtax2 * $object->multicurrency_tx, 'MT');
5745 5745
 
5746
-				print '<td class="nowraponall amountcard right">' . price($sign * $object->multicurrency_total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
5746
+				print '<td class="nowraponall amountcard right">'.price($sign * $object->multicurrency_total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
5747 5747
 			}
5748 5748
 			print '</tr>';
5749 5749
 		}
@@ -5803,11 +5803,11 @@  discard block
 block discarded – undo
5803 5803
 
5804 5804
 		print '<tr>';
5805 5805
 		// Amount TTC
5806
-		print '<td>' . $langs->trans('AmountTTC') . '</td>';
5807
-		print '<td class="nowraponall amountcard right">' . price($sign * $object->total_ttc, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
5806
+		print '<td>'.$langs->trans('AmountTTC').'</td>';
5807
+		print '<td class="nowraponall amountcard right">'.price($sign * $object->total_ttc, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
5808 5808
 		if (isModEnabled("multicurrency") && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) {
5809 5809
 			// Multicurrency Amount TTC
5810
-			print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_ttc, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
5810
+			print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_ttc, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
5811 5811
 		}
5812 5812
 		print '</tr>';
5813 5813
 
@@ -6101,7 +6101,7 @@  discard block
 block discarded – undo
6101 6101
 		if ($object->type != Facture::TYPE_CREDIT_NOTE) {
6102 6102
 			// Total already paid
6103 6103
 			print '<tr>';
6104
-			print '<td colspan="'.($nbcols+1).'" class="right">';
6104
+			print '<td colspan="'.($nbcols + 1).'" class="right">';
6105 6105
 			print '<span class="opacitymedium">';
6106 6106
 			if ($object->type != Facture::TYPE_DEPOSIT) {
6107 6107
 				print $langs->trans('AlreadyPaidNoCreditNotesNoDeposits');
@@ -6183,7 +6183,7 @@  discard block
 block discarded – undo
6183 6183
 			// Partially paid or abandoned 'badcustomer'
6184 6184
 			if (($object->status == Facture::STATUS_CLOSED || $object->status == Facture::STATUS_ABANDONED) && $object->close_code == 'badcustomer') {
6185 6185
 				print '<tr>';
6186
-				print '<td colspan="'.($nbcols+1).'" class="nowrap right">';
6186
+				print '<td colspan="'.($nbcols + 1).'" class="nowrap right">';
6187 6187
 				print '<span class="opacitymedium">';
6188 6188
 				print $form->textwithpicto($langs->trans("Abandoned"), $langs->trans("HelpAbandonBadCustomer"), - 1);
6189 6189
 				print '</span>';
@@ -6198,7 +6198,7 @@  discard block
 block discarded – undo
6198 6198
 			// Partially paid or abandoned 'product_returned'
6199 6199
 			if (($object->status == Facture::STATUS_CLOSED || $object->status == Facture::STATUS_ABANDONED) && $object->close_code == 'product_returned') {
6200 6200
 				print '<tr>';
6201
-				print '<td colspan="'.($nbcols+1).'" class="nowrap right">';
6201
+				print '<td colspan="'.($nbcols + 1).'" class="nowrap right">';
6202 6202
 				print '<span class="opacitymedium">';
6203 6203
 				print $form->textwithpicto($langs->trans("ProductReturned"), $langs->trans("HelpAbandonProductReturned"), - 1);
6204 6204
 				print '</span>';
@@ -6213,7 +6213,7 @@  discard block
 block discarded – undo
6213 6213
 			// Partially paid or abandoned 'abandoned'
6214 6214
 			if (($object->status == Facture::STATUS_CLOSED || $object->status == Facture::STATUS_ABANDONED) && $object->close_code == 'abandon') {
6215 6215
 				print '<tr>';
6216
-				print '<td colspan="'.($nbcols+1).'" class="nowrap right">';
6216
+				print '<td colspan="'.($nbcols + 1).'" class="nowrap right">';
6217 6217
 				$text = $langs->trans("HelpAbandonOther");
6218 6218
 				if ($object->close_note) {
6219 6219
 					$text .= '<br><br><b>'.$langs->trans("Reason").'</b>:'.$object->close_note;
@@ -6233,7 +6233,7 @@  discard block
 block discarded – undo
6233 6233
 
6234 6234
 			// Billed
6235 6235
 			print '<tr>';
6236
-			print '<td colspan="'.($nbcols+1).'" class="right">';
6236
+			print '<td colspan="'.($nbcols + 1).'" class="right">';
6237 6237
 			print '<span class="opacitymedium">';
6238 6238
 			print $langs->trans("Billed");
6239 6239
 			print '</td>';
@@ -6243,7 +6243,7 @@  discard block
 block discarded – undo
6243 6243
 
6244 6244
 			// Remainder to pay
6245 6245
 			print '<tr>';
6246
-			print '<td colspan="'.($nbcols+1).'" class="right">';
6246
+			print '<td colspan="'.($nbcols + 1).'" class="right">';
6247 6247
 			print '<span class="opacitymedium">';
6248 6248
 			print $langs->trans('RemainderToPay');
6249 6249
 			if ($resteapayeraffiche < 0) {
@@ -6258,7 +6258,7 @@  discard block
 block discarded – undo
6258 6258
 			// Remainder to pay Multicurrency
6259 6259
 			if (isModEnabled('multicurrency') && $object->multicurrency_code && ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1)) {
6260 6260
 				print '<tr>';
6261
-				print '<td colspan="'.($nbcols+1).'" class="right">';
6261
+				print '<td colspan="'.($nbcols + 1).'" class="right">';
6262 6262
 				print '<span class="opacitymedium">';
6263 6263
 				print $langs->trans('RemainderToPayMulticurrency');
6264 6264
 				if ($resteapayeraffiche < 0) {
@@ -6286,14 +6286,14 @@  discard block
 block discarded – undo
6286 6286
 				$billedWithRetainedWarranty = $object->total_ttc - $retainedWarranty;
6287 6287
 
6288 6288
 				print '<tr>';
6289
-				print '<td colspan="'.($nbcols+1).'" class="right">'.$langs->trans("ToPayOn", dol_print_date($object->date_lim_reglement, 'day')).' :</td>';
6289
+				print '<td colspan="'.($nbcols + 1).'" class="right">'.$langs->trans("ToPayOn", dol_print_date($object->date_lim_reglement, 'day')).' :</td>';
6290 6290
 				//print '<td></td>';
6291 6291
 				print '<td class="right">'.price($billedWithRetainedWarranty).'</td>';
6292 6292
 				print '</tr>';
6293 6293
 
6294 6294
 				// retained warranty
6295 6295
 				print '<tr>';
6296
-				print '<td colspan="'.($nbcols+1).'" class="right">';
6296
+				print '<td colspan="'.($nbcols + 1).'" class="right">';
6297 6297
 				print $langs->trans("RetainedWarranty").' ('.$object->retained_warranty.'%)';
6298 6298
 				print !empty($object->retained_warranty_date_limit) ? ' '.$langs->trans("ToPayOn", dol_print_date($object->retained_warranty_date_limit, 'day')) : '';
6299 6299
 				print '</td>';
@@ -6308,7 +6308,7 @@  discard block
 block discarded – undo
6308 6308
 
6309 6309
 			// Total already paid back
6310 6310
 			print '<tr>';
6311
-			print '<td colspan="'.($nbcols+1).'" class="right">';
6311
+			print '<td colspan="'.($nbcols + 1).'" class="right">';
6312 6312
 			print '<span class="opacitymedium">'.$langs->trans('AlreadyPaidBack').'</span>';
6313 6313
 			print '</td>';
6314 6314
 			//print '<td></td>';
@@ -6317,13 +6317,13 @@  discard block
 block discarded – undo
6317 6317
 
6318 6318
 			// Billed
6319 6319
 			print '<tr>';
6320
-			print '<td colspan="'.($nbcols+1).'" class="right"><span class="opacitymedium">'.$langs->trans("Billed").'</span></td>';
6320
+			print '<td colspan="'.($nbcols + 1).'" class="right"><span class="opacitymedium">'.$langs->trans("Billed").'</span></td>';
6321 6321
 			//print '<td></td>';
6322 6322
 			print '<td class="right">'.price($sign * $object->total_ttc).'</td>';
6323 6323
 			print '</tr>';
6324 6324
 
6325 6325
 			// Remainder to pay back
6326
-			print '<tr><td colspan="'.($nbcols+1).'" class="right">';
6326
+			print '<tr><td colspan="'.($nbcols + 1).'" class="right">';
6327 6327
 			print '<span class="opacitymedium">'.$langs->trans('RemainderToPayBack');
6328 6328
 			if ($resteapayeraffiche > 0) {
6329 6329
 				print ' ('.$langs->trans('NegativeIfExcessRefunded').')';
@@ -6339,7 +6339,7 @@  discard block
 block discarded – undo
6339 6339
 			// Remainder to pay back Multicurrency
6340 6340
 			if (isModEnabled('multicurrency') && (($object->multicurrency_code && $object->multicurrency_code != $conf->currency) || $object->multicurrency_tx != 1)) {
6341 6341
 				print '<tr>';
6342
-				print '<td colspan="'.($nbcols+1).'" class="right">';
6342
+				print '<td colspan="'.($nbcols + 1).'" class="right">';
6343 6343
 				print '<span class="opacitymedium">'.$langs->trans('RemainderToPayBackMulticurrency');
6344 6344
 				if ($resteapayeraffiche > 0) {
6345 6345
 					print ' ('.$langs->trans('NegativeIfExcessRefunded').')';
@@ -6447,7 +6447,7 @@  discard block
 block discarded – undo
6447 6447
 			if (isModEnabled('subtotals')) {
6448 6448
 				include DOL_DOCUMENT_ROOT.'/core/tpl/subtotal_ajaxrow.tpl.php';
6449 6449
 			} else {
6450
-				include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php';
6450
+				include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
6451 6451
 			}
6452 6452
 		}
6453 6453
 
@@ -6510,10 +6510,10 @@  discard block
 block discarded – undo
6510 6510
 						if (!$objectidnext && $object->is_last_in_cycle()) {
6511 6511
 							if ($usercanunvalidate) {
6512 6512
 								unset($params['attr']['title']);
6513
-								print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'] . '?facid=' . $object->id . '&action=modif&token=' . newToken(), '', true, $params);
6513
+								print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=modif&token='.newToken(), '', true, $params);
6514 6514
 							} else {
6515 6515
 								$params['attr']['title'] = $langs->trans('NotEnoughPermissions');
6516
-								print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'] . '?facid=' . $object->id . '&action=modif&token=' . newToken(), '', false, $params);
6516
+								print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=modif&token='.newToken(), '', false, $params);
6517 6517
 							}
6518 6518
 						} elseif (!$object->is_last_in_cycle()) {
6519 6519
 							$params['attr']['title'] = $langs->trans('NotLastInCycle');
@@ -6554,7 +6554,7 @@  discard block
 block discarded – undo
6554 6554
 					$langs->load("contracts");
6555 6555
 
6556 6556
 					if ($usercancreatecontract) {
6557
-						print '<a class="butAction" href="' . DOL_URL_ROOT . '/contrat/card.php?action=create&amp;origin=' . $object->element . '&amp;originid=' . $object->id . '&amp;socid=' . $object->socid . '">' . $langs->trans('AddContract') . '</a>';
6557
+						print '<a class="butAction" href="'.DOL_URL_ROOT.'/contrat/card.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid.'">'.$langs->trans('AddContract').'</a>';
6558 6558
 					}
6559 6559
 				}
6560 6560
 			}
@@ -6805,7 +6805,7 @@  discard block
 block discarded – undo
6805 6805
 			if ($usercandelete || ($usercancreate && $isErasable == 1)) {	// isErasable = 1 means draft with temporary ref (draft can always be deleted with no need of permissions)
6806 6806
 				$enableDelete = false;
6807 6807
 				$deleteHref = '#';
6808
-				if ($isErasable > 0 && ! $objectidnext) {
6808
+				if ($isErasable > 0 && !$objectidnext) {
6809 6809
 					$deleteHref = $_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=delete&token='.newToken();
6810 6810
 					$enableDelete = true;
6811 6811
 				}
Please login to merge, or discard this patch.
htdocs/expedition/card.php 1 patch
Spacing   +365 added lines, -365 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
@@ -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
 	}
@@ -398,16 +398,16 @@  discard block
 block discarded – undo
398 398
 			$product_batch_used = array();
399 399
 
400 400
 			for ($i = 0; $i < $num; $i++) {
401
-				$idl = "idl" . $i;
401
+				$idl = "idl".$i;
402 402
 
403 403
 				$sub_qty = array();
404 404
 				$subtotalqty = 0;
405 405
 
406 406
 				$j = 0;
407 407
 
408
-				$batch = "batchl" . $i . "_0";
409
-				$stockLocation = "ent1" . $i . "_0";
410
-				$qty = "qtyl" . $i;
408
+				$batch = "batchl".$i."_0";
409
+				$stockLocation = "ent1".$i."_0";
410
+				$qty = "qtyl".$i;
411 411
 
412 412
 				$is_batch_or_serial = 0;
413 413
 				if (!empty($objectsrc->lines[$i]->fk_product)) {
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
 				if (isModEnabled('productbatch') && $objectsrc->lines[$i]->product_tobatch) {
423 423
 					if (GETPOSTISSET($batch)) {
424 424
 						//shipment line with batch-enable product
425
-						$qty .= '_' . $j;
425
+						$qty .= '_'.$j;
426 426
 						while (GETPOSTISSET($batch)) {
427 427
 							// save line of detail into sub_qty
428 428
 							$sub_qty[$j]['q'] = price2num(GETPOST($qty, 'alpha'), 'MS'); // the qty we want to move for this stock record
@@ -441,8 +441,8 @@  discard block
 block discarded – undo
441 441
 							}
442 442
 
443 443
 							$j++;
444
-							$batch = "batchl" . $i . "_" . $j;
445
-							$qty = "qtyl" . $i . '_' . $j;
444
+							$batch = "batchl".$i."_".$j;
445
+							$qty = "qtyl".$i.'_'.$j;
446 446
 						}
447 447
 
448 448
 							$batch_line[$i]['detail'] = $sub_qty; // array of details
@@ -456,13 +456,13 @@  discard block
 block discarded – undo
456 456
 							// We try to set an amount
457 457
 							// Case we don't use the list of available qty for each warehouse/lot
458 458
 							// GUI does not allow this yet
459
-							setEventMessages($langs->trans("StockIsRequiredToChooseWhichLotToUse") . ' (' . $langs->trans("Line") . ' ' . GETPOSTINT($idl) . ')', null, 'errors');
459
+							setEventMessages($langs->trans("StockIsRequiredToChooseWhichLotToUse").' ('.$langs->trans("Line").' '.GETPOSTINT($idl).')', null, 'errors');
460 460
 							$error++;
461 461
 						}
462 462
 					}
463 463
 				} elseif (GETPOSTISSET($stockLocation)) {
464 464
 					//shipment line from multiple stock locations
465
-					$qty .= '_' . $j;
465
+					$qty .= '_'.$j;
466 466
 					while (GETPOSTISSET($stockLocation)) {
467 467
 						// save sub line of warehouse
468 468
 						$stockLine[$i][$j]['qty'] = price2num(GETPOST($qty, 'alpha'), 'MS');
@@ -473,8 +473,8 @@  discard block
 block discarded – undo
473 473
 						$subtotalqty += price2num(GETPOST($qty, 'alpha'), 'MS');
474 474
 
475 475
 						$j++;
476
-						$stockLocation = "ent1" . $i . "_" . $j;
477
-						$qty = "qtyl" . $i . '_' . $j;
476
+						$stockLocation = "ent1".$i."_".$j;
477
+						$qty = "qtyl".$i.'_'.$j;
478 478
 					}
479 479
 				} else {
480 480
 					//shipment line for product with no batch management and no multiple stock location
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
 				if (isset($extrafields->attributes[$object->table_element_line]['label']) && is_array($extrafields->attributes[$object->table_element_line]['label'])) {
498 498
 					// Get extra fields
499 499
 					foreach ($extrafields->attributes[$object->table_element_line]['label'] as $key => $value) {
500
-						unset($_POST["options_" . $key]);
500
+						unset($_POST["options_".$key]);
501 501
 					}
502 502
 				}
503 503
 			}
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
 			if (($totalqty > 0 || getDolGlobalString('SHIPMENT_GETS_ALL_ORDER_PRODUCTS')) && !$error) {		// There is at least one thing to ship and no error
506 506
 				$selected_subtotal_lines = GETPOST('subtotal_toselect', 'array:int');
507 507
 				for ($i = 0; $i < $num; $i++) {
508
-					$qty = "qtyl" . $i;
508
+					$qty = "qtyl".$i;
509 509
 
510 510
 					if (!isset($batch_line[$i])) {
511 511
 						// not batch mode
@@ -523,8 +523,8 @@  discard block
 block discarded – undo
523 523
 							}
524 524
 						} else {
525 525
 							if (GETPOSTFLOAT($qty) > 0 || getDolGlobalString('SHIPMENT_GETS_ALL_ORDER_PRODUCTS')) {
526
-								$ent = "entl" . $i;
527
-								$idl = "idl" . $i;
526
+								$ent = "entl".$i;
527
+								$idl = "idl".$i;
528 528
 								$entrepot_id = is_numeric(GETPOSTINT($ent)) ? GETPOSTINT($ent) : GETPOSTINT('entrepot_id');
529 529
 								if ($entrepot_id < 0) {
530 530
 									$entrepot_id = '';
@@ -578,7 +578,7 @@  discard block
 block discarded – undo
578 578
 			} elseif (!$error) {
579 579
 				$labelfieldmissing = $langs->transnoentitiesnoconv("QtyToShip");
580 580
 				if (isModEnabled('stock')) {
581
-					$labelfieldmissing .= '/' . $langs->transnoentitiesnoconv("Warehouse");
581
+					$labelfieldmissing .= '/'.$langs->transnoentitiesnoconv("Warehouse");
582 582
 				}
583 583
 				setEventMessages($langs->trans("ErrorFieldRequired", $labelfieldmissing), null, 'errors');
584 584
 				$error++;
@@ -594,7 +594,7 @@  discard block
 block discarded – undo
594 594
 				$line->extraparams = $objectsrc_line->extraparams;
595 595
 				$line->setExtraParameters();
596 596
 			}
597
-			header("Location: card.php?id=" . $object->id);
597
+			header("Location: card.php?id=".$object->id);
598 598
 			exit;
599 599
 		} else {
600 600
 			$db->rollback();
@@ -609,7 +609,7 @@  discard block
 block discarded – undo
609 609
 		if ($result > 0) {
610 610
 			$db->commit();
611 611
 
612
-			header("Location: " . DOL_URL_ROOT . '/delivery/card.php?action=create_delivery&token=' . newToken() . '&id=' . $result);
612
+			header("Location: ".DOL_URL_ROOT.'/delivery/card.php?action=create_delivery&token='.newToken().'&id='.$result);
613 613
 			exit;
614 614
 		} else {
615 615
 			$db->rollback();
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
 		$also_update_stock = (GETPOST('alsoUpdateStock', 'alpha') ? 1 : 0);
663 663
 		$result = $object->delete($user, 0, (bool) $also_update_stock);
664 664
 		if ($result > 0) {
665
-			header("Location: " . DOL_URL_ROOT . '/expedition/index.php');
665
+			header("Location: ".DOL_URL_ROOT.'/expedition/index.php');
666 666
 			exit;
667 667
 		} else {
668 668
 			setEventMessages($object->error, $object->errors, 'errors');
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
 				$object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
700 700
 			}
701 701
 
702
-			header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
702
+			header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
703 703
 			exit;
704 704
 		} else {
705 705
 			setEventMessages($object->error, $object->errors, 'errors');
@@ -728,7 +728,7 @@  discard block
 block discarded – undo
728 728
 				$object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
729 729
 			}
730 730
 
731
-			header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
731
+			header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
732 732
 			exit;
733 733
 		} else {
734 734
 			setEventMessages($object->error, $object->errors, 'errors');
@@ -736,7 +736,7 @@  discard block
 block discarded – undo
736 736
 	} elseif ($action == 'confirm_sign' && $confirm == 'yes' && $user->hasRight('expedition', 'creer')) {
737 737
 		$result = $object->setSignedStatus($user, GETPOSTINT('signed_status'), 0, 'SHIPPING_MODIFY');
738 738
 		if ($result >= 0) {
739
-			header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
739
+			header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
740 740
 			exit;
741 741
 		} else {
742 742
 			setEventMessages($object->error, $object->errors, 'errors');
@@ -744,7 +744,7 @@  discard block
 block discarded – undo
744 744
 	} elseif ($action == 'confirm_unsign' && $confirm == 'yes' && $user->hasRight('expedition', 'creer')) {
745 745
 		$result = $object->setSignedStatus($user, Expedition::$SIGNED_STATUSES['STATUS_NO_SIGNATURE'], 0, 'SHIPPING_MODIFY');
746 746
 		if ($result >= 0) {
747
-			header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
747
+			header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
748 748
 			exit;
749 749
 		} else {
750 750
 			setEventMessages($object->error, $object->errors, 'errors');
@@ -753,7 +753,7 @@  discard block
 block discarded – undo
753 753
 		$datedelivery = dol_mktime(GETPOSTINT('liv_hour'), GETPOSTINT('liv_min'), 0, GETPOSTINT('liv_month'), GETPOSTINT('liv_day'), GETPOSTINT('liv_year'));
754 754
 
755 755
 		$object->fetch($id);
756
-		$result = $object->setDeliveryDate($user, $datedelivery);	// Set the planned delivery date
756
+		$result = $object->setDeliveryDate($user, $datedelivery); // Set the planned delivery date
757 757
 		if ($result < 0) {
758 758
 			setEventMessages($object->error, $object->errors, 'errors');
759 759
 		}
@@ -794,7 +794,7 @@  discard block
 block discarded – undo
794 794
 		}
795 795
 
796 796
 		if ($object->update($user) >= 0) {
797
-			header("Location: card.php?id=" . $object->id);
797
+			header("Location: card.php?id=".$object->id);
798 798
 			exit;
799 799
 		}
800 800
 		setEventMessages($object->error, $object->errors, 'errors');
@@ -803,7 +803,7 @@  discard block
 block discarded – undo
803 803
 		$object->fetch($id);
804 804
 		$result = $object->setBilled();
805 805
 		if ($result >= 0) {
806
-			header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
806
+			header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
807 807
 			exit();
808 808
 		}
809 809
 		setEventMessages($object->error, $object->errors, 'errors');
@@ -811,7 +811,7 @@  discard block
 block discarded – undo
811 811
 		$object->fetch($id);
812 812
 		$result = $object->setClosed();
813 813
 		if ($result >= 0) {
814
-			header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
814
+			header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
815 815
 			exit();
816 816
 		}
817 817
 		setEventMessages($object->error, $object->errors, 'errors');
@@ -845,7 +845,7 @@  discard block
 block discarded – undo
845 845
 		}
846 846
 
847 847
 		if (!$error) {
848
-			header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
848
+			header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
849 849
 			exit();
850 850
 		} else {
851 851
 			setEventMessages($line->error, $line->errors, 'errors');
@@ -875,7 +875,7 @@  discard block
 block discarded – undo
875 875
 			if (is_array($extralabelsline)) {
876 876
 				// Get extra fields
877 877
 				foreach ($extralabelsline as $key => $value) {
878
-					unset($_POST["options_" . $key]);
878
+					unset($_POST["options_".$key]);
879 879
 				}
880 880
 			}
881 881
 
@@ -932,7 +932,7 @@  discard block
 block discarded – undo
932 932
 					// Unset extrafield POST Data
933 933
 					if (is_array($extrafields->attributes[$object->table_element_line]['label'])) {
934 934
 						foreach ($extrafields->attributes[$object->table_element_line]['label'] as $key => $value) {
935
-							unset($_POST["options_" . $key]);
935
+							unset($_POST["options_".$key]);
936 936
 						}
937 937
 					}
938 938
 					$line->fk_product = $lines[$i]->fk_product;
@@ -940,8 +940,8 @@  discard block
 block discarded – undo
940 940
 						// line with lot
941 941
 						foreach ($lines[$i]->detail_batch as $detail_batch) {
942 942
 							$lotStock = new Productbatch($db);
943
-							$batch = "batchl" . $detail_batch->fk_expeditiondet . "_" . $detail_batch->fk_origin_stock;
944
-							$qty = "qtyl" . $detail_batch->fk_expeditiondet . '_' . $detail_batch->id;
943
+							$batch = "batchl".$detail_batch->fk_expeditiondet."_".$detail_batch->fk_origin_stock;
944
+							$qty = "qtyl".$detail_batch->fk_expeditiondet.'_'.$detail_batch->id;
945 945
 							$batch_id = GETPOSTINT($batch);
946 946
 							$batch_qty = GETPOSTFLOAT($qty);
947 947
 							if (!empty($batch_id)) {
@@ -977,8 +977,8 @@  discard block
 block discarded – undo
977 977
 						}
978 978
 						// add new batch
979 979
 						$lotStock = new Productbatch($db);
980
-						$batch = "batchl" . $line_id . "_0";
981
-						$qty = "qtyl" . $line_id . "_0";
980
+						$batch = "batchl".$line_id."_0";
981
+						$qty = "qtyl".$line_id."_0";
982 982
 						$batch_id = GETPOSTINT($batch);
983 983
 						$batch_qty = GETPOSTFLOAT($qty);
984 984
 						$lineIdToAddLot = 0;
@@ -1041,8 +1041,8 @@  discard block
 block discarded – undo
1041 1041
 							// line without lot
1042 1042
 							if ($lines[$i]->entrepot_id == 0) {
1043 1043
 								// single warehouse shipment line or line in several warehouses context but with warehouse not defined
1044
-								$stockLocation = "entl" . $line_id;
1045
-								$qty = "qtyl" . $line_id;
1044
+								$stockLocation = "entl".$line_id;
1045
+								$qty = "qtyl".$line_id;
1046 1046
 								$line->id = $line_id;
1047 1047
 								$line->entrepot_id = GETPOSTINT((string) $stockLocation);
1048 1048
 								$line->qty = GETPOSTFLOAT($qty);
@@ -1054,8 +1054,8 @@  discard block
 block discarded – undo
1054 1054
 								unset($_POST[$qty]);
1055 1055
 							} elseif ($lines[$i]->entrepot_id > 0) {
1056 1056
 								// single warehouse shipment line
1057
-								$stockLocation = "entl" . $line_id;
1058
-								$qty = "qtyl" . $line_id;
1057
+								$stockLocation = "entl".$line_id;
1058
+								$qty = "qtyl".$line_id;
1059 1059
 								$line->id = $line_id;
1060 1060
 								$line->entrepot_id = GETPOSTINT($stockLocation);
1061 1061
 								$line->qty = GETPOSTFLOAT($qty);
@@ -1069,8 +1069,8 @@  discard block
 block discarded – undo
1069 1069
 								// multi warehouse shipment lines
1070 1070
 								foreach ($lines[$i]->details_entrepot as $detail_entrepot) {
1071 1071
 									if (!$error) {
1072
-										$stockLocation = "entl" . $detail_entrepot->line_id;
1073
-										$qty = "qtyl" . $detail_entrepot->line_id;
1072
+										$stockLocation = "entl".$detail_entrepot->line_id;
1073
+										$qty = "qtyl".$detail_entrepot->line_id;
1074 1074
 										$warehouse = GETPOSTINT($stockLocation);
1075 1075
 										if (!empty($warehouse)) {
1076 1076
 											$line->id = $detail_entrepot->line_id;
@@ -1088,7 +1088,7 @@  discard block
 block discarded – undo
1088 1088
 									}
1089 1089
 								}
1090 1090
 							} elseif (!isModEnabled('stock') && !isModEnabled('productbatch')) { // both product batch and stock are not activated.
1091
-								$qty = "qtyl" . $line_id;
1091
+								$qty = "qtyl".$line_id;
1092 1092
 								$line->id = $line_id;
1093 1093
 								$line->qty = GETPOSTFLOAT($qty);
1094 1094
 								$line->entrepot_id = 0;
@@ -1102,7 +1102,7 @@  discard block
 block discarded – undo
1102 1102
 							}
1103 1103
 						} else {
1104 1104
 							// Product no predefined
1105
-							$qty = "qtyl" . $line_id;
1105
+							$qty = "qtyl".$line_id;
1106 1106
 							$line->id = $line_id;
1107 1107
 							$line->qty = GETPOSTFLOAT($qty);
1108 1108
 							$line->entrepot_id = 0;
@@ -1145,12 +1145,12 @@  discard block
 block discarded – undo
1145 1145
 					$object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
1146 1146
 				}
1147 1147
 			} else {
1148
-				header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // To redisplay the form being edited
1148
+				header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); // To redisplay the form being edited
1149 1149
 				exit();
1150 1150
 			}
1151 1151
 		}
1152 1152
 	} elseif ($action == 'updateline' && $permissiontoadd && GETPOST('cancel', 'alpha') == $langs->trans("Cancel")) {
1153
-		header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // To redisplay the form being edited
1153
+		header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); // To redisplay the form being edited
1154 1154
 		exit();
1155 1155
 	} elseif ($action == 'addline' && !$origin && getDolGlobalString('SHIPMENT_STANDALONE') && $usercancreate) {	// Add a new line
1156 1156
 		$langs->load('errors');
@@ -1351,7 +1351,7 @@  discard block
 block discarded – undo
1351 1351
 				$object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
1352 1352
 			}
1353 1353
 
1354
-			header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
1354
+			header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
1355 1355
 			exit;
1356 1356
 		} else {
1357 1357
 			$mesg = $object->error;
@@ -1376,14 +1376,14 @@  discard block
 block discarded – undo
1376 1376
 				$object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
1377 1377
 			}
1378 1378
 
1379
-			header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
1379
+			header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
1380 1380
 			exit;
1381 1381
 		} else {
1382 1382
 			$mesg = $object->error;
1383 1383
 		}
1384 1384
 	}
1385 1385
 
1386
-	include DOL_DOCUMENT_ROOT . '/core/actions_printing.inc.php';
1386
+	include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
1387 1387
 
1388 1388
 	// Actions to send emails
1389 1389
 	if (empty($id)) {
@@ -1393,15 +1393,15 @@  discard block
 block discarded – undo
1393 1393
 	$paramname = 'id';
1394 1394
 	$autocopy = 'MAIN_MAIL_AUTOCOPY_SHIPMENT_TO';
1395 1395
 	$mode = 'emailfromshipment';
1396
-	$trackid = 'shi' . $object->id;
1397
-	include DOL_DOCUMENT_ROOT . '/core/actions_sendmails.inc.php';
1396
+	$trackid = 'shi'.$object->id;
1397
+	include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
1398 1398
 }
1399 1399
 
1400 1400
 /*
1401 1401
  * View
1402 1402
  */
1403 1403
 
1404
-$title = $object->ref . ' - ' . $langs->trans("Card");
1404
+$title = $object->ref.' - '.$langs->trans("Card");
1405 1405
 if ($action == 'create') {
1406 1406
 	$title = $langs->trans("NewSending");
1407 1407
 }
@@ -1430,7 +1430,7 @@  discard block
 block discarded – undo
1430 1430
 if (!$origin && $action == 'create' && !getDolGlobalString('SHIPMENT_STANDALONE')) {
1431 1431
 	print load_fiche_titre($langs->trans("CreateShipment"), '', 'dolly');
1432 1432
 
1433
-	print '<br>'  .$langs->trans("ShipmentCreationIsDoneFromOrder");
1433
+	print '<br>'.$langs->trans("ShipmentCreationIsDoneFromOrder");
1434 1434
 	$action = '';
1435 1435
 	$id = '';
1436 1436
 	$ref = '';
@@ -1452,12 +1452,12 @@  discard block
 block discarded – undo
1452 1452
 		$note_private = $object->getDefaultCreateValueFor('note_private');
1453 1453
 		$note_public = $object->getDefaultCreateValueFor('note_public');
1454 1454
 
1455
-		print '<form name="crea_expedition" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
1456
-		print '<input type="hidden" name="token" value="' . newToken() . '">';
1455
+		print '<form name="crea_expedition" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
1456
+		print '<input type="hidden" name="token" value="'.newToken().'">';
1457 1457
 		print '<input type="hidden" name="action" value="add">';
1458
-		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
1459
-		print '<input type="hidden" name="originid" value="' . $id . '">';
1460
-		print '<input type="hidden" name="backtopage" value="' . $backtopage . '">';
1458
+		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
1459
+		print '<input type="hidden" name="originid" value="'.$id.'">';
1460
+		print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
1461 1461
 
1462 1462
 		print dol_get_fiche_head([]);
1463 1463
 
@@ -1465,11 +1465,11 @@  discard block
 block discarded – undo
1465 1465
 
1466 1466
 		// Thirdparty
1467 1467
 		print '<tr>';
1468
-		print '<td class="fieldrequired">' . $langs->trans('ThirdParty') . '</td>';
1468
+		print '<td class="fieldrequired">'.$langs->trans('ThirdParty').'</td>';
1469 1469
 		if ($socid > 0) {
1470 1470
 			print '<td>';
1471 1471
 			print $soc->getNomUrl(1);
1472
-			print '<input type="hidden" name="socid" value="' . $soc->id . '">';
1472
+			print '<input type="hidden" name="socid" value="'.$soc->id.'">';
1473 1473
 			print '</td>';
1474 1474
 		} else {
1475 1475
 			print '<td class="valuefieldcreate">';
@@ -1503,10 +1503,10 @@  discard block
 block discarded – undo
1503 1503
 
1504 1504
 			$langs->load("projects");
1505 1505
 			print '<tr>';
1506
-			print '<td>' . $langs->trans("Project") . '</td><td colspan="2">';
1506
+			print '<td>'.$langs->trans("Project").'</td><td colspan="2">';
1507 1507
 			print img_picto('', 'project', 'class="pictofixedwidth"');
1508 1508
 			print $formproject->select_projects($soc->id, $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 1, 0, 'widthcentpercentminusxx');
1509
-			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>';
1509
+			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>';
1510 1510
 			print '</td>';
1511 1511
 			print '</tr>';
1512 1512
 		}
@@ -1534,7 +1534,7 @@  discard block
 block discarded – undo
1534 1534
 		print $langs->trans("Weight");
1535 1535
 		print '</td><td colspan="3">';
1536 1536
 		print img_picto('', 'fa-balance-scale', 'class="pictofixedwidth"');
1537
-		print '<input name="weight" size="4" value="' . GETPOSTINT('weight') . '"> ';
1537
+		print '<input name="weight" size="4" value="'.GETPOSTINT('weight').'"> ';
1538 1538
 		$text = $formproduct->selectMeasuringUnits("weight_units", "weight", (string) GETPOSTINT('weight_units'), 0, 2);
1539 1539
 		$htmltext = $langs->trans("KeepEmptyForAutoCalculation");
1540 1540
 		print $form->textwithpicto($text, $htmltext);
@@ -1542,12 +1542,12 @@  discard block
 block discarded – undo
1542 1542
 
1543 1543
 		// Dim
1544 1544
 		print '<tr><td>';
1545
-		print $langs->trans("Width") . ' x ' . $langs->trans("Height") . ' x ' . $langs->trans("Depth");
1545
+		print $langs->trans("Width").' x '.$langs->trans("Height").' x '.$langs->trans("Depth");
1546 1546
 		print ' </td><td colspan="3">';
1547 1547
 		print img_picto('', 'fa-ruler', 'class="pictofixedwidth"');
1548
-		print '<input name="sizeW" size="4" value="' . GETPOSTINT('sizeW') . '">';
1549
-		print ' x <input name="sizeH" size="4" value="' . GETPOSTINT('sizeH') . '">';
1550
-		print ' x <input name="sizeS" size="4" value="' . GETPOSTINT('sizeS') . '">';
1548
+		print '<input name="sizeW" size="4" value="'.GETPOSTINT('sizeW').'">';
1549
+		print ' x <input name="sizeH" size="4" value="'.GETPOSTINT('sizeH').'">';
1550
+		print ' x <input name="sizeS" size="4" value="'.GETPOSTINT('sizeS').'">';
1551 1551
 		print ' ';
1552 1552
 		$text = $formproduct->selectMeasuringUnits("size_units", "size", (string) GETPOSTINT('size_units'), 0, 2);
1553 1553
 		$htmltext = $langs->trans("KeepEmptyForAutoCalculation");
@@ -1607,7 +1607,7 @@  discard block
 block discarded – undo
1607 1607
 		}
1608 1608
 
1609 1609
 		// Note Public
1610
-		$htmltext ='';
1610
+		$htmltext = '';
1611 1611
 		print '<tr>';
1612 1612
 		print '<td class="tdtop">';
1613 1613
 		print $form->textwithpicto($langs->trans('NotePublic'), $htmltext);
@@ -1654,13 +1654,13 @@  discard block
 block discarded – undo
1654 1654
 				$entrepot = new Entrepot($db);
1655 1655
 			}
1656 1656
 
1657
-			print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
1658
-			print '<input type="hidden" name="token" value="' . newToken() . '">';
1657
+			print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
1658
+			print '<input type="hidden" name="token" value="'.newToken().'">';
1659 1659
 			print '<input type="hidden" name="action" value="add">';
1660
-			print '<input type="hidden" name="origin" value="' . $origin . '">';
1661
-			print '<input type="hidden" name="origin_id" value="' . $object->id . '">';
1660
+			print '<input type="hidden" name="origin" value="'.$origin.'">';
1661
+			print '<input type="hidden" name="origin_id" value="'.$object->id.'">';
1662 1662
 			if (GETPOSTINT('entrepot_id')) {
1663
-				print '<input type="hidden" name="entrepot_id" value="' . GETPOSTINT('entrepot_id') . '">';
1663
+				print '<input type="hidden" name="entrepot_id" value="'.GETPOSTINT('entrepot_id').'">';
1664 1664
 			}
1665 1665
 
1666 1666
 			print dol_get_fiche_head([]);
@@ -1690,13 +1690,13 @@  discard block
 block discarded – undo
1690 1690
 				print $langs->trans('RefCustomer');
1691 1691
 			}
1692 1692
 			print '</td><td colspan="3">';
1693
-			print '<input type="text" name="ref_customer" value="' . $object->ref_client . '" />';
1693
+			print '<input type="text" name="ref_customer" value="'.$object->ref_client.'" />';
1694 1694
 			print '</td>';
1695 1695
 			print '</tr>';
1696 1696
 
1697 1697
 			// Thirdparty
1698
-			print '<tr><td class="titlefieldcreate fieldrequired">' . $langs->trans('Company') . '</td>';
1699
-			print '<td colspan="3">' . $soc->getNomUrl(1) . '</td>';
1698
+			print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans('Company').'</td>';
1699
+			print '<td colspan="3">'.$soc->getNomUrl(1).'</td>';
1700 1700
 			print '</tr>';
1701 1701
 
1702 1702
 			// Project
@@ -1710,16 +1710,16 @@  discard block
 block discarded – undo
1710 1710
 				}
1711 1711
 				$langs->load("projects");
1712 1712
 				print '<tr>';
1713
-				print '<td>' . $langs->trans("Project") . '</td><td colspan="2">';
1713
+				print '<td>'.$langs->trans("Project").'</td><td colspan="2">';
1714 1714
 				print img_picto('', 'project', 'class="pictofixedwidth"');
1715 1715
 				print $formproject->select_projects($soc->id, $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 1, 0, 'widthcentpercentminusxx');
1716
-				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>';
1716
+				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>';
1717 1717
 				print '</td>';
1718 1718
 				print '</tr>';
1719 1719
 			}
1720 1720
 
1721 1721
 			// Date delivery planned
1722
-			print '<tr><td>' . $langs->trans("DateDeliveryPlanned") . '</td>';
1722
+			print '<tr><td>'.$langs->trans("DateDeliveryPlanned").'</td>';
1723 1723
 			print '<td colspan="3">';
1724 1724
 			print img_picto('', 'action', 'class="pictofixedwidth"');
1725 1725
 			$date_delivery = ($date_delivery ? $date_delivery : $object->delivery_date); // $date_delivery comes from GETPOST
@@ -1728,7 +1728,7 @@  discard block
 block discarded – undo
1728 1728
 			print '</tr>';
1729 1729
 
1730 1730
 			// Date shipment (sending)
1731
-			print '<tr><td>' . $langs->trans("DateShipping") . '</td>';
1731
+			print '<tr><td>'.$langs->trans("DateShipping").'</td>';
1732 1732
 			print '<td colspan="3">';
1733 1733
 			print img_picto('', 'action', 'class="pictofixedwidth"');
1734 1734
 			//$date_shipping = ($date_shipping ? $date_shipping : $object->date_shipping); // $date_shipping comes from GETPOST
@@ -1737,7 +1737,7 @@  discard block
 block discarded – undo
1737 1737
 			print '</tr>';
1738 1738
 
1739 1739
 			// Note Public
1740
-			print '<tr><td>' . $langs->trans("NotePublic") . '</td>';
1740
+			print '<tr><td>'.$langs->trans("NotePublic").'</td>';
1741 1741
 			print '<td colspan="3">';
1742 1742
 			$doleditor = new DolEditor('note_public', $object->note_public, '', 60, 'dolibarr_notes', 'In', false, false, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PUBLIC') ? 0 : 1, ROWS_3, '90%');
1743 1743
 			print $doleditor->Create(1);
@@ -1745,7 +1745,7 @@  discard block
 block discarded – undo
1745 1745
 
1746 1746
 			// Note Private
1747 1747
 			if ($object->note_private && !$user->socid) {
1748
-				print '<tr><td>' . $langs->trans("NotePrivate") . '</td>';
1748
+				print '<tr><td>'.$langs->trans("NotePrivate").'</td>';
1749 1749
 				print '<td colspan="3">';
1750 1750
 				$doleditor = new DolEditor('note_private', $object->note_private, '', 60, 'dolibarr_notes', 'In', false, false, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PRIVATE') ? 0 : 1, ROWS_3, '90%');
1751 1751
 				print $doleditor->Create(1);
@@ -1757,7 +1757,7 @@  discard block
 block discarded – undo
1757 1757
 			print $langs->trans("Weight");
1758 1758
 			print '</td><td colspan="3">';
1759 1759
 			print img_picto('', 'fa-balance-scale', 'class="pictofixedwidth"');
1760
-			print '<input name="weight" size="4" value="' . GETPOSTINT('weight') . '"> ';
1760
+			print '<input name="weight" size="4" value="'.GETPOSTINT('weight').'"> ';
1761 1761
 			$text = $formproduct->selectMeasuringUnits("weight_units", "weight", (string) GETPOSTINT('weight_units'), 0, 2);
1762 1762
 			$htmltext = $langs->trans("KeepEmptyForAutoCalculation");
1763 1763
 			print $form->textwithpicto($text, $htmltext);
@@ -1765,12 +1765,12 @@  discard block
 block discarded – undo
1765 1765
 
1766 1766
 			// Dim
1767 1767
 			print '<tr><td>';
1768
-			print $langs->trans("Width") . ' x ' . $langs->trans("Height") . ' x ' . $langs->trans("Depth");
1768
+			print $langs->trans("Width").' x '.$langs->trans("Height").' x '.$langs->trans("Depth");
1769 1769
 			print ' </td><td colspan="3">';
1770 1770
 			print img_picto('', 'fa-ruler', 'class="pictofixedwidth"');
1771
-			print '<input name="sizeW" size="4" value="' . GETPOSTINT('sizeW') . '">';
1772
-			print ' x <input name="sizeH" size="4" value="' . GETPOSTINT('sizeH') . '">';
1773
-			print ' x <input name="sizeS" size="4" value="' . GETPOSTINT('sizeS') . '">';
1771
+			print '<input name="sizeW" size="4" value="'.GETPOSTINT('sizeW').'">';
1772
+			print ' x <input name="sizeH" size="4" value="'.GETPOSTINT('sizeH').'">';
1773
+			print ' x <input name="sizeS" size="4" value="'.GETPOSTINT('sizeS').'">';
1774 1774
 			print ' ';
1775 1775
 			$text = $formproduct->selectMeasuringUnits("size_units", "size", (string) GETPOSTINT('size_units'), 0, 2);
1776 1776
 			$htmltext = $langs->trans("KeepEmptyForAutoCalculation");
@@ -1778,7 +1778,7 @@  discard block
 block discarded – undo
1778 1778
 			print '</td></tr>';
1779 1779
 
1780 1780
 			// Delivery method
1781
-			print "<tr><td>" . $langs->trans("DeliveryMethod") . "</td>";
1781
+			print "<tr><td>".$langs->trans("DeliveryMethod")."</td>";
1782 1782
 			print '<td colspan="3">';
1783 1783
 			$expe->fetch_delivery_methods();
1784 1784
 			print img_picto('', 'dolly', 'class="pictofixedwidth"');
@@ -1789,16 +1789,16 @@  discard block
 block discarded – undo
1789 1789
 			print "</td></tr>\n";
1790 1790
 
1791 1791
 			// Tracking number
1792
-			print "<tr><td>" . $langs->trans("TrackingNumber") . "</td>";
1792
+			print "<tr><td>".$langs->trans("TrackingNumber")."</td>";
1793 1793
 			print '<td colspan="3">';
1794 1794
 			print img_picto('', 'barcode', 'class="pictofixedwidth"');
1795
-			print '<input name="tracking_number" size="20" value="' . GETPOST('tracking_number', 'alpha') . '">';
1795
+			print '<input name="tracking_number" size="20" value="'.GETPOST('tracking_number', 'alpha').'">';
1796 1796
 			print "</td></tr>\n";
1797 1797
 
1798 1798
 			// Incoterms
1799 1799
 			if (isModEnabled('incoterm')) {
1800 1800
 				print '<tr>';
1801
-				print '<td><label for="incoterm_id">' . $form->textwithpicto($langs->trans("IncotermLabel"), $object->label_incoterms, 1) . '</label></td>';
1801
+				print '<td><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), $object->label_incoterms, 1).'</label></td>';
1802 1802
 				print '<td colspan="3" class="maxwidthonsmartphone">';
1803 1803
 				print img_picto('', 'incoterm', 'class="pictofixedwidth"');
1804 1804
 				print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''));
@@ -1806,10 +1806,10 @@  discard block
 block discarded – undo
1806 1806
 			}
1807 1807
 
1808 1808
 			// Document model
1809
-			include_once DOL_DOCUMENT_ROOT . '/core/modules/expedition/modules_expedition.php';
1809
+			include_once DOL_DOCUMENT_ROOT.'/core/modules/expedition/modules_expedition.php';
1810 1810
 			$list = ModelePdfExpedition::liste_modeles($db);
1811 1811
 			if (is_countable($list) && count($list) > 1) {
1812
-				print "<tr><td>" . $langs->trans("DefaultModel") . "</td>";
1812
+				print "<tr><td>".$langs->trans("DefaultModel")."</td>";
1813 1813
 				print '<td colspan="3">';
1814 1814
 				print img_picto('', 'pdf', 'class="pictofixedwidth"');
1815 1815
 				print $form->selectarray('model', $list, getDolGlobalString('EXPEDITION_ADDON_PDF'), 0, 0, 0, '', 0, 0, 0, '', 'widthcentpercentminusx');
@@ -1818,7 +1818,7 @@  discard block
 block discarded – undo
1818 1818
 
1819 1819
 			// Other attributes. Fields from hook formObjectOptions and Extrafields.
1820 1820
 			// $objectsrc is Commande|Facture
1821
-			$objectsav = $object;	// Because Expedition is $expe and not $object that is wrongly a duplicate of $objectsrc.
1821
+			$objectsav = $object; // Because Expedition is $expe and not $object that is wrongly a duplicate of $objectsrc.
1822 1822
 			$object = $expe;
1823 1823
 			// Propagate extrafieldsvalue from source object to shipment object
1824 1824
 			if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && !empty($extrafields->attributes[$object->table_element]['label'])) {
@@ -1845,22 +1845,22 @@  discard block
 block discarded – undo
1845 1845
 
1846 1846
 			$numAsked = count($object->lines);
1847 1847
 
1848
-			print '<script type="text/javascript">' . "\n";
1849
-			print 'jQuery(document).ready(function() {' . "\n";
1848
+			print '<script type="text/javascript">'."\n";
1849
+			print 'jQuery(document).ready(function() {'."\n";
1850 1850
 			print 'jQuery("#autofill").click(function() {';
1851 1851
 			$i = 0;
1852 1852
 			while ($i < $numAsked) {
1853
-				print 'jQuery("#qtyl' . $i . '").val(jQuery("#qtyasked' . $i . '").val() - jQuery("#qtydelivered' . $i . '").val());' . "\n";
1853
+				print 'jQuery("#qtyl'.$i.'").val(jQuery("#qtyasked'.$i.'").val() - jQuery("#qtydelivered'.$i.'").val());'."\n";
1854 1854
 				if (isModEnabled('productbatch')) {
1855
-					print 'jQuery("#qtyl' . $i . '_' . $i . '").val(jQuery("#qtyasked' . $i . '").val() - jQuery("#qtydelivered' . $i . '").val());' . "\n";
1855
+					print 'jQuery("#qtyl'.$i.'_'.$i.'").val(jQuery("#qtyasked'.$i.'").val() - jQuery("#qtydelivered'.$i.'").val());'."\n";
1856 1856
 				}
1857 1857
 				$i++;
1858 1858
 			}
1859
-			print 'return false; });' . "\n";
1860
-			print 'jQuery("#autoreset").click(function() { console.log("Reset values to 0"); jQuery(".qtyl").val(0);' . "\n";
1861
-			print 'return false; });' . "\n";
1862
-			print '});' . "\n";
1863
-			print '</script>' . "\n";
1859
+			print 'return false; });'."\n";
1860
+			print 'jQuery("#autoreset").click(function() { console.log("Reset values to 0"); jQuery(".qtyl").val(0);'."\n";
1861
+			print 'return false; });'."\n";
1862
+			print '});'."\n";
1863
+			print '</script>'."\n";
1864 1864
 
1865 1865
 			print '<br>';
1866 1866
 
@@ -1893,26 +1893,26 @@  discard block
 block discarded – undo
1893 1893
 				}
1894 1894
 				print $langs->trans("Description");
1895 1895
 				print '</td>';
1896
-				print '<td class="center">' . $langs->trans("QtyOrdered") . '</td>';
1897
-				print '<td class="center">' . $langs->trans("QtyShipped") . '</td>';
1898
-				print '<td class="center">' . $langs->trans("QtyToShip");
1896
+				print '<td class="center">'.$langs->trans("QtyOrdered").'</td>';
1897
+				print '<td class="center">'.$langs->trans("QtyShipped").'</td>';
1898
+				print '<td class="center">'.$langs->trans("QtyToShip");
1899 1899
 				if (!isModEnabled('productbatch')) {
1900
-					print '<br><a href="#" id="autofill" class="opacitymedium link cursor cursorpointer">' . img_picto($langs->trans("Autofill"), 'autofill', 'class="paddingrightonly"') . '</a>';
1900
+					print '<br><a href="#" id="autofill" class="opacitymedium link cursor cursorpointer">'.img_picto($langs->trans("Autofill"), 'autofill', 'class="paddingrightonly"').'</a>';
1901 1901
 					print ' / ';
1902 1902
 				} else {
1903 1903
 					print '<br>';
1904 1904
 				}
1905
-				print '<span id="autoreset" class="opacitymedium link cursor cursorpointer">' . img_picto($langs->trans("Reset"), 'eraser') . '</span>';
1905
+				print '<span id="autoreset" class="opacitymedium link cursor cursorpointer">'.img_picto($langs->trans("Reset"), 'eraser').'</span>';
1906 1906
 				print '</td>';
1907 1907
 				if (isModEnabled('stock')) {
1908 1908
 					if (!isModEnabled('productbatch')) {
1909
-						print '<td class="left">' . $langs->trans("Warehouse") . ' (' . $langs->trans("Stock") . ')</td>';
1909
+						print '<td class="left">'.$langs->trans("Warehouse").' ('.$langs->trans("Stock").')</td>';
1910 1910
 					} else {
1911
-						print '<td class="left">' . $langs->trans("Warehouse") . ' / ' . $langs->trans("Batch") . ' (' . $langs->trans("Stock") . ')</td>';
1911
+						print '<td class="left">'.$langs->trans("Warehouse").' / '.$langs->trans("Batch").' ('.$langs->trans("Stock").')</td>';
1912 1912
 					}
1913 1913
 				}
1914 1914
 				if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) {
1915
-					print '<td class="left">' . $langs->trans('StockEntryDate') . '</td>';
1915
+					print '<td class="left">'.$langs->trans('StockEntryDate').'</td>';
1916 1916
 				}
1917 1917
 				print "</tr>\n";
1918 1918
 			}
@@ -1949,8 +1949,8 @@  discard block
 block discarded – undo
1949 1949
 						$type = 1;
1950 1950
 					}
1951 1951
 
1952
-					print '<!-- line for order line ' . $line->id . ' -->' . "\n";
1953
-					print '<tr class="oddeven" id="row-' . $line->id . '">' . "\n";
1952
+					print '<!-- line for order line '.$line->id.' -->'."\n";
1953
+					print '<tr class="oddeven" id="row-'.$line->id.'">'."\n";
1954 1954
 
1955 1955
 					$qtyProdCom = $line->qty;
1956 1956
 					$productChildrenNb = 0;
@@ -1971,7 +1971,7 @@  discard block
 block discarded – undo
1971 1971
 						//var_dump($product->stock_warehouse[1]);
1972 1972
 
1973 1973
 						print '<td>';
1974
-						print '<a name="' . $line->id . '"></a>'; // ancre pour retourner sur la ligne
1974
+						print '<a name="'.$line->id.'"></a>'; // ancre pour retourner sur la ligne
1975 1975
 
1976 1976
 						// Show product and description
1977 1977
 						$product_static->type = $line->fk_product_type;
@@ -1984,7 +1984,7 @@  discard block
 block discarded – undo
1984 1984
 						$showdescinproductdesc = getDolGlobalString('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE');
1985 1985
 
1986 1986
 						$text = $product_static->getNomUrl(1);
1987
-						$text .= ' - ' . (!empty($line->label) ? $line->label : $line->product_label);
1987
+						$text .= ' - '.(!empty($line->label) ? $line->label : $line->product_label);
1988 1988
 						$description = ($showdescinproductdesc ? '' : dol_htmlentitiesbr($line->desc));
1989 1989
 						$description .= empty($product->stockable_product) ? $langs->trans('StockDisabled') : $langs->trans('StockEnabled');
1990 1990
 						print $form->textwithtooltip($text, $description, 3, 0, '', (string) $i);
@@ -1994,7 +1994,7 @@  discard block
 block discarded – undo
1994 1994
 
1995 1995
 						// Add description in form
1996 1996
 						if ($showdescinproductdesc) {
1997
-							print ($line->desc && $line->desc != $line->product_label) ? '<br>' . dol_htmlentitiesbr($line->desc) : '';
1997
+							print ($line->desc && $line->desc != $line->product_label) ? '<br>'.dol_htmlentitiesbr($line->desc) : '';
1998 1998
 						}
1999 1999
 
2000 2000
 						print '</td>';
@@ -2007,10 +2007,10 @@  discard block
 block discarded – undo
2007 2007
 						}
2008 2008
 
2009 2009
 						if (!empty($line->label)) {
2010
-							$text .= ' <strong>' . $line->label . '</strong>';
2010
+							$text .= ' <strong>'.$line->label.'</strong>';
2011 2011
 							print $form->textwithtooltip($text, $line->desc, 3, 0, '', (string) $i);
2012 2012
 						} else {
2013
-							print $text . ' ' . nl2br($line->desc);
2013
+							print $text.' '.nl2br($line->desc);
2014 2014
 						}
2015 2015
 
2016 2016
 						// Show range
@@ -2025,16 +2025,16 @@  discard block
 block discarded – undo
2025 2025
 					}
2026 2026
 
2027 2027
 					// Qty
2028
-					print '<td class="center">' . $line->qty;
2029
-					print '<input name="qtyasked' . $indiceAsked . '" id="qtyasked' . $indiceAsked . '" type="hidden" value="' . $line->qty . '">';
2030
-					print '' . $unit_order . '</td>';
2028
+					print '<td class="center">'.$line->qty;
2029
+					print '<input name="qtyasked'.$indiceAsked.'" id="qtyasked'.$indiceAsked.'" type="hidden" value="'.$line->qty.'">';
2030
+					print ''.$unit_order.'</td>';
2031 2031
 
2032 2032
 					// Qty already shipped
2033 2033
 					print '<td class="center">';
2034 2034
 					$quantityDelivered = isset($object->expeditions[$line->id]) ? $object->expeditions[$line->id] : '';
2035 2035
 					print $quantityDelivered;
2036
-					print '<input name="qtydelivered' . $indiceAsked . '" id="qtydelivered' . $indiceAsked . '" type="hidden" value="' . $quantityDelivered . '">';
2037
-					print '' . $unit_order . '</td>';
2036
+					print '<input name="qtydelivered'.$indiceAsked.'" id="qtydelivered'.$indiceAsked.'" type="hidden" value="'.$quantityDelivered.'">';
2037
+					print ''.$unit_order.'</td>';
2038 2038
 
2039 2039
 					// Qty to ship
2040 2040
 					$quantityAsked = $line->qty;
@@ -2065,19 +2065,19 @@  discard block
 block discarded – undo
2065 2065
 							// Quantity to send
2066 2066
 							print '<td class="center">';
2067 2067
 							if ($line->product_type == Product::TYPE_PRODUCT || getDolGlobalString('STOCK_SUPPORTS_SERVICES') || ($line->product_type == Product::TYPE_SERVICE && getDolGlobalString('SHIPMENT_SUPPORTS_SERVICES'))) {
2068
-								if (GETPOSTINT('qtyl' . $indiceAsked)) {
2069
-									$deliverableQty = GETPOSTINT('qtyl' . $indiceAsked);
2068
+								if (GETPOSTINT('qtyl'.$indiceAsked)) {
2069
+									$deliverableQty = GETPOSTINT('qtyl'.$indiceAsked);
2070 2070
 								}
2071
-								print '<input name="idl' . $indiceAsked . '" type="hidden" value="' . $line->id . '">';
2071
+								print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">';
2072 2072
 								$qtylValue = $deliverableQty;
2073 2073
 								if (getDolGlobalBool('SHIPMENT_DONT_PREFILL_QTY', false)) {
2074 2074
 									$qtylValue = '';
2075 2075
 								}
2076
-								print '<input name="qtyl' . $indiceAsked . '" id="qtyl' . $indiceAsked . '" class="qtyl right" type="text" size="4" value="' . $qtylValue . '">';
2076
+								print '<input name="qtyl'.$indiceAsked.'" id="qtyl'.$indiceAsked.'" class="qtyl right" type="text" size="4" value="'.$qtylValue.'">';
2077 2077
 							} else {
2078 2078
 								if (getDolGlobalString('SHIPMENT_GETS_ALL_ORDER_PRODUCTS')) {
2079
-									print '<input name="idl' . $indiceAsked . '" type="hidden" value="' . $line->id . '">';
2080
-									print '<input name="qtyl' . $indiceAsked . '" id="qtyl' . $indiceAsked . '" type="hidden" value="0">';
2079
+									print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">';
2080
+									print '<input name="qtyl'.$indiceAsked.'" id="qtyl'.$indiceAsked.'" type="hidden" value="0">';
2081 2081
 								}
2082 2082
 
2083 2083
 								print $langs->trans("NA");
@@ -2089,8 +2089,8 @@  discard block
 block discarded – undo
2089 2089
 								print '<td class="left">';
2090 2090
 								if ($line->product_type == Product::TYPE_PRODUCT || getDolGlobalString('STOCK_SUPPORTS_SERVICES')) {   // Type of product need stock change ?
2091 2091
 									// Show warehouse combo list
2092
-									$ent = "entl" . $indiceAsked;
2093
-									$idl = "idl" . $indiceAsked;
2092
+									$ent = "entl".$indiceAsked;
2093
+									$idl = "idl".$indiceAsked;
2094 2094
 									$tmpentrepot_id = is_numeric(GETPOST($ent)) ? GETPOSTINT($ent) : $warehouse_id;
2095 2095
 									if ($line->fk_product > 0) {
2096 2096
 										print '<!-- Show warehouse selection -->';
@@ -2100,24 +2100,24 @@  discard block
 block discarded – undo
2100 2100
 											$stockMin = 0;
2101 2101
 										}
2102 2102
 										if ($productChildrenNb > 0) {
2103
-											print $formproduct->selectWarehouses($tmpentrepot_id, 'entl' . $indiceAsked, '', 1, 0, 0, '', 0, 0, array(), 'minwidth200', array(), 1, $stockMin, 'stock DESC, e.ref');
2103
+											print $formproduct->selectWarehouses($tmpentrepot_id, 'entl'.$indiceAsked, '', 1, 0, 0, '', 0, 0, array(), 'minwidth200', array(), 1, $stockMin, 'stock DESC, e.ref');
2104 2104
 										} else {
2105 2105
 											if ($product->stockable_product == Product::ENABLED_STOCK) {
2106
-												print $formproduct->selectWarehouses($tmpentrepot_id, 'entl' . $indiceAsked, '', 1, 0, $line->fk_product, '', 1, 0, array(), 'minwidth200', array(), 1, $stockMin, 'stock DESC, e.ref');
2106
+												print $formproduct->selectWarehouses($tmpentrepot_id, 'entl'.$indiceAsked, '', 1, 0, $line->fk_product, '', 1, 0, array(), 'minwidth200', array(), 1, $stockMin, 'stock DESC, e.ref');
2107 2107
 											} else {
2108
-												print img_warning() . ' ' . $langs->trans('StockDisabled');
2108
+												print img_warning().' '.$langs->trans('StockDisabled');
2109 2109
 											}
2110 2110
 										}
2111 2111
 
2112 2112
 										if ($tmpentrepot_id > 0 && $tmpentrepot_id == $warehouse_id) {
2113 2113
 											//print $stock.' '.$quantityToBeDelivered;
2114 2114
 											if ($stock < $quantityToBeDelivered) {
2115
-												print ' ' . img_warning($langs->trans("StockTooLow")); // Stock too low for this $warehouse_id but you can change warehouse
2115
+												print ' '.img_warning($langs->trans("StockTooLow")); // Stock too low for this $warehouse_id but you can change warehouse
2116 2116
 											}
2117 2117
 										}
2118 2118
 									}
2119 2119
 								} else {
2120
-									print '<span class="opacitymedium">(' . $langs->trans("Service") . ')</span><input name="entl' . $indiceAsked . '" id="entl' . $indiceAsked . '" type="hidden" value="0">';
2120
+									print '<span class="opacitymedium">('.$langs->trans("Service").')</span><input name="entl'.$indiceAsked.'" id="entl'.$indiceAsked.'" type="hidden" value="0">';
2121 2121
 								}
2122 2122
 								print '</td>';
2123 2123
 							}
@@ -2138,9 +2138,9 @@  discard block
 block discarded – undo
2138 2138
 											$img = img_warning($langs->trans("StockTooLow"));
2139 2139
 										}
2140 2140
 										print "<tr class=\"oddeven\"><td>&nbsp; &nbsp; &nbsp; ->
2141
-												<a href=\"" . DOL_URL_ROOT . "/product/card.php?id=" . $value['id'] . "\">" . $value['fullpath'] . "
2142
-												</a> (" . $value['nb'] . ")</td><td class=\"center\"> " . $value['nb_total'] . "</td><td>&nbsp;</td><td>&nbsp;</td>
2143
-												<td class=\"center\">" . $value['stock'] . " " . $img . "</td>";
2141
+												<a href=\"" . DOL_URL_ROOT."/product/card.php?id=".$value['id']."\">".$value['fullpath']."
2142
+												</a> (" . $value['nb'].")</td><td class=\"center\"> ".$value['nb_total']."</td><td>&nbsp;</td><td>&nbsp;</td>
2143
+												<td class=\"center\">" . $value['stock']." ".$img."</td>";
2144 2144
 										if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) {
2145 2145
 											print '<td></td>';
2146 2146
 										} //StockEntrydate
@@ -2170,7 +2170,7 @@  discard block
 block discarded – undo
2170 2170
 									$nbofsuggested++;
2171 2171
 								}
2172 2172
 							}
2173
-							print '<input name="idl' . $indiceAsked . '" type="hidden" value="' . $line->id . '">';
2173
+							print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">';
2174 2174
 							if (is_object($product->stock_warehouse[$warehouse_id]) && count($product->stock_warehouse[$warehouse_id]->detail_batch)) {
2175 2175
 								foreach ($product->stock_warehouse[$warehouse_id]->detail_batch as $dbatch) {	// $dbatch is instance of Productbatch
2176 2176
 									//var_dump($dbatch);
@@ -2196,7 +2196,7 @@  discard block
 block discarded – undo
2196 2196
 										$deliverableQty = 0;
2197 2197
 									}
2198 2198
 
2199
-									$inputName = 'qtyl' . $indiceAsked . '_' . $subj;
2199
+									$inputName = 'qtyl'.$indiceAsked.'_'.$subj;
2200 2200
 									if (GETPOSTISSET($inputName)) {
2201 2201
 										$deliverableQty = GETPOST($inputName, 'int');
2202 2202
 									}
@@ -2204,37 +2204,37 @@  discard block
 block discarded – undo
2204 2204
 									$tooltipClass = $tooltipTitle = '';
2205 2205
 									if (!empty($alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)])) {
2206 2206
 										$tooltipClass = ' classfortooltip';
2207
-										$tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines') . ' : ' . $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)];
2207
+										$tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines').' : '.$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)];
2208 2208
 									} else {
2209 2209
 										$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0;
2210 2210
 									}
2211 2211
 									$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = $deliverableQty + $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)];
2212 2212
 
2213
-									print '<!-- subj=' . $subj . '/' . $nbofsuggested . ' --><tr ' . ((($subj + 1) == $nbofsuggested) ? 'oddeven' : '') . '>';
2213
+									print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested) ? 'oddeven' : '').'>';
2214 2214
 									print '<td colspan="3" ></td><td class="center">';
2215 2215
 									$qtylValue = $deliverableQty;
2216 2216
 									if (getDolGlobalBool('SHIPMENT_DONT_PREFILL_QTY', false)) {
2217 2217
 										$qtylValue = '';
2218 2218
 									}
2219
-									print '<input class="qtyl ' . $tooltipClass . ' right" title="' . $tooltipTitle . '" name="qtyl' . $indiceAsked . '_' . $subj . '" id="qtyl' . $indiceAsked . '_' . $subj . '" type="text" size="4" value="' . $qtylValue . '">';
2219
+									print '<input class="qtyl '.$tooltipClass.' right" title="'.$tooltipTitle.'" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="'.$qtylValue.'">';
2220 2220
 									print '</td>';
2221 2221
 
2222 2222
 									print '<!-- Show details of lot -->';
2223 2223
 									print '<td class="left">';
2224 2224
 
2225
-									print $staticwarehouse->getNomUrl(0) . ' / ';
2225
+									print $staticwarehouse->getNomUrl(0).' / ';
2226 2226
 
2227
-									print '<input name="batchl' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $dbatch->id . '">';
2227
+									print '<input name="batchl'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$dbatch->id.'">';
2228 2228
 
2229 2229
 									$detail = '';
2230
-									$detail .= $langs->trans("Batch") . ': ' . $dbatch->batch;
2230
+									$detail .= $langs->trans("Batch").': '.$dbatch->batch;
2231 2231
 									if (!getDolGlobalString('PRODUCT_DISABLE_SELLBY') && !empty($dbatch->sellby)) {
2232
-										$detail .= ' - ' . $langs->trans("SellByDate") . ': ' . dol_print_date($dbatch->sellby, "day");
2232
+										$detail .= ' - '.$langs->trans("SellByDate").': '.dol_print_date($dbatch->sellby, "day");
2233 2233
 									}
2234 2234
 									if (!getDolGlobalString('PRODUCT_DISABLE_EATBY') && !empty($dbatch->eatby)) {
2235
-										$detail .= ' - ' . $langs->trans("EatByDate") . ': ' . dol_print_date($dbatch->eatby, "day");
2235
+										$detail .= ' - '.$langs->trans("EatByDate").': '.dol_print_date($dbatch->eatby, "day");
2236 2236
 									}
2237
-									$detail .= ' - ' . $langs->trans("Qty") . ': ' . $dbatch->qty;
2237
+									$detail .= ' - '.$langs->trans("Qty").': '.$dbatch->qty;
2238 2238
 									$detail .= '<br>';
2239 2239
 									print $detail;
2240 2240
 
@@ -2245,18 +2245,18 @@  discard block
 block discarded – undo
2245 2245
 									$subj++;
2246 2246
 									print '</td>';
2247 2247
 									if (getDolGlobalInt('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) {
2248
-										print '<td>' . dol_print_date($dbatch->context['stock_entry_date'], 'day') . '</td>'; //StockEntrydate
2248
+										print '<td>'.dol_print_date($dbatch->context['stock_entry_date'], 'day').'</td>'; //StockEntrydate
2249 2249
 									}
2250 2250
 									print '</tr>';
2251 2251
 								}
2252 2252
 							} else {
2253 2253
 								print '<!-- Case there is no details of lot at all -->';
2254 2254
 								print '<tr class="oddeven"><td colspan="3"></td><td class="center">';
2255
-								print '<input class="qtyl right" name="qtyl' . $indiceAsked . '_' . $subj . '" id="qtyl' . $indiceAsked . '_' . $subj . '" type="text" size="4" value="0" disabled="disabled"> ';
2255
+								print '<input class="qtyl right" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="0" disabled="disabled"> ';
2256 2256
 								print '</td>';
2257 2257
 
2258 2258
 								print '<td class="left">';
2259
-								print img_warning() . ' ' . $langs->trans("NoProductToShipFoundIntoStock", $staticwarehouse->label);
2259
+								print img_warning().' '.$langs->trans("NoProductToShipFoundIntoStock", $staticwarehouse->label);
2260 2260
 								print '</td>';
2261 2261
 								if (getDolGlobalInt('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) {
2262 2262
 									print '<td></td>';
@@ -2272,9 +2272,9 @@  discard block
 block discarded – undo
2272 2272
 							if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) {
2273 2273
 								print '<td></td>';
2274 2274
 							} //StockEntrydate
2275
-							print '</tr>' . "\n"; // end line and start a new one for each warehouse
2275
+							print '</tr>'."\n"; // end line and start a new one for each warehouse
2276 2276
 
2277
-							print '<input name="idl' . $indiceAsked . '" type="hidden" value="' . $line->id . '">';
2277
+							print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">';
2278 2278
 							$subj = 0;
2279 2279
 							// Define nb of lines suggested for this order line
2280 2280
 							$nbofsuggested = 0;
@@ -2298,8 +2298,8 @@  discard block
 block discarded – undo
2298 2298
 									$deliverableQty = min($quantityToBeDelivered, $stock);
2299 2299
 									$deliverableQty = max(0, $deliverableQty);
2300 2300
 									// Quantity to send
2301
-									print '<!-- subj=' . $subj . '/' . $nbofsuggested . ' --><tr ' . ((($subj + 1) == $nbofsuggested) ? 'oddeven' : '') . '>';
2302
-									print '<td colspan="3" ></td><td class="center"><!-- qty to ship (no lot management for product line indiceAsked=' . $indiceAsked . ') -->';
2301
+									print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested) ? 'oddeven' : '').'>';
2302
+									print '<td colspan="3" ></td><td class="center"><!-- qty to ship (no lot management for product line indiceAsked='.$indiceAsked.') -->';
2303 2303
 									if ($line->product_type == Product::TYPE_PRODUCT || getDolGlobalString('STOCK_SUPPORTS_SERVICES') || getDolGlobalString('SHIPMENT_SUPPORTS_SERVICES')) {
2304 2304
 										if (isset($alreadyQtySetted[$line->fk_product][intval($warehouse_id)])) {
2305 2305
 											$deliverableQty = min($quantityToBeDelivered, $stock - $alreadyQtySetted[$line->fk_product][intval($warehouse_id)]);
@@ -2318,14 +2318,14 @@  discard block
 block discarded – undo
2318 2318
 										$tooltipClass = $tooltipTitle = '';
2319 2319
 										if (!empty($alreadyQtySetted[$line->fk_product][intval($warehouse_id)])) {
2320 2320
 											$tooltipClass = ' classfortooltip';
2321
-											$tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines') . ' : ' . $alreadyQtySetted[$line->fk_product][intval($warehouse_id)];
2321
+											$tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines').' : '.$alreadyQtySetted[$line->fk_product][intval($warehouse_id)];
2322 2322
 										} else {
2323 2323
 											$alreadyQtySetted[$line->fk_product][intval($warehouse_id)] = 0;
2324 2324
 										}
2325 2325
 
2326 2326
 										$alreadyQtySetted[$line->fk_product][intval($warehouse_id)] = $deliverableQty + $alreadyQtySetted[$line->fk_product][intval($warehouse_id)];
2327 2327
 
2328
-										$inputName = 'qtyl' . $indiceAsked . '_' . $subj;
2328
+										$inputName = 'qtyl'.$indiceAsked.'_'.$subj;
2329 2329
 										if (GETPOSTISSET($inputName)) {
2330 2330
 											$deliverableQty = GETPOSTINT($inputName);
2331 2331
 										}
@@ -2333,11 +2333,11 @@  discard block
 block discarded – undo
2333 2333
 										if (getDolGlobalBool('SHIPMENT_DONT_PREFILL_QTY', false)) {
2334 2334
 											$qtylValue = '';
2335 2335
 										}
2336
-										print '<input class="qtyl' . $tooltipClass . ' right" title="' . $tooltipTitle . '" name="qtyl' . $indiceAsked . '_' . $subj . '" id="qtyl' . $indiceAsked . '" type="text" size="4" value="' . $qtylValue . '">';
2337
-										print '<input name="ent1' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $warehouse_id . '">';
2336
+										print '<input class="qtyl'.$tooltipClass.' right" title="'.$tooltipTitle.'" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'" type="text" size="4" value="'.$qtylValue.'">';
2337
+										print '<input name="ent1'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$warehouse_id.'">';
2338 2338
 									} else {
2339 2339
 										if (getDolGlobalString('SHIPMENT_GETS_ALL_ORDER_PRODUCTS')) {
2340
-											print '<input name="qtyl' . $indiceAsked . '_' . $subj . '" id="qtyl' . $indiceAsked . '" type="hidden" value="0">';
2340
+											print '<input name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'" type="hidden" value="0">';
2341 2341
 										}
2342 2342
 
2343 2343
 										print $langs->trans("NA");
@@ -2348,16 +2348,16 @@  discard block
 block discarded – undo
2348 2348
 									print '<td class="left">';
2349 2349
 									if ($line->product_type == Product::TYPE_PRODUCT || getDolGlobalString('STOCK_SUPPORTS_SERVICES')) {
2350 2350
 										if ($product->stockable_product == Product::ENABLED_STOCK || $productChildrenNb > 0) {
2351
-											print $tmpwarehouseObject->getNomUrl(0) . ' ';
2351
+											print $tmpwarehouseObject->getNomUrl(0).' ';
2352 2352
 											if ($productChildrenNb <= 0) {
2353 2353
 												print '<!-- Show details of stock -->';
2354
-												print '(' . $stock . ')';
2354
+												print '('.$stock.')';
2355 2355
 											}
2356 2356
 										} else {
2357
-											print img_warning() . ' ' . $langs->trans('StockDisabled');
2357
+											print img_warning().' '.$langs->trans('StockDisabled');
2358 2358
 										}
2359 2359
 									} else {
2360
-										print '<span class="opacitymedium">(' . $langs->trans("Service") . ')</span>';
2360
+										print '<span class="opacitymedium">('.$langs->trans("Service").')</span>';
2361 2361
 									}
2362 2362
 									print '</td>';
2363 2363
 									$quantityToBeDelivered -= $deliverableQty;
@@ -2384,9 +2384,9 @@  discard block
 block discarded – undo
2384 2384
 										}
2385 2385
 										print '<tr class"oddeven"><td>';
2386 2386
 										print "&nbsp; &nbsp; &nbsp; ->
2387
-											<a href=\"" . DOL_URL_ROOT . "/product/card.php?id=" . $value['id'] . "\">" . $value['fullpath'] . "
2388
-											</a> (" . $value['nb'] . ")</td><td class=\"center\"> " . $value['nb_total'] . "</td><td>&nbsp;</td><td>&nbsp;</td>
2389
-											<td class=\"center\">" . $value['stock'] . " " . $img . "</td>";
2387
+											<a href=\"" . DOL_URL_ROOT."/product/card.php?id=".$value['id']."\">".$value['fullpath']."
2388
+											</a> (" . $value['nb'].")</td><td class=\"center\"> ".$value['nb_total']."</td><td>&nbsp;</td><td>&nbsp;</td>
2389
+											<td class=\"center\">" . $value['stock']." ".$img."</td>";
2390 2390
 										if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) {
2391 2391
 											print '<td></td>';
2392 2392
 										} //StockEntrydate
@@ -2403,7 +2403,7 @@  discard block
 block discarded – undo
2403 2403
 							print '</tr>'; // end line and start a new one for lot/serial
2404 2404
 
2405 2405
 							$subj = 0;
2406
-							print '<input name="idl' . $indiceAsked . '" type="hidden" value="' . $line->id . '">';
2406
+							print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">';
2407 2407
 
2408 2408
 							$tmpwarehouseObject = new Entrepot($db);
2409 2409
 							$productlotObject = new Productlot($db);
@@ -2445,7 +2445,7 @@  discard block
 block discarded – undo
2445 2445
 											$deliverableQty = 0;
2446 2446
 										}
2447 2447
 
2448
-										$inputName = 'qtyl' . $indiceAsked . '_' . $subj;
2448
+										$inputName = 'qtyl'.$indiceAsked.'_'.$subj;
2449 2449
 										if (GETPOSTISSET($inputName)) {
2450 2450
 											$deliverableQty = GETPOSTINT($inputName);
2451 2451
 										}
@@ -2453,30 +2453,30 @@  discard block
 block discarded – undo
2453 2453
 										$tooltipClass = $tooltipTitle = '';
2454 2454
 										if (!empty($alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)])) {
2455 2455
 											$tooltipClass = ' classfortooltip';
2456
-											$tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines') . ' : ' . $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)];
2456
+											$tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines').' : '.$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)];
2457 2457
 										} else {
2458 2458
 											$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0;
2459 2459
 										}
2460 2460
 										$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = $deliverableQty + $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)];
2461 2461
 
2462
-										print '<!-- subj=' . $subj . '/' . $nbofsuggested . ' --><tr ' . ((($subj + 1) == $nbofsuggested) ? 'oddeven' : '') . '><td colspan="3"></td><td class="center">';
2462
+										print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested) ? 'oddeven' : '').'><td colspan="3"></td><td class="center">';
2463 2463
 										$qtylValue = $deliverableQty;
2464 2464
 										if (getDolGlobalBool('SHIPMENT_DONT_PREFILL_QTY', false)) {
2465 2465
 											$qtylValue = '';
2466 2466
 										}
2467
-										print '<input class="qtyl right ' . $tooltipClass . '" title="' . $tooltipTitle . '" name="' . $inputName . '" id="' . $inputName . '" type="text" size="4" value="' . $qtylValue . '">';
2467
+										print '<input class="qtyl right '.$tooltipClass.'" title="'.$tooltipTitle.'" name="'.$inputName.'" id="'.$inputName.'" type="text" size="4" value="'.$qtylValue.'">';
2468 2468
 										print '</td>';
2469 2469
 
2470 2470
 										print '<td class="left">';
2471 2471
 
2472
-										print $tmpwarehouseObject->getNomUrl(0) . ' / ';
2472
+										print $tmpwarehouseObject->getNomUrl(0).' / ';
2473 2473
 
2474 2474
 										print '<!-- Show details of lot -->';
2475
-										print '<input name="batchl' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $dbatch->id . '">';
2476
-										print '<input name="entl' . $indiceAsked . '_'.$subj.'" type="hidden" value="' . $tmpwarehouseObject->id . '">';
2475
+										print '<input name="batchl'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$dbatch->id.'">';
2476
+										print '<input name="entl'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$tmpwarehouseObject->id.'">';
2477 2477
 
2478 2478
 										//print '|'.$line->fk_product.'|'.$dbatch->batch.'|<br>';
2479
-										print $langs->trans("Batch") . ': ';
2479
+										print $langs->trans("Batch").': ';
2480 2480
 										$result = $productlotObject->fetch(0, $line->fk_product, $dbatch->batch);
2481 2481
 										if ($result > 0) {
2482 2482
 											print $productlotObject->getNomUrl(1);
@@ -2484,12 +2484,12 @@  discard block
 block discarded – undo
2484 2484
 											print $langs->trans("TableLotIncompleteRunRepairWithParamStandardEqualConfirmed");
2485 2485
 										}
2486 2486
 										if (!getDolGlobalString('PRODUCT_DISABLE_SELLBY') && !empty($dbatch->sellby)) {
2487
-											print ' - ' . $langs->trans("SellByDate") . ': ' . dol_print_date($dbatch->sellby, "day");
2487
+											print ' - '.$langs->trans("SellByDate").': '.dol_print_date($dbatch->sellby, "day");
2488 2488
 										}
2489 2489
 										if (!getDolGlobalString('PRODUCT_DISABLE_EATBY') && !empty($dbatch->eatby)) {
2490
-											print ' - ' . $langs->trans("EatByDate") . ': ' . dol_print_date($dbatch->eatby, "day");
2490
+											print ' - '.$langs->trans("EatByDate").': '.dol_print_date($dbatch->eatby, "day");
2491 2491
 										}
2492
-										print ' (' . $dbatch->qty . ')';
2492
+										print ' ('.$dbatch->qty.')';
2493 2493
 										$quantityToBeDelivered -= $deliverableQty;
2494 2494
 										if ($quantityToBeDelivered < 0) {
2495 2495
 											$quantityToBeDelivered = 0;
@@ -2498,7 +2498,7 @@  discard block
 block discarded – undo
2498 2498
 										$subj++;
2499 2499
 										print '</td>';
2500 2500
 										if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) {
2501
-											print '<td class="left">' . dol_print_date($dbatch->context['stock_entry_date'], 'day') . '</td>';
2501
+											print '<td class="left">'.dol_print_date($dbatch->context['stock_entry_date'], 'day').'</td>';
2502 2502
 										}
2503 2503
 										print '</tr>';
2504 2504
 									}
@@ -2525,7 +2525,7 @@  discard block
 block discarded – undo
2525 2525
 								}
2526 2526
 								print '<input class="qtyl right" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="0"'.($disabled ? ' '.$disabled : '').'> ';
2527 2527
 								if (empty($disabled) && (!getDolGlobalInt('STOCK_DISALLOW_NEGATIVE_TRANSFER') || $product->stockable_product == Product::DISABLED_STOCK)) {
2528
-									print '<input name="ent1' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $warehouse_selected_id . '">';
2528
+									print '<input name="ent1'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$warehouse_selected_id.'">';
2529 2529
 								}
2530 2530
 							} elseif ($line->product_type == Product::TYPE_SERVICE && getDolGlobalString('SHIPMENT_SUPPORTS_SERVICES')) {
2531 2531
 								$disabled = '';
@@ -2537,7 +2537,7 @@  discard block
 block discarded – undo
2537 2537
 								}
2538 2538
 								print '<input class="qtyl right" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="'.$quantityToBeDelivered.'"'.($disabled ? ' '.$disabled : '').'> ';
2539 2539
 								if (empty($disabled) && !getDolGlobalInt('STOCK_DISALLOW_NEGATIVE_TRANSFER')) {
2540
-									print '<input name="ent1' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $warehouse_selected_id . '">';
2540
+									print '<input name="ent1'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$warehouse_selected_id.'">';
2541 2541
 								}
2542 2542
 							} else {
2543 2543
 								print $langs->trans("NA");
@@ -2549,20 +2549,20 @@  discard block
 block discarded – undo
2549 2549
 								if ($warehouse_selected_id > 0 && $product->stockable_product == Product::ENABLED_STOCK) {
2550 2550
 									$warehouseObject = new Entrepot($db);
2551 2551
 									$warehouseObject->fetch($warehouse_selected_id);
2552
-									print img_warning() . ' ' . $langs->trans("NoProductToShipFoundIntoStock", $warehouseObject->label);
2552
+									print img_warning().' '.$langs->trans("NoProductToShipFoundIntoStock", $warehouseObject->label);
2553 2553
 								} else {
2554 2554
 									if ($line->fk_product) {
2555 2555
 										if ($product->stockable_product == Product::ENABLED_STOCK) {
2556
-											print img_warning() . ' ' . $langs->trans('StockTooLow');
2556
+											print img_warning().' '.$langs->trans('StockTooLow');
2557 2557
 										} else {
2558
-											print img_warning() . ' ' . $langs->trans('StockDisabled');
2558
+											print img_warning().' '.$langs->trans('StockDisabled');
2559 2559
 										}
2560 2560
 									} else {
2561 2561
 										print '';
2562 2562
 									}
2563 2563
 								}
2564 2564
 							} else {
2565
-								print '<span class="opacitymedium">(' . $langs->trans("Service") . ')</span>';
2565
+								print '<span class="opacitymedium">('.$langs->trans("Service").')</span>';
2566 2566
 							}
2567 2567
 							print '</td>';
2568 2568
 							if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) {
@@ -2606,7 +2606,7 @@  discard block
 block discarded – undo
2606 2606
 		}
2607 2607
 	}
2608 2608
 } elseif ($object->id > 0) {
2609
-	'@phan-var-force Expedition $object';  // Need to force it (type overridden earlier)
2609
+	'@phan-var-force Expedition $object'; // Need to force it (type overridden earlier)
2610 2610
 
2611 2611
 	// Edit and view mode
2612 2612
 
@@ -2646,7 +2646,7 @@  discard block
 block discarded – undo
2646 2646
 			);
2647 2647
 		}
2648 2648
 		$formconfirm = $form->formconfirm(
2649
-			$_SERVER['PHP_SELF'] . '?id=' . $object->id,
2649
+			$_SERVER['PHP_SELF'].'?id='.$object->id,
2650 2650
 			$langs->trans('DeleteSending'),
2651 2651
 			$langs->trans("ConfirmDeleteSending", $object->ref),
2652 2652
 			'confirm_delete',
@@ -2667,7 +2667,7 @@  discard block
 block discarded – undo
2667 2667
 			$title = "DeleteTitleLine";
2668 2668
 			$question = "ConfirmDeleteTitleLine";
2669 2669
 		}
2670
-		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans($title), $langs->trans($question), 'confirm_delete_subtotalline', $formconfirm, 'no', 1);
2670
+		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans($title), $langs->trans($question), 'confirm_delete_subtotalline', $formconfirm, 'no', 1);
2671 2671
 	}
2672 2672
 
2673 2673
 	// Confirm validation
@@ -2681,13 +2681,13 @@  discard block
 block discarded – undo
2681 2681
 
2682 2682
 		$text = $langs->trans("ConfirmValidateSending", $numref);
2683 2683
 		if (getDolGlobalString('STOCK_CALCULATE_ON_SHIPMENT')) {
2684
-			$text .= '<br>' . img_picto('', 'movement', 'class="pictofixedwidth"') . $langs->trans("StockMovementWillBeRecorded") . '.';
2684
+			$text .= '<br>'.img_picto('', 'movement', 'class="pictofixedwidth"').$langs->trans("StockMovementWillBeRecorded").'.';
2685 2685
 		} elseif (getDolGlobalString('STOCK_CALCULATE_ON_SHIPMENT_CLOSE')) {
2686
-			$text .= '<br>' . img_picto('', 'movement', 'class="pictofixedwidth"') . $langs->trans("StockMovementNotYetRecorded") . '.';
2686
+			$text .= '<br>'.img_picto('', 'movement', 'class="pictofixedwidth"').$langs->trans("StockMovementNotYetRecorded").'.';
2687 2687
 		}
2688 2688
 
2689 2689
 		if (isModEnabled('notification')) {
2690
-			require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
2690
+			require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
2691 2691
 			$notify = new Notify($db);
2692 2692
 			$text .= '<br>';
2693 2693
 			$text .= $notify->confirmMessage('SHIPPING_VALIDATE', $object->socid, $object);
@@ -2698,14 +2698,14 @@  discard block
 block discarded – undo
2698 2698
 
2699 2699
 	// Confirm cancellation
2700 2700
 	if ($action == 'cancel') {
2701
-		$formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id, $langs->trans('CancelSending'), $langs->trans("ConfirmCancelSending", $object->ref), 'confirm_cancel', '', 0, 1);
2701
+		$formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('CancelSending'), $langs->trans("ConfirmCancelSending", $object->ref), 'confirm_cancel', '', 0, 1);
2702 2702
 	}
2703 2703
 
2704 2704
 	// Confirm sign
2705 2705
 	if ($action == 'sign') {
2706 2706
 		$text = $langs->trans('ConfirmSignShipping');
2707 2707
 		if (isModEnabled('notification')) {
2708
-			require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
2708
+			require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
2709 2709
 			$notify = new Notify($db);
2710 2710
 			$text .= '<br>';
2711 2711
 			$text .= $notify->confirmMessage('SHIPPING_MODIFY', $object->socid, $object);
@@ -2715,7 +2715,7 @@  discard block
 block discarded – undo
2715 2715
 			'type' 		=> 'select',
2716 2716
 			'name' 		=> 'signed_status',
2717 2717
 			'select_show_empty' => 0,
2718
-			'label'		=> '<span class="fieldrequired">' . $langs->trans('SignStatus') . '</span>',
2718
+			'label'		=> '<span class="fieldrequired">'.$langs->trans('SignStatus').'</span>',
2719 2719
 			'values'	=> $object->getSignedStatusLocalisedArray()
2720 2720
 		];
2721 2721
 		$formconfirm = $form->formconfirm(dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id]), $langs->trans('SignShipping'), $text, 'confirm_sign', $formquestion, 0, 1);
@@ -2725,7 +2725,7 @@  discard block
 block discarded – undo
2725 2725
 	if ($action == 'unsign') {
2726 2726
 		$text = $langs->trans('ConfirmUnsignShipping');
2727 2727
 		if (isModEnabled('notification')) {
2728
-			require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
2728
+			require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
2729 2729
 			$notify = new Notify($db);
2730 2730
 			$text .= '<br>';
2731 2731
 			$text .= $notify->confirmMessage('SHIPPING_MODIFY', $object->socid, $object);
@@ -2761,14 +2761,14 @@  discard block
 block discarded – undo
2761 2761
 	}
2762 2762
 
2763 2763
 	// Shipment card
2764
-	$linkback = '<a href="' . DOL_URL_ROOT . '/expedition/list.php?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
2764
+	$linkback = '<a href="'.DOL_URL_ROOT.'/expedition/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
2765 2765
 	$morehtmlref = '<div class="refidno">';
2766 2766
 	// Ref customer shipment
2767 2767
 	$morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->hasRight('expedition', 'creer'), 'string', '', 0, 1);
2768
-	$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);
2768
+	$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);
2769 2769
 
2770 2770
 	// Thirdparty
2771
-	$morehtmlref .= '<br>' . $object->thirdparty->getNomUrl(1);
2771
+	$morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1);
2772 2772
 
2773 2773
 	// Project
2774 2774
 	if ($origin && $origin_id > 0) {
@@ -2800,16 +2800,16 @@  discard block
 block discarded – undo
2800 2800
 			if ($permissiontoadd) {
2801 2801
 				$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
2802 2802
 				if ($action != 'classify') {
2803
-					$morehtmlref .= '<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> ';
2803
+					$morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> ';
2804 2804
 				}
2805
-				$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');
2805
+				$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');
2806 2806
 			} else {
2807 2807
 				if (!empty($object->fk_project)) {
2808 2808
 					$proj = new Project($db);
2809 2809
 					$proj->fetch($object->fk_project);
2810 2810
 					$morehtmlref .= $proj->getNomUrl(1);
2811 2811
 					if ($proj->title) {
2812
-						$morehtmlref .= '<span class="opacitymedium"> - ' . dol_escape_htmltag($proj->title) . '</span>';
2812
+						$morehtmlref .= '<span class="opacitymedium"> - '.dol_escape_htmltag($proj->title).'</span>';
2813 2813
 					}
2814 2814
 				}
2815 2815
 			}
@@ -2828,7 +2828,7 @@  discard block
 block discarded – undo
2828 2828
 	// Linked documents
2829 2829
 	if (!empty($typeobject) && $typeobject == 'commande' && $object->origin_object->id && isModEnabled('order')) {
2830 2830
 		print '<tr><td>';
2831
-		print $langs->trans("RefOrder") . '</td>';
2831
+		print $langs->trans("RefOrder").'</td>';
2832 2832
 		print '<td>';
2833 2833
 		print $objectsrc->getNomUrl(1, 'commande');
2834 2834
 		print "</td>\n";
@@ -2836,7 +2836,7 @@  discard block
 block discarded – undo
2836 2836
 	}
2837 2837
 	if (!empty($typeobject) && $typeobject == 'propal' && $object->origin_object->id && isModEnabled("propal")) {
2838 2838
 		print '<tr><td>';
2839
-		print $langs->trans("RefProposal") . '</td>';
2839
+		print $langs->trans("RefProposal").'</td>';
2840 2840
 		print '<td>';
2841 2841
 		print $objectsrc->getNomUrl(1, 'expedition');
2842 2842
 		print "</td>\n";
@@ -2844,8 +2844,8 @@  discard block
 block discarded – undo
2844 2844
 	}
2845 2845
 
2846 2846
 	// Date creation
2847
-	print '<tr><td class="titlefieldmiddle">' . $langs->trans("DateCreation") . '</td>';
2848
-	print '<td>' . dol_print_date($object->date_creation, "dayhour") . "</td>\n";
2847
+	print '<tr><td class="titlefieldmiddle">'.$langs->trans("DateCreation").'</td>';
2848
+	print '<td>'.dol_print_date($object->date_creation, "dayhour")."</td>\n";
2849 2849
 	print '</tr>';
2850 2850
 
2851 2851
 	// Delivery date planned
@@ -2854,16 +2854,16 @@  discard block
 block discarded – undo
2854 2854
 	print $langs->trans('DateDeliveryPlanned');
2855 2855
 	print '</td>';
2856 2856
 	if ($action != 'editdate_livraison') {
2857
-		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>';
2857
+		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>';
2858 2858
 	}
2859 2859
 	print '</tr></table>';
2860 2860
 	print '</td><td>';
2861 2861
 	if ($action == 'editdate_livraison') {
2862
-		print '<form name="setdate_livraison" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
2863
-		print '<input type="hidden" name="token" value="' . newToken() . '">';
2862
+		print '<form name="setdate_livraison" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
2863
+		print '<input type="hidden" name="token" value="'.newToken().'">';
2864 2864
 		print '<input type="hidden" name="action" value="setdate_livraison">';
2865 2865
 		print $form->selectDate($object->date_delivery ? $object->date_delivery : -1, 'liv_', 1, 1, 0, "setdate_livraison", 1, 0);
2866
-		print '<input type="submit" class="button button-edit smallpaddingimp" value="' . $langs->trans('Modify') . '">';
2866
+		print '<input type="submit" class="button button-edit smallpaddingimp" value="'.$langs->trans('Modify').'">';
2867 2867
 		print '</form>';
2868 2868
 	} else {
2869 2869
 		print $object->date_delivery ? dol_print_date($object->date_delivery, 'dayhour') : '&nbsp;';
@@ -2877,16 +2877,16 @@  discard block
 block discarded – undo
2877 2877
 	print $langs->trans('DateShipping');
2878 2878
 	print '</td>';
2879 2879
 	if ($action != 'editdate_shipping') {
2880
-		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>';
2880
+		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>';
2881 2881
 	}
2882 2882
 	print '</tr></table>';
2883 2883
 	print '</td><td>';
2884 2884
 	if ($action == 'editdate_shipping') {
2885
-		print '<form name="setdate_shipping" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
2886
-		print '<input type="hidden" name="token" value="' . newToken() . '">';
2885
+		print '<form name="setdate_shipping" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
2886
+		print '<input type="hidden" name="token" value="'.newToken().'">';
2887 2887
 		print '<input type="hidden" name="action" value="setdate_shipping">';
2888 2888
 		print $form->selectDate($object->date_shipping ? $object->date_shipping : -1, 'ship_', 1, 1, 0, "setdate_shipping", 1, 0);
2889
-		print '<input type="submit" class="button button-edit smallpaddingimp" value="' . $langs->trans('Modify') . '">';
2889
+		print '<input type="submit" class="button button-edit smallpaddingimp" value="'.$langs->trans('Modify').'">';
2890 2890
 		print '</form>';
2891 2891
 	} else {
2892 2892
 		print $object->date_shipping ? dol_print_date($object->date_shipping, 'dayhour') : '&nbsp;';
@@ -2900,24 +2900,24 @@  discard block
 block discarded – undo
2900 2900
 	print '</td><td>';
2901 2901
 
2902 2902
 	if ($action == 'edittrueWeight') {
2903
-		print '<form name="settrueweight" action="' . $_SERVER["PHP_SELF"] . '" method="post">';
2903
+		print '<form name="settrueweight" action="'.$_SERVER["PHP_SELF"].'" method="post">';
2904 2904
 		print '<input name="action" value="settrueWeight" type="hidden">';
2905
-		print '<input name="id" value="' . $object->id . '" type="hidden">';
2906
-		print '<input type="hidden" name="token" value="' . newToken() . '">';
2907
-		print '<input id="trueWeight" name="trueWeight" value="' . $object->trueWeight . '" type="text" class="width50 valignmiddle">';
2905
+		print '<input name="id" value="'.$object->id.'" type="hidden">';
2906
+		print '<input type="hidden" name="token" value="'.newToken().'">';
2907
+		print '<input id="trueWeight" name="trueWeight" value="'.$object->trueWeight.'" type="text" class="width50 valignmiddle">';
2908 2908
 		print $formproduct->selectMeasuringUnits("weight_units", "weight", (string) $object->weight_units, 0, 2, 'maxwidth125 valignmiddle');
2909
-		print ' <input class="button smallpaddingimp valignmiddle" name="modify" value="' . $langs->trans("Modify") . '" type="submit">';
2910
-		print ' <input class="button button-cancel smallpaddingimp valignmiddle" name="cancel" value="' . $langs->trans("Cancel") . '" type="submit">';
2909
+		print ' <input class="button smallpaddingimp valignmiddle" name="modify" value="'.$langs->trans("Modify").'" type="submit">';
2910
+		print ' <input class="button button-cancel smallpaddingimp valignmiddle" name="cancel" value="'.$langs->trans("Cancel").'" type="submit">';
2911 2911
 		print '</form>';
2912 2912
 	} else {
2913 2913
 		print $object->trueWeight;
2914
-		print ($object->trueWeight && $object->weight_units != '') ? ' ' . measuringUnitString(0, "weight", $object->weight_units) : '';
2914
+		print ($object->trueWeight && $object->weight_units != '') ? ' '.measuringUnitString(0, "weight", $object->weight_units) : '';
2915 2915
 	}
2916 2916
 
2917 2917
 	// Calculated
2918 2918
 	if ($totalWeight > 0) {
2919 2919
 		if (!empty($object->trueWeight)) {
2920
-			print ' (' . $langs->trans("SumOfProductWeights") . ': ';
2920
+			print ' ('.$langs->trans("SumOfProductWeights").': ';
2921 2921
 		}
2922 2922
 		print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, getDolGlobalInt('MAIN_WEIGHT_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_WEIGHT_DEFAULT_UNIT', 'no'));
2923 2923
 		if (!empty($object->trueWeight)) {
@@ -2927,34 +2927,34 @@  discard block
 block discarded – undo
2927 2927
 	print '</td></tr>';
2928 2928
 
2929 2929
 	// Width
2930
-	print '<tr><td>' . $form->editfieldkey("Width", 'trueWidth', $object->trueWidth, $object, $user->hasRight('expedition', 'creer')) . '</td><td>';
2930
+	print '<tr><td>'.$form->editfieldkey("Width", 'trueWidth', $object->trueWidth, $object, $user->hasRight('expedition', 'creer')).'</td><td>';
2931 2931
 	print $form->editfieldval("Width", 'trueWidth', $object->trueWidth, $object, $user->hasRight('expedition', 'creer'));
2932
-	print ($object->trueWidth && $object->width_units != '') ? ' ' . measuringUnitString(0, "size", $object->width_units) : '';
2932
+	print ($object->trueWidth && $object->width_units != '') ? ' '.measuringUnitString(0, "size", $object->width_units) : '';
2933 2933
 	print '</td></tr>';
2934 2934
 
2935 2935
 	// Height
2936
-	print '<tr><td>' . $form->editfieldkey("Height", 'trueHeight', $object->trueHeight, $object, $user->hasRight('expedition', 'creer')) . '</td><td>';
2936
+	print '<tr><td>'.$form->editfieldkey("Height", 'trueHeight', $object->trueHeight, $object, $user->hasRight('expedition', 'creer')).'</td><td>';
2937 2937
 	if ($action == 'edittrueHeight') {
2938
-		print '<form name="settrueHeight" action="' . $_SERVER["PHP_SELF"] . '" method="post">';
2938
+		print '<form name="settrueHeight" action="'.$_SERVER["PHP_SELF"].'" method="post">';
2939 2939
 		print '<input name="action" value="settrueHeight" type="hidden">';
2940
-		print '<input name="id" value="' . $object->id . '" type="hidden">';
2941
-		print '<input type="hidden" name="token" value="' . newToken() . '">';
2942
-		print '<input id="trueHeight" name="trueHeight" value="' . $object->trueHeight . '" type="text" class="width50">';
2940
+		print '<input name="id" value="'.$object->id.'" type="hidden">';
2941
+		print '<input type="hidden" name="token" value="'.newToken().'">';
2942
+		print '<input id="trueHeight" name="trueHeight" value="'.$object->trueHeight.'" type="text" class="width50">';
2943 2943
 		print $formproduct->selectMeasuringUnits("size_units", "size", $object->size_units, 0, 2);
2944
-		print ' <input class="button smallpaddingimp" name="modify" value="' . $langs->trans("Modify") . '" type="submit">';
2945
-		print ' <input class="button button-cancel smallpaddingimp" name="cancel" value="' . $langs->trans("Cancel") . '" type="submit">';
2944
+		print ' <input class="button smallpaddingimp" name="modify" value="'.$langs->trans("Modify").'" type="submit">';
2945
+		print ' <input class="button button-cancel smallpaddingimp" name="cancel" value="'.$langs->trans("Cancel").'" type="submit">';
2946 2946
 		print '</form>';
2947 2947
 	} else {
2948 2948
 		print $object->trueHeight;
2949
-		print ($object->trueHeight && $object->height_units != '') ? ' ' . measuringUnitString(0, "size", $object->height_units) : '';
2949
+		print ($object->trueHeight && $object->height_units != '') ? ' '.measuringUnitString(0, "size", $object->height_units) : '';
2950 2950
 	}
2951 2951
 
2952 2952
 	print '</td></tr>';
2953 2953
 
2954 2954
 	// Depth
2955
-	print '<tr><td>' . $form->editfieldkey("Depth", 'trueDepth', $object->trueDepth, $object, $user->hasRight('expedition', 'creer')) . '</td><td>';
2955
+	print '<tr><td>'.$form->editfieldkey("Depth", 'trueDepth', $object->trueDepth, $object, $user->hasRight('expedition', 'creer')).'</td><td>';
2956 2956
 	print $form->editfieldval("Depth", 'trueDepth', $object->trueDepth, $object, $user->hasRight('expedition', 'creer'));
2957
-	print ($object->trueDepth && $object->depth_units != '') ? ' ' . measuringUnitString(0, "size", $object->depth_units) : '';
2957
+	print ($object->trueDepth && $object->depth_units != '') ? ' '.measuringUnitString(0, "size", $object->depth_units) : '';
2958 2958
 	print '</td></tr>';
2959 2959
 
2960 2960
 	// Volume
@@ -2973,12 +2973,12 @@  discard block
 block discarded – undo
2973 2973
 		if ($volumeUnit < 50) {
2974 2974
 			print showDimensionInBestUnit($calculatedVolume, $volumeUnit, "volume", $langs, getDolGlobalInt('MAIN_VOLUME_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_VOLUME_DEFAULT_UNIT', 'no'));
2975 2975
 		} else {
2976
-			print $calculatedVolume . ' ' . measuringUnitString(0, "volume", $volumeUnit);
2976
+			print $calculatedVolume.' '.measuringUnitString(0, "volume", $volumeUnit);
2977 2977
 		}
2978 2978
 	}
2979 2979
 	if ($totalVolume > 0) {
2980 2980
 		if ($calculatedVolume) {
2981
-			print ' (' . $langs->trans("SumOfProductVolumes") . ': ';
2981
+			print ' ('.$langs->trans("SumOfProductVolumes").': ';
2982 2982
 		}
2983 2983
 		print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, getDolGlobalInt('MAIN_VOLUME_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_VOLUME_DEFAULT_UNIT', 'no'));
2984 2984
 		//if (empty($calculatedVolume)) print ' ('.$langs->trans("Calculated").')';
@@ -2991,7 +2991,7 @@  discard block
 block discarded – undo
2991 2991
 
2992 2992
 	// Other attributes
2993 2993
 	//$cols = 2;
2994
-	include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
2994
+	include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
2995 2995
 
2996 2996
 	print '</table>';
2997 2997
 
@@ -3008,33 +3008,33 @@  discard block
 block discarded – undo
3008 3008
 	print '</td>';
3009 3009
 
3010 3010
 	if ($action != 'editshipping_method_id' && $permissiontoadd) {
3011
-		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>';
3011
+		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>';
3012 3012
 	}
3013 3013
 	print '</tr></table>';
3014 3014
 	print '</td><td>';
3015 3015
 	if ($action == 'editshipping_method_id') {
3016
-		print '<form name="setshipping_method_id" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
3017
-		print '<input type="hidden" name="token" value="' . newToken() . '">';
3016
+		print '<form name="setshipping_method_id" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
3017
+		print '<input type="hidden" name="token" value="'.newToken().'">';
3018 3018
 		print '<input type="hidden" name="action" value="setshipping_method_id">';
3019 3019
 		$object->fetch_delivery_methods();
3020 3020
 		print $form->selectarray("shipping_method_id", $object->meths, $object->shipping_method_id, 1, 0, 0, "", 1);
3021 3021
 		if ($user->admin) {
3022 3022
 			print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
3023 3023
 		}
3024
-		print '<input type="submit" class="button button-edit smallpaddingimp" value="' . $langs->trans('Modify') . '">';
3024
+		print '<input type="submit" class="button button-edit smallpaddingimp" value="'.$langs->trans('Modify').'">';
3025 3025
 		print '</form>';
3026 3026
 	} else {
3027 3027
 		if ($object->shipping_method_id > 0) {
3028 3028
 			// Get code using getLabelFromKey
3029 3029
 			$code = $langs->getLabelFromKey($db, (string) $object->shipping_method_id, 'c_shipment_mode', 'rowid', 'code');
3030
-			print $langs->trans("SendingMethod" . strtoupper($code));
3030
+			print $langs->trans("SendingMethod".strtoupper($code));
3031 3031
 		}
3032 3032
 	}
3033 3033
 	print '</td>';
3034 3034
 	print '</tr>';
3035 3035
 
3036 3036
 	// Tracking Number
3037
-	print '<tr><td class="titlefieldmiddle">' . $form->editfieldkey("TrackingNumber", 'tracking_number', $object->tracking_number, $object, $user->hasRight('expedition', 'creer')) . '</td><td>';
3037
+	print '<tr><td class="titlefieldmiddle">'.$form->editfieldkey("TrackingNumber", 'tracking_number', $object->tracking_number, $object, $user->hasRight('expedition', 'creer')).'</td><td>';
3038 3038
 	print $form->editfieldval("TrackingNumber", 'tracking_number', $object->tracking_url, $object, $user->hasRight('expedition', 'creer'), 'safehtmlstring', $object->tracking_number);
3039 3039
 	print '</td></tr>';
3040 3040
 
@@ -3045,7 +3045,7 @@  discard block
 block discarded – undo
3045 3045
 		print $langs->trans('IncotermLabel');
3046 3046
 		print '<td><td class="right">';
3047 3047
 		if ($permissiontoadd) {
3048
-			print '<a class="editfielda" href="' . DOL_URL_ROOT . '/expedition/card.php?id=' . $object->id . '&action=editincoterm&token=' . newToken() . '">' . img_edit() . '</a>';
3048
+			print '<a class="editfielda" href="'.DOL_URL_ROOT.'/expedition/card.php?id='.$object->id.'&action=editincoterm&token='.newToken().'">'.img_edit().'</a>';
3049 3049
 		} else {
3050 3050
 			print '&nbsp;';
3051 3051
 		}
@@ -3055,7 +3055,7 @@  discard block
 block discarded – undo
3055 3055
 		if ($action != 'editincoterm') {
3056 3056
 			print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1);
3057 3057
 		} else {
3058
-			print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'] . '?id=' . $object->id);
3058
+			print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'].'?id='.$object->id);
3059 3059
 		}
3060 3060
 		print '</td></tr>';
3061 3061
 	}
@@ -3132,11 +3132,11 @@  discard block
 block discarded – undo
3132 3132
 	// Lines of products of origin
3133 3133
 	if (!empty($object->origin) && $object->origin_id > 0) {
3134 3134
 		if ($action == 'editline') {
3135
-			print '	<form name="updateline" id="updateline" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;lineid=' . $line_id . '" method="POST">
3136
-			<input type="hidden" name="token" value="' . newToken() . '">
3135
+			print '	<form name="updateline" id="updateline" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;lineid='.$line_id.'" method="POST">
3136
+			<input type="hidden" name="token" value="' . newToken().'">
3137 3137
 			<input type="hidden" name="action" value="updateline">
3138 3138
 			<input type="hidden" name="mode" value="">
3139
-			<input type="hidden" name="id" value="' . $object->id . '">
3139
+			<input type="hidden" name="id" value="' . $object->id.'">
3140 3140
 			';
3141 3141
 		}
3142 3142
 		print '<br>';
@@ -3150,11 +3150,11 @@  discard block
 block discarded – undo
3150 3150
 			print '<td width="5" class="center linecolnum">&nbsp;</td>';
3151 3151
 		}
3152 3152
 		// Product/Service
3153
-		print '<td  class="linecoldescription" >' . $langs->trans("Products") . '</td>';
3153
+		print '<td  class="linecoldescription" >'.$langs->trans("Products").'</td>';
3154 3154
 		// Qty
3155
-		print '<td class="center linecolqty">' . $langs->trans("QtyOrdered") . '</td>';
3155
+		print '<td class="center linecolqty">'.$langs->trans("QtyOrdered").'</td>';
3156 3156
 		if ($origin_id > 0) {
3157
-			print '<td class="center linecolqtyinothershipments">' . $langs->trans("QtyInOtherShipments") . '</td>';
3157
+			print '<td class="center linecolqtyinothershipments">'.$langs->trans("QtyInOtherShipments").'</td>';
3158 3158
 		}
3159 3159
 		if ($action == 'editline') {
3160 3160
 			$editColspan = 3;
@@ -3164,35 +3164,35 @@  discard block
 block discarded – undo
3164 3164
 			if (!isModEnabled('productbatch')) {
3165 3165
 				$editColspan--;
3166 3166
 			}
3167
-			print '<td class="center linecoleditlineotherinfo" colspan="' . $editColspan . '">';
3167
+			print '<td class="center linecoleditlineotherinfo" colspan="'.$editColspan.'">';
3168 3168
 			if ($object->status <= 1) {
3169 3169
 				print $langs->trans("QtyToShip");
3170 3170
 			} else {
3171 3171
 				print $langs->trans("QtyShipped");
3172 3172
 			}
3173 3173
 			if (isModEnabled('stock')) {
3174
-				print ' - ' . $langs->trans("WarehouseSource");
3174
+				print ' - '.$langs->trans("WarehouseSource");
3175 3175
 			}
3176 3176
 			if (isModEnabled('productbatch')) {
3177
-				print ' - ' . $langs->trans("Batch");
3177
+				print ' - '.$langs->trans("Batch");
3178 3178
 			}
3179 3179
 			print '</td>';
3180 3180
 		} else {
3181 3181
 			if ($object->status <= 1) {
3182
-				print '<td class="center linecolqtytoship">' . $langs->trans("QtyToShip") . '</td>';
3182
+				print '<td class="center linecolqtytoship">'.$langs->trans("QtyToShip").'</td>';
3183 3183
 			} else {
3184
-				print '<td class="center linecolqtyshipped">' . $langs->trans("QtyShipped") . '</td>';
3184
+				print '<td class="center linecolqtyshipped">'.$langs->trans("QtyShipped").'</td>';
3185 3185
 			}
3186 3186
 			if (isModEnabled('stock')) {
3187
-				print '<td class="left linecolwarehousesource">' . $langs->trans("WarehouseSource") . '</td>';
3187
+				print '<td class="left linecolwarehousesource">'.$langs->trans("WarehouseSource").'</td>';
3188 3188
 			}
3189 3189
 
3190 3190
 			if (isModEnabled('productbatch')) {
3191
-				print '<td class="left linecolbatch">' . $langs->trans("Batch") . '</td>';
3191
+				print '<td class="left linecolbatch">'.$langs->trans("Batch").'</td>';
3192 3192
 			}
3193 3193
 		}
3194
-		print '<td class="center linecolweight">' . $langs->trans("CalculatedWeight") . '</td>';
3195
-		print '<td class="center linecolvolume">' . $langs->trans("CalculatedVolume") . '</td>';
3194
+		print '<td class="center linecolweight">'.$langs->trans("CalculatedWeight").'</td>';
3195
+		print '<td class="center linecolvolume">'.$langs->trans("CalculatedVolume").'</td>';
3196 3196
 		//print '<td class="center">'.$langs->trans("Size").'</td>';
3197 3197
 		if ($object->status == 0) {
3198 3198
 			print '<td class="linecoledit"></td>';
@@ -3227,13 +3227,13 @@  discard block
 block discarded – undo
3227 3227
 			//if (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY')) $sql .= ", l.rowid as livraison_id, l.ref as livraison_ref, l.date_delivery, ld.qty as qty_received";
3228 3228
 			$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';
3229 3229
 			$sql .= ', p.description as product_desc';
3230
-			$sql .= " FROM " . MAIN_DB_PREFIX . "expeditiondet as ed";
3231
-			$sql .= ", " . MAIN_DB_PREFIX . "expedition as e";
3232
-			$sql .= ", " . MAIN_DB_PREFIX . $origin . "det as obj";
3230
+			$sql .= " FROM ".MAIN_DB_PREFIX."expeditiondet as ed";
3231
+			$sql .= ", ".MAIN_DB_PREFIX."expedition as e";
3232
+			$sql .= ", ".MAIN_DB_PREFIX.$origin."det as obj";
3233 3233
 			//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";
3234
-			$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON obj.fk_product = p.rowid";
3235
-			$sql .= " WHERE e.entity IN (" . getEntity('expedition') . ")";
3236
-			$sql .= " AND obj.fk_" . $origin . " = " . ((int) $origin_id);
3234
+			$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON obj.fk_product = p.rowid";
3235
+			$sql .= " WHERE e.entity IN (".getEntity('expedition').")";
3236
+			$sql .= " AND obj.fk_".$origin." = ".((int) $origin_id);
3237 3237
 			$sql .= " AND obj.rowid = ed.fk_elementdet";
3238 3238
 			$sql .= " AND ed.fk_expedition = e.rowid";
3239 3239
 			//if ($filter) $sql.= $filter;
@@ -3279,12 +3279,12 @@  discard block
 block discarded – undo
3279 3279
 			}
3280 3280
 
3281 3281
 			if (empty($reshook) && $lines[$i]->product_type != "9") {
3282
-				print '<!-- origin line id = ' . $lines[$i]->origin_line_id . ' -->'; // id of order line
3283
-				print '<tr class="oddeven" id="row-' . $lines[$i]->id . '" data-id="' . $lines[$i]->id . '" data-element="' . $lines[$i]->element . '" >';
3282
+				print '<!-- origin line id = '.$lines[$i]->origin_line_id.' -->'; // id of order line
3283
+				print '<tr class="oddeven" id="row-'.$lines[$i]->id.'" data-id="'.$lines[$i]->id.'" data-element="'.$lines[$i]->element.'" >';
3284 3284
 
3285 3285
 				// #
3286 3286
 				if (getDolGlobalString('MAIN_VIEW_LINE_NUMBER')) {
3287
-					print '<td class="center linecolnum">' . ($i + 1) . '</td>';
3287
+					print '<td class="center linecolnum">'.($i + 1).'</td>';
3288 3288
 				}
3289 3289
 
3290 3290
 				// Predefined product or service
@@ -3329,12 +3329,12 @@  discard block
 block discarded – undo
3329 3329
 					$product_static->stockable_product = $lines[$i]->stockable_product;
3330 3330
 
3331 3331
 					$text = $product_static->getNomUrl(1);
3332
-					$text .= ' - ' . $label;
3332
+					$text .= ' - '.$label;
3333 3333
 					$description = (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE') ? '' : dol_htmlentitiesbr($lines[$i]->description));
3334 3334
 					print $form->textwithtooltip($text, $description, 3, 0, '', (string) $i);
3335 3335
 					print_date_range(!empty($lines[$i]->date_start) ? $lines[$i]->date_start : '', !empty($lines[$i]->date_end) ? $lines[$i]->date_end : '');
3336 3336
 					if (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE')) {
3337
-						print (!empty($lines[$i]->description) && $lines[$i]->description != $lines[$i]->product) ? '<br>' . dol_htmlentitiesbr($lines[$i]->description) : '';
3337
+						print (!empty($lines[$i]->description) && $lines[$i]->description != $lines[$i]->product) ? '<br>'.dol_htmlentitiesbr($lines[$i]->description) : '';
3338 3338
 					}
3339 3339
 					print "</td>\n";
3340 3340
 				} else {
@@ -3346,10 +3346,10 @@  discard block
 block discarded – undo
3346 3346
 					}
3347 3347
 
3348 3348
 					if (!empty($lines[$i]->label)) {
3349
-						$text .= ' <strong>' . $lines[$i]->label . '</strong>';
3349
+						$text .= ' <strong>'.$lines[$i]->label.'</strong>';
3350 3350
 						print $form->textwithtooltip($text, $lines[$i]->description, 3, 0, '', (string) $i);
3351 3351
 					} else {
3352
-						print $text . ' ' . nl2br($lines[$i]->description);
3352
+						print $text.' '.nl2br($lines[$i]->description);
3353 3353
 					}
3354 3354
 
3355 3355
 					print_date_range($lines[$i]->date_start, $lines[$i]->date_end);
@@ -3362,7 +3362,7 @@  discard block
 block discarded – undo
3362 3362
 				}
3363 3363
 
3364 3364
 				// Qty ordered
3365
-				print '<td class="center linecolqty">' . $lines[$i]->qty_asked . ' ' . $unit_order . '</td>';
3365
+				print '<td class="center linecolqty">'.$lines[$i]->qty_asked.' '.$unit_order.'</td>';
3366 3366
 
3367 3367
 				// Qty in other shipments (with shipment and warehouse used)
3368 3368
 				if ($origin_id > 0) {
@@ -3383,8 +3383,8 @@  discard block
 block discarded – undo
3383 3383
 								}
3384 3384
 								$shipment_static->fetch($shipmentline_var['shipment_id']);
3385 3385
 								$htmltooltip .= $shipment_static->getNomUrl(1, '', 0, 0, 1);
3386
-								$htmltooltip .= ' - ' . $shipmentline_var['qty_shipped'];
3387
-								$htmltooltip .= ' - ' . $langs->trans("DateValidation") . ' : ' . (empty($shipmentline_var['date_valid']) ? $langs->trans("Draft") : dol_print_date($shipmentline_var['date_valid'], 'dayhour'));
3386
+								$htmltooltip .= ' - '.$shipmentline_var['qty_shipped'];
3387
+								$htmltooltip .= ' - '.$langs->trans("DateValidation").' : '.(empty($shipmentline_var['date_valid']) ? $langs->trans("Draft") : dol_print_date($shipmentline_var['date_valid'], 'dayhour'));
3388 3388
 								/*if (isModEnabled('stock') && $shipmentline_var['warehouse'] > 0) {
3389 3389
 									$warehousestatic->fetch($shipmentline_var['warehouse']);
3390 3390
 									$htmltext .= '<br>'.$langs->trans("FromLocation").' : '.$warehousestatic->getNomUrl(1, '', 0, 1);
@@ -3394,39 +3394,39 @@  discard block
 block discarded – undo
3394 3394
 								$qtyalreadysent += $shipmentline_var['qty_shipped'];
3395 3395
 							}
3396 3396
 							if ($j) {
3397
-								$htmltooltip = $langs->trans("QtyInOtherShipments") . '...<br><br>' . $htmltooltip . '<br><input type="submit" name="dummyhiddenbuttontogetfocus" style="display:none" autofocus>';
3397
+								$htmltooltip = $langs->trans("QtyInOtherShipments").'...<br><br>'.$htmltooltip.'<br><input type="submit" name="dummyhiddenbuttontogetfocus" style="display:none" autofocus>';
3398 3398
 							}
3399 3399
 						}
3400 3400
 					}
3401
-					print $form->textwithpicto((string) $qtyalreadysent, $htmltooltip, 1, 'info', '', 0, 3, 'tooltip' . $lines[$i]->id);
3401
+					print $form->textwithpicto((string) $qtyalreadysent, $htmltooltip, 1, 'info', '', 0, 3, 'tooltip'.$lines[$i]->id);
3402 3402
 					print '</td>';
3403 3403
 				}
3404 3404
 
3405 3405
 				if ($action == 'editline' && $lines[$i]->id == $line_id) {
3406 3406
 					// edit mode
3407
-					print '<td colspan="' . $editColspan . '" class="center"><table class="nobordernopadding centpercent">';
3407
+					print '<td colspan="'.$editColspan.'" class="center"><table class="nobordernopadding centpercent">';
3408 3408
 					if (is_array($lines[$i]->detail_batch) && count($lines[$i]->detail_batch) > 0) {
3409 3409
 						print '<!-- case edit 1 -->';
3410 3410
 						$line = new ExpeditionLigne($db);
3411 3411
 						foreach ($lines[$i]->detail_batch as $detail_batch) {
3412 3412
 							print '<tr>';
3413 3413
 							// Qty to ship or shipped
3414
-							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>';
3414
+							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>';
3415 3415
 							// Batch number management
3416 3416
 							if ($lines[$i]->entrepot_id == 0) {
3417 3417
 								// only show lot numbers from src warehouse when shipping from multiple warehouses
3418 3418
 								$line->fetch($detail_batch->fk_expeditiondet);
3419 3419
 							}
3420 3420
 							$entrepot_id = !empty($detail_batch->entrepot_id) ? $detail_batch->entrepot_id : $lines[$i]->entrepot_id;
3421
-							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>';
3421
+							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>';
3422 3422
 							print '</tr>';
3423 3423
 						}
3424 3424
 						// add a 0 qty lot row to be able to add a lot
3425 3425
 						print '<tr>';
3426 3426
 						// Qty to ship or shipped
3427
-						print '<td><input class="qtyl" name="qtyl' . $line_id . '_0" id="qtyl' . $line_id . '_0" type="text" size="4" value="0"></td>';
3427
+						print '<td><input class="qtyl" name="qtyl'.$line_id.'_0" id="qtyl'.$line_id.'_0" type="text" size="4" value="0"></td>';
3428 3428
 						// Batch number management
3429
-						print '<td>' . $formproduct->selectLotStock('', 'batchl' . $line_id . '_0', '', 1, 0, $lines[$i]->fk_product) . '</td>';
3429
+						print '<td>'.$formproduct->selectLotStock('', 'batchl'.$line_id.'_0', '', 1, 0, $lines[$i]->fk_product).'</td>';
3430 3430
 						print '</tr>';
3431 3431
 					} elseif (isModEnabled('stock')) {
3432 3432
 						if ($lines[$i]->fk_product > 0) {
@@ -3434,13 +3434,13 @@  discard block
 block discarded – undo
3434 3434
 								print '<!-- case edit 2 -->';
3435 3435
 								print '<tr>';
3436 3436
 								// Qty to ship or shipped
3437
-								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>';
3437
+								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>';
3438 3438
 								// Warehouse source
3439
-								print '<td>' . $formproduct->selectWarehouses($lines[$i]->entrepot_id, 'entl' . $line_id, '', 1, 0, $lines[$i]->fk_product, '', 1, 0, array(), 'minwidth200') . '</td>';
3439
+								print '<td>'.$formproduct->selectWarehouses($lines[$i]->entrepot_id, 'entl'.$line_id, '', 1, 0, $lines[$i]->fk_product, '', 1, 0, array(), 'minwidth200').'</td>';
3440 3440
 								// Batch number management
3441 3441
 								print '<td>';
3442 3442
 								if (isModEnabled('productbatch')) {
3443
-									print ' - ' . $langs->trans("NA");
3443
+									print ' - '.$langs->trans("NA");
3444 3444
 								}
3445 3445
 								print '</td>';
3446 3446
 								print '</tr>';
@@ -3449,13 +3449,13 @@  discard block
 block discarded – undo
3449 3449
 								foreach ($lines[$i]->details_entrepot as $detail_entrepot) {
3450 3450
 									print '<tr>';
3451 3451
 									// Qty to ship or shipped
3452
-									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>';
3452
+									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>';
3453 3453
 									// Warehouse source
3454
-									print '<td>' . $formproduct->selectWarehouses($detail_entrepot->entrepot_id, 'entl' . $detail_entrepot->line_id, '', 1, 0, $lines[$i]->fk_product, '', 1, 0, array(), 'minwidth200') . '</td>';
3454
+									print '<td>'.$formproduct->selectWarehouses($detail_entrepot->entrepot_id, 'entl'.$detail_entrepot->line_id, '', 1, 0, $lines[$i]->fk_product, '', 1, 0, array(), 'minwidth200').'</td>';
3455 3455
 									// Batch number management
3456 3456
 									print '<td>';
3457 3457
 									if (isModEnabled('productbatch')) {
3458
-										print ' - ' . $langs->trans("NA");
3458
+										print ' - '.$langs->trans("NA");
3459 3459
 									}
3460 3460
 									print '</td>';
3461 3461
 									print '</tr>';
@@ -3464,19 +3464,19 @@  discard block
 block discarded – undo
3464 3464
 								print '<!-- case edit 4 -->';
3465 3465
 								print '<tr>';
3466 3466
 								// Qty to ship or shipped
3467
-								print '<td><input class="qtyl right" name="qtyl' . $line_id . '" id="qtyl' . $line_id . '" type="text" size="4" value="' . $lines[$i]->qty_shipped . '"></td>';
3468
-								print '<td><span class="opacitymedium">(' . $langs->trans("Service") . ')</span></td>';
3467
+								print '<td><input class="qtyl right" name="qtyl'.$line_id.'" id="qtyl'.$line_id.'" type="text" size="4" value="'.$lines[$i]->qty_shipped.'"></td>';
3468
+								print '<td><span class="opacitymedium">('.$langs->trans("Service").')</span></td>';
3469 3469
 								print '<td></td>';
3470 3470
 								print '</tr>';
3471 3471
 							} else {
3472 3472
 								print '<!-- case edit 5 -->';
3473
-								print '<tr><td colspan="3">' . $langs->trans("ErrorStockIsNotEnough") . '</td></tr>';
3473
+								print '<tr><td colspan="3">'.$langs->trans("ErrorStockIsNotEnough").'</td></tr>';
3474 3474
 							}
3475 3475
 						} else {
3476 3476
 							print '<!-- case edit 6 -->';
3477 3477
 							print '<tr>';
3478 3478
 							// Qty to ship or shipped
3479
-							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>';
3479
+							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>';
3480 3480
 							// Warehouse source
3481 3481
 							print '<td></td>';
3482 3482
 							// Batch number management
@@ -3487,7 +3487,7 @@  discard block
 block discarded – undo
3487 3487
 						print '<!-- case edit 7 -->';
3488 3488
 						print '<tr>';
3489 3489
 						// Qty to ship or shipped
3490
-						print '<td><input class="qtyl right" name="qtyl' . $line_id . '" id="qtyl' . $line_id . '" type="text" size="4" value="' . $lines[$i]->qty_shipped . '"></td>';
3490
+						print '<td><input class="qtyl right" name="qtyl'.$line_id.'" id="qtyl'.$line_id.'" type="text" size="4" value="'.$lines[$i]->qty_shipped.'"></td>';
3491 3491
 						// Warehouse source
3492 3492
 						print '<td></td>';
3493 3493
 						// Batch number management
@@ -3498,13 +3498,13 @@  discard block
 block discarded – undo
3498 3498
 					print '</table></td>';
3499 3499
 				} else {
3500 3500
 					// Qty to ship or shipped
3501
-					print '<td class="linecolqtytoship center">' . $lines[$i]->qty_shipped . ' ' . $unit_order . '</td>';
3501
+					print '<td class="linecolqtytoship center">'.$lines[$i]->qty_shipped.' '.$unit_order.'</td>';
3502 3502
 
3503 3503
 					// Warehouse source
3504 3504
 					if (isModEnabled('stock')) {
3505 3505
 						print '<td class="linecolwarehousesource tdoverflowmax200">';
3506 3506
 						if ($lines[$i]->product_type == Product::TYPE_SERVICE && getDolGlobalString('SHIPMENT_SUPPORTS_SERVICES')) {
3507
-							print '<span class="opacitymedium">(' . $langs->trans("Service") . ')</span>';
3507
+							print '<span class="opacitymedium">('.$langs->trans("Service").')</span>';
3508 3508
 						} elseif ($lines[$i]->entrepot_id > 0 && $lines[$i]->stockable_product == Product::ENABLED_STOCK) {
3509 3509
 							$warehouse_id = $lines[$i]->entrepot_id;
3510 3510
 							if (!isset($conf->cache['warehouse'][$warehouse_id])) {
@@ -3527,10 +3527,10 @@  discard block
 block discarded – undo
3527 3527
 									} else {
3528 3528
 										$warehouse = $conf->cache['warehouse'][$warehouse_id];
3529 3529
 									}
3530
-									$detail .= $langs->trans("DetailWarehouseFormat", $warehouse->label, $detail_entrepot->qty_shipped) . '<br>';
3530
+									$detail .= $langs->trans("DetailWarehouseFormat", $warehouse->label, $detail_entrepot->qty_shipped).'<br>';
3531 3531
 								}
3532 3532
 							}
3533
-							print $form->textwithtooltip(img_picto('', 'object_stock') . ' ' . $langs->trans("DetailWarehouseNumber"), $detail);
3533
+							print $form->textwithtooltip(img_picto('', 'object_stock').' '.$langs->trans("DetailWarehouseNumber"), $detail);
3534 3534
 						} elseif (count($lines[$i]->detail_children ?? []) > 1) {
3535 3535
 							$detail = '';
3536 3536
 							foreach ($lines[$i]->detail_children as $child_product_id => $child_stock_list) {
@@ -3544,7 +3544,7 @@  discard block
 block discarded – undo
3544 3544
 									} else {
3545 3545
 										$child_product = $conf->cache['product'][$child_product_id];
3546 3546
 									}
3547
-									$child_product_label = $child_product->ref . ' ' . $child_product->label;
3547
+									$child_product_label = $child_product->ref.' '.$child_product->label;
3548 3548
 
3549 3549
 									// get warehouse from cache
3550 3550
 									if (!isset($conf->cache['warehouse'][$warehouse_id])) {
@@ -3554,10 +3554,10 @@  discard block
 block discarded – undo
3554 3554
 									} else {
3555 3555
 										$child_warehouse = $conf->cache['warehouse'][$warehouse_id];
3556 3556
 									}
3557
-									$detail .= $langs->trans('DetailChildrenFormat', $child_product_label, $child_warehouse->label, price2num($total_qty, 'MS')) . '<br>';
3557
+									$detail .= $langs->trans('DetailChildrenFormat', $child_product_label, $child_warehouse->label, price2num($total_qty, 'MS')).'<br>';
3558 3558
 								}
3559 3559
 							}
3560
-							print $form->textwithtooltip(img_picto('', 'object_stock') . ' ' . $langs->trans('DetailWarehouseNumber'), $detail);
3560
+							print $form->textwithtooltip(img_picto('', 'object_stock').' '.$langs->trans('DetailWarehouseNumber'), $detail);
3561 3561
 						}
3562 3562
 						print '</td>';
3563 3563
 					}
@@ -3570,17 +3570,17 @@  discard block
 block discarded – undo
3570 3570
 							if ($lines[$i]->product_tobatch) {
3571 3571
 								$detail = '';
3572 3572
 								foreach ($lines[$i]->detail_batch as $dbatch) {	// $dbatch is instance of ExpeditionLineBatch
3573
-									$detail .= $langs->trans("Batch") . ': ' . $dbatch->batch;
3573
+									$detail .= $langs->trans("Batch").': '.$dbatch->batch;
3574 3574
 									if (!getDolGlobalString('PRODUCT_DISABLE_SELLBY')) {
3575
-										$detail .= ' - ' . $langs->trans("SellByDate") . ': ' . dol_print_date($dbatch->sellby, "day");
3575
+										$detail .= ' - '.$langs->trans("SellByDate").': '.dol_print_date($dbatch->sellby, "day");
3576 3576
 									}
3577 3577
 									if (!getDolGlobalString('PRODUCT_DISABLE_EATBY')) {
3578
-										$detail .= ' - ' . $langs->trans("EatByDate") . ': ' . dol_print_date($dbatch->eatby, "day");
3578
+										$detail .= ' - '.$langs->trans("EatByDate").': '.dol_print_date($dbatch->eatby, "day");
3579 3579
 									}
3580
-									$detail .= ' - ' . $langs->trans("Qty") . ': ' . $dbatch->qty;
3580
+									$detail .= ' - '.$langs->trans("Qty").': '.$dbatch->qty;
3581 3581
 									$detail .= '<br>';
3582 3582
 								}
3583
-								print $form->textwithtooltip(img_picto('', 'object_barcode') . ' ' . $langs->trans("DetailBatchNumber"), $detail);
3583
+								print $form->textwithtooltip(img_picto('', 'object_barcode').' '.$langs->trans("DetailBatchNumber"), $detail);
3584 3584
 							} else {
3585 3585
 								print $langs->trans("NA");
3586 3586
 							}
@@ -3594,7 +3594,7 @@  discard block
 block discarded – undo
3594 3594
 				// Weight
3595 3595
 				print '<td class="center linecolweight">';
3596 3596
 				if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) {
3597
-					print $lines[$i]->weight * $lines[$i]->qty_shipped . ' ' . measuringUnitString(0, "weight", $lines[$i]->weight_units);
3597
+					print $lines[$i]->weight * $lines[$i]->qty_shipped.' '.measuringUnitString(0, "weight", $lines[$i]->weight_units);
3598 3598
 				} else {
3599 3599
 					print '&nbsp;';
3600 3600
 				}
@@ -3603,7 +3603,7 @@  discard block
 block discarded – undo
3603 3603
 				// Volume
3604 3604
 				print '<td class="center linecolvolume">';
3605 3605
 				if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) {
3606
-					print $lines[$i]->volume * $lines[$i]->qty_shipped . ' ' . measuringUnitString(0, "volume", $lines[$i]->volume_units);
3606
+					print $lines[$i]->volume * $lines[$i]->qty_shipped.' '.measuringUnitString(0, "volume", $lines[$i]->volume_units);
3607 3607
 				} else {
3608 3608
 					print '&nbsp;';
3609 3609
 				}
@@ -3614,11 +3614,11 @@  discard block
 block discarded – undo
3614 3614
 
3615 3615
 				if ($action == 'editline' && $lines[$i]->id == $line_id) {
3616 3616
 					print '<td class="center" colspan="2" valign="middle">';
3617
-					print '<input type="submit" class="button button-save" id="savelinebutton marginbottomonly" name="save" value="' . $langs->trans("Save") . '"><br>';
3618
-					print '<input type="submit" class="button button-cancel" id="cancellinebutton" name="cancel" value="' . $langs->trans("Cancel") . '"><br>';
3617
+					print '<input type="submit" class="button button-save" id="savelinebutton marginbottomonly" name="save" value="'.$langs->trans("Save").'"><br>';
3618
+					print '<input type="submit" class="button button-cancel" id="cancellinebutton" name="cancel" value="'.$langs->trans("Cancel").'"><br>';
3619 3619
 					print '</td>';
3620 3620
 				} elseif ($object->status == Expedition::STATUS_DRAFT) {
3621
-					$edit_url = $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=editline&token=' . newToken() . '&lineid=' . $lines[$i]->id;
3621
+					$edit_url = $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=editline&token='.newToken().'&lineid='.$lines[$i]->id;
3622 3622
 					if (getDolGlobalInt('PRODUIT_SOUSPRODUITS')) {
3623 3623
 						$product_id = $lines[$i]->fk_product;
3624 3624
 						if (!isset($conf->cache['product'][$product_id])) {
@@ -3630,16 +3630,16 @@  discard block
 block discarded – undo
3630 3630
 						}
3631 3631
 
3632 3632
 						if ($product->hasFatherOrChild(1)) {
3633
-							$edit_url = dol_buildpath('/expedition/dispatch.php?id=' . $object->id, 1);
3633
+							$edit_url = dol_buildpath('/expedition/dispatch.php?id='.$object->id, 1);
3634 3634
 						}
3635 3635
 					}
3636 3636
 
3637 3637
 					// edit-delete buttons
3638 3638
 					print '<td class="linecoledit center">';
3639
-					print '<a class="editfielda reposition" href="' . $edit_url . '">' . img_edit() . '</a>';
3639
+					print '<a class="editfielda reposition" href="'.$edit_url.'">'.img_edit().'</a>';
3640 3640
 					print '</td>';
3641 3641
 					print '<td class="linecoldelete" width="10">';
3642
-					print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=deleteline&token=' . newToken() . '&lineid=' . $lines[$i]->id . '">' . img_delete() . '</a>';
3642
+					print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=deleteline&token='.newToken().'&lineid='.$lines[$i]->id.'">'.img_delete().'</a>';
3643 3643
 					print '</td>';
3644 3644
 
3645 3645
 					// Display lines extrafields
@@ -3685,7 +3685,7 @@  discard block
 block discarded – undo
3685 3685
 		}
3686 3686
 		// TODO Show also lines ordered but not delivered
3687 3687
 		if (empty($num_prod)) {
3688
-			print '<tr><td colspan="8"><span class="opacitymedium">' . $langs->trans("NoLineGoOnTabToAddSome", $langs->transnoentitiesnoconv("ShipmentDistribution")) . '</span></td></tr>';
3688
+			print '<tr><td colspan="8"><span class="opacitymedium">'.$langs->trans("NoLineGoOnTabToAddSome", $langs->transnoentitiesnoconv("ShipmentDistribution")).'</span></td></tr>';
3689 3689
 		}
3690 3690
 
3691 3691
 		print "</table>\n";
@@ -3714,21 +3714,21 @@  discard block
 block discarded – undo
3714 3714
 				if ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('expedition', 'creer'))
3715 3715
 					|| (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('expedition', 'shipping_advance', 'validate'))
3716 3716
 				) {
3717
-					print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"] . '?action=valid&token=' . newToken() . '&id=' . $object->id, '');
3717
+					print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=valid&token='.newToken().'&id='.$object->id, '');
3718 3718
 				} else {
3719
-					print dolGetButtonAction($langs->trans('NotAllowed'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF'] . '#', '', false);
3719
+					print dolGetButtonAction($langs->trans('NotAllowed'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
3720 3720
 				}
3721 3721
 			}
3722 3722
 
3723 3723
 			// 0=draft, 1=validated/delivered, 2=closed/delivered
3724 3724
 			if ($object->status == Expedition::STATUS_VALIDATED && !getDolGlobalString('STOCK_CALCULATE_ON_SHIPMENT')) {
3725 3725
 				if ($user->hasRight('expedition', 'creer')) {
3726
-					print dolGetButtonAction('', $langs->trans('SetToDraft'), 'default', $_SERVER["PHP_SELF"] . '?action=setdraft&token=' . newToken() . '&id=' . $object->id, '');
3726
+					print dolGetButtonAction('', $langs->trans('SetToDraft'), 'default', $_SERVER["PHP_SELF"].'?action=setdraft&token='.newToken().'&id='.$object->id, '');
3727 3727
 				}
3728 3728
 			}
3729 3729
 			if ($object->status == Expedition::STATUS_CLOSED) {
3730 3730
 				if ($user->hasRight('expedition', 'creer')) {
3731
-					print dolGetButtonAction('', $langs->trans('ReOpen'), 'default', $_SERVER["PHP_SELF"] . '?action=reopen&token=' . newToken() . '&id=' . $object->id, '');
3731
+					print dolGetButtonAction('', $langs->trans('ReOpen'), 'default', $_SERVER["PHP_SELF"].'?action=reopen&token='.newToken().'&id='.$object->id, '');
3732 3732
 				}
3733 3733
 			}
3734 3734
 
@@ -3736,9 +3736,9 @@  discard block
 block discarded – undo
3736 3736
 			if (empty($user->socid)) {
3737 3737
 				if ($object->status > 0) {
3738 3738
 					if (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('expedition', 'shipping_advance', 'send')) {
3739
-						print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER["PHP_SELF"] . '?action=presend&token=' . newToken() . '&id=' . $object->id . '&mode=init#formmailbeforetitle', '');
3739
+						print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', '');
3740 3740
 					} else {
3741
-						print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER['PHP_SELF'] . '#', '', false);
3741
+						print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER['PHP_SELF'].'#', '', false);
3742 3742
 					}
3743 3743
 				}
3744 3744
 			}
@@ -3746,15 +3746,15 @@  discard block
 block discarded – undo
3746 3746
 			// This is just to generate a delivery receipt when option to do this is on
3747 3747
 			//var_dump($object->linkedObjectsIds['delivery']);
3748 3748
 			if (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY') && ($object->status == Expedition::STATUS_VALIDATED || $object->status == Expedition::STATUS_CLOSED) && $user->hasRight('expedition', 'delivery', 'creer') && empty($object->linkedObjectsIds['delivery'])) {
3749
-				print dolGetButtonAction('', $langs->trans('CreateDeliveryOrder'), 'default', $_SERVER["PHP_SELF"] . '?action=create_delivery&token=' . newToken() . '&id=' . $object->id, '');
3749
+				print dolGetButtonAction('', $langs->trans('CreateDeliveryOrder'), 'default', $_SERVER["PHP_SELF"].'?action=create_delivery&token='.newToken().'&id='.$object->id, '');
3750 3750
 			}
3751 3751
 
3752 3752
 			// Sign (to set to status "Signed" without using the online signature page)
3753 3753
 			if ($object->status > Expedition::STATUS_DRAFT) {
3754 3754
 				if ($object->signed_status != Expedition::$SIGNED_STATUSES['STATUS_SIGNED_ALL']) {
3755
-					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>';
3755
+					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>';
3756 3756
 				} else {
3757
-					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>';
3757
+					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>';
3758 3758
 				}
3759 3759
 			}
3760 3760
 
@@ -3762,7 +3762,7 @@  discard block
 block discarded – undo
3762 3762
 			if (isModEnabled('invoice') && ($object->status == Expedition::STATUS_VALIDATED || $object->status == Expedition::STATUS_CLOSED)) {
3763 3763
 				if ($user->hasRight('facture', 'creer')) {
3764 3764
 					if (getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT') !== '0') {
3765
-						print dolGetButtonAction('', $langs->trans('CreateBill'), 'default', DOL_URL_ROOT . '/compta/facture/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid, '');
3765
+						print dolGetButtonAction('', $langs->trans('CreateBill'), 'default', DOL_URL_ROOT.'/compta/facture/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid, '');
3766 3766
 					}
3767 3767
 				}
3768 3768
 			}
@@ -3771,22 +3771,22 @@  discard block
 block discarded – undo
3771 3771
 			if ($object->status == Expedition::STATUS_VALIDATED) {
3772 3772
 				if ($user->hasRight('expedition', 'creer') && $object->status > 0) {
3773 3773
 					if (!$object->billed && getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT') !== '0') {
3774
-						print dolGetButtonAction('', $langs->trans('ClassifyBilled'), 'default', $_SERVER["PHP_SELF"] . '?action=classifybilled&token=' . newToken() . '&id=' . $object->id, '');
3774
+						print dolGetButtonAction('', $langs->trans('ClassifyBilled'), 'default', $_SERVER["PHP_SELF"].'?action=classifybilled&token='.newToken().'&id='.$object->id, '');
3775 3775
 					}
3776
-					print dolGetButtonAction('', $langs->trans("Close"), 'default', $_SERVER["PHP_SELF"] . '?action=classifyclosed&token=' . newToken() . '&id=' . $object->id, '');
3776
+					print dolGetButtonAction('', $langs->trans("Close"), 'default', $_SERVER["PHP_SELF"].'?action=classifyclosed&token='.newToken().'&id='.$object->id, '');
3777 3777
 				}
3778 3778
 			}
3779 3779
 
3780 3780
 			// Cancel
3781 3781
 			if ($object->status == Expedition::STATUS_VALIDATED) {
3782 3782
 				if ($user->hasRight('expedition', 'creer')) {
3783
-					print dolGetButtonAction('', $langs->trans('Cancel'), 'danger', $_SERVER["PHP_SELF"] . '?action=cancel&token=' . newToken() . '&id=' . $object->id . '&mode=init#formmailbeforetitle', '');
3783
+					print dolGetButtonAction('', $langs->trans('Cancel'), 'danger', $_SERVER["PHP_SELF"].'?action=cancel&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', '');
3784 3784
 				}
3785 3785
 			}
3786 3786
 
3787 3787
 			// Delete
3788 3788
 			if ($user->hasRight('expedition', 'supprimer')) {
3789
-				print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"] . '?action=delete&token=' . newToken() . '&id=' . $object->id, '');
3789
+				print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id, '');
3790 3790
 			}
3791 3791
 		}
3792 3792
 
@@ -3802,9 +3802,9 @@  discard block
 block discarded – undo
3802 3802
 		print '<div class="fichecenter"><div class="fichehalfleft">';
3803 3803
 
3804 3804
 		$objectref = dol_sanitizeFileName($object->ref);
3805
-		$filedir = $conf->expedition->dir_output . "/sending/" . $objectref;
3805
+		$filedir = $conf->expedition->dir_output."/sending/".$objectref;
3806 3806
 
3807
-		$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
3807
+		$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
3808 3808
 
3809 3809
 		$genallowed = $user->hasRight('expedition', 'lire');
3810 3810
 		$delallowed = $user->hasRight('expedition', 'creer');
@@ -3825,20 +3825,20 @@  discard block
 block discarded – undo
3825 3825
 
3826 3826
 		if ($object->statut != Expedition::STATUS_DRAFT && $useonlinesignature) {
3827 3827
 			print '<br><!-- Link to sign -->';
3828
-			require_once DOL_DOCUMENT_ROOT . '/core/lib/signature.lib.php';
3829
-			print showOnlineSignatureUrl('expedition', $object->ref, $object) . '<br>';
3828
+			require_once DOL_DOCUMENT_ROOT.'/core/lib/signature.lib.php';
3829
+			print showOnlineSignatureUrl('expedition', $object->ref, $object).'<br>';
3830 3830
 		}
3831 3831
 
3832 3832
 		print '</div><div class="fichehalfright">';
3833 3833
 
3834 3834
 
3835 3835
 		// List of actions on element
3836
-		include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
3836
+		include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
3837 3837
 		$formactions = new FormActions($db);
3838 3838
 
3839 3839
 		//button to go to messaging from the events box
3840 3840
 		$MAXEVENT = 10;
3841
-		$morehtmlcenter = dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT . '/expedition/messaging.php?id=' . $object->id);
3841
+		$morehtmlcenter = dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT.'/expedition/messaging.php?id='.$object->id);
3842 3842
 
3843 3843
 		$somethingshown = $formactions->showactions($object, 'shipping', $socid, 1, '', $MAXEVENT, '', $morehtmlcenter);
3844 3844
 		print '</div></div>';
@@ -3857,10 +3857,10 @@  discard block
 block discarded – undo
3857 3857
 	// Presend form
3858 3858
 	$modelmail = 'shipping_send';
3859 3859
 	$defaulttopic = 'SendShippingRef';
3860
-	$diroutput = $conf->expedition->dir_output . '/sending';
3861
-	$trackid = 'shi' . $object->id;
3860
+	$diroutput = $conf->expedition->dir_output.'/sending';
3861
+	$trackid = 'shi'.$object->id;
3862 3862
 
3863
-	include DOL_DOCUMENT_ROOT . '/core/tpl/card_presend.tpl.php';
3863
+	include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
3864 3864
 }
3865 3865
 
3866 3866
 // End of page
Please login to merge, or discard this patch.