Completed
Branch develop (2e938f)
by
unknown
19:39
created
htdocs/commande/card.php 1 patch
Spacing   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -80,18 +80,18 @@  discard block
 block discarded – undo
80 80
 
81 81
 
82 82
 $id        = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('orderid'));
83
-$ref       =  GETPOST('ref', 'alpha');
84
-$socid     =  GETPOSTINT('socid');
85
-$action    =  GETPOST('action', 'aZ09');
86
-$cancel    =  GETPOST('cancel', 'alpha');
87
-$confirm   =  GETPOST('confirm', 'alpha');
83
+$ref       = GETPOST('ref', 'alpha');
84
+$socid     = GETPOSTINT('socid');
85
+$action    = GETPOST('action', 'aZ09');
86
+$cancel    = GETPOST('cancel', 'alpha');
87
+$confirm   = GETPOST('confirm', 'alpha');
88 88
 $backtopage = GETPOST('backtopage', 'alpha');
89 89
 
90
-$lineid    =  GETPOSTINT('lineid');
91
-$contactid =  GETPOSTINT('contactid');
92
-$projectid =  GETPOSTINT('projectid');
93
-$origin    =  GETPOST('origin', 'alpha');
94
-$originid  = (GETPOSTINT('originid') ? GETPOSTINT('originid') : GETPOSTINT('origin_id'));    // For backward compatibility
90
+$lineid    = GETPOSTINT('lineid');
91
+$contactid = GETPOSTINT('contactid');
92
+$projectid = GETPOSTINT('projectid');
93
+$origin    = GETPOST('origin', 'alpha');
94
+$originid  = (GETPOSTINT('originid') ? GETPOSTINT('originid') : GETPOSTINT('origin_id')); // For backward compatibility
95 95
 $rank      = (GETPOSTINT('rank') > 0) ? GETPOSTINT('rank') : -1;
96 96
 
97 97
 // PDF
@@ -116,26 +116,26 @@  discard block
 block discarded – undo
116 116
 $extrafields->fetch_name_optionals_label($object->table_element);
117 117
 
118 118
 // Load object
119
-include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php';     // Must be include, not include_once
119
+include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
120 120
 
121 121
 // Permissions / Rights
122
-$usercanread    =  $user->hasRight("commande", "lire");
123
-$usercancreate  =  $user->hasRight("commande", "creer");
124
-$usercandelete  =  $user->hasRight("commande", "supprimer");
122
+$usercanread    = $user->hasRight("commande", "lire");
123
+$usercancreate  = $user->hasRight("commande", "creer");
124
+$usercandelete  = $user->hasRight("commande", "supprimer");
125 125
 
126 126
 // Advanced permissions
127
-$usercanclose       =  ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !empty($usercancreate)) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'close')));
128
-$usercanvalidate    =  ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $usercancreate) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'validate')));
129
-$usercancancel      =  ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $usercancreate) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'annuler')));
130
-$usercansend        =   (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('commande', 'order_advance', 'send'));
131
-$usercangeneretedoc =   (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('commande', 'order_advance', 'generetedoc'));
127
+$usercanclose       = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !empty($usercancreate)) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'close')));
128
+$usercanvalidate    = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $usercancreate) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'validate')));
129
+$usercancancel      = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $usercancreate) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'annuler')));
130
+$usercansend        = (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('commande', 'order_advance', 'send'));
131
+$usercangeneretedoc = (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('commande', 'order_advance', 'generetedoc'));
132 132
 
133 133
 $usermustrespectpricemin    = ((getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !$user->hasRight('produit', 'ignore_price_min_advance')) || !getDolGlobalString('MAIN_USE_ADVANCED_PERMS'));
134 134
 $usercancreatepurchaseorder = ($user->hasRight('fournisseur', 'commande', 'creer') || $user->hasRight('supplier_order', 'creer'));
135 135
 
136
-$permissionnote    = $usercancreate;     //  Used by the include of actions_setnotes.inc.php
137
-$permissiondellink = $usercancreate;     //  Used by the include of actions_dellink.inc.php
138
-$permissiontoadd   = $usercancreate;     //  Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
136
+$permissionnote    = $usercancreate; //  Used by the include of actions_setnotes.inc.php
137
+$permissiondellink = $usercancreate; //  Used by the include of actions_dellink.inc.php
138
+$permissiontoadd   = $usercancreate; //  Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
139 139
 
140 140
 
141 141
 $error = 0;
@@ -180,11 +180,11 @@  discard block
 block discarded – undo
180 180
 		$action = '';
181 181
 	}
182 182
 
183
-	include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php';    // Must be include, not include_once
183
+	include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once
184 184
 
185
-	include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';     // Must be include, not include_once
185
+	include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once
186 186
 
187
-	include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php';  // Must be include, not include_once
187
+	include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once
188 188
 
189 189
 	// Action clone object
190 190
 	if ($action == 'confirm_clone' && $confirm == 'yes' && $usercancreate) {
@@ -682,7 +682,7 @@  discard block
 block discarded – undo
682 682
 		$remise_percent = (GETPOST('remiseforalllines') ? GETPOST('remiseforalllines') : 0);
683 683
 		$remise_percent = str_replace('*', '', $remise_percent);
684 684
 		foreach ($object->lines as $line) {
685
-			$tvatx= $line->tva_tx;
685
+			$tvatx = $line->tva_tx;
686 686
 			if (!empty($line->vat_src_code)) {
687 687
 				$tvatx .= ' ('.$line->vat_src_code.')';
688 688
 			}
@@ -703,7 +703,7 @@  discard block
 block discarded – undo
703 703
 		$pu_ht = '';
704 704
 		$pu_ttc = '';
705 705
 		$pu_ht_devise = '';
706
-		$pu_ttc_devise  = '';
706
+		$pu_ttc_devise = '';
707 707
 
708 708
 		if (GETPOST('price_ht') !== '') {
709 709
 			$price_ht = price2num(GETPOST('price_ht'), 'MU', 2);
@@ -848,8 +848,8 @@  discard block
 block discarded – undo
848 848
 						if (count($prodcustprice->lines) > 0) {
849 849
 							$pu_ht = price($prodcustprice->lines[0]->price);
850 850
 							$pu_ttc = price($prodcustprice->lines[0]->price_ttc);
851
-							$price_min =  price($prodcustprice->lines[0]->price_min);
852
-							$price_min_ttc =  price($prodcustprice->lines[0]->price_min_ttc);
851
+							$price_min = price($prodcustprice->lines[0]->price_min);
852
+							$price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc);
853 853
 							$price_base_type = $prodcustprice->lines[0]->price_base_type;
854 854
 							$tva_tx = $prodcustprice->lines[0]->tva_tx;
855 855
 							if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) {
@@ -1372,7 +1372,7 @@  discard block
 block discarded – undo
1372 1372
 					GETPOST('generate_deposit', 'alpha') == 'on' && !empty($deposit_percent_from_payment_terms)
1373 1373
 					&& isModEnabled('invoice') && $user->hasRight('facture', 'creer')
1374 1374
 				) {
1375
-					require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
1375
+					require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
1376 1376
 
1377 1377
 					$date = dol_mktime(0, 0, 0, GETPOSTINT('datefmonth'), GETPOSTINT('datefday'), GETPOSTINT('datefyear'));
1378 1378
 					$forceFields = array();
@@ -1385,7 +1385,7 @@  discard block
 block discarded – undo
1385 1385
 
1386 1386
 					if ($deposit) {
1387 1387
 						setEventMessage('DepositGenerated');
1388
-						$locationTarget = DOL_URL_ROOT . '/compta/facture/card.php?id=' . $deposit->id;
1388
+						$locationTarget = DOL_URL_ROOT.'/compta/facture/card.php?id='.$deposit->id;
1389 1389
 					} else {
1390 1390
 						$error++;
1391 1391
 						setEventMessages($object->error, $object->errors, 'errors');
@@ -1393,7 +1393,7 @@  discard block
 block discarded – undo
1393 1393
 				}
1394 1394
 
1395 1395
 				// Define output language
1396
-				if (! $error) {
1396
+				if (!$error) {
1397 1397
 					$db->commit();
1398 1398
 
1399 1399
 					if (!getDolGlobalString('MAIN_DISABLE_PDF_AUTOUPDATE')) {
@@ -1421,7 +1421,7 @@  discard block
 block discarded – undo
1421 1421
 					}
1422 1422
 
1423 1423
 					if ($locationTarget) {
1424
-						header('Location: ' . $locationTarget);
1424
+						header('Location: '.$locationTarget);
1425 1425
 						exit;
1426 1426
 					}
1427 1427
 				} else {
@@ -1844,7 +1844,7 @@  discard block
 block discarded – undo
1844 1844
 	print '<form name="crea_commande" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
1845 1845
 	print '<input type="hidden" name="token" value="'.newToken().'">';
1846 1846
 	print '<input type="hidden" name="action" value="add">';
1847
-	print '<input type="hidden" name="changecompany" value="0">';	// will be set to 1 by javascript so we know post is done after a company change
1847
+	print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change
1848 1848
 	print '<input type="hidden" name="remise_percent" value="'.$soc->remise_percent.'">';
1849 1849
 	print '<input type="hidden" name="origin" value="'.$origin.'">';
1850 1850
 	print '<input type="hidden" name="originid" value="'.$originid.'">';
@@ -1912,7 +1912,7 @@  discard block
 block discarded – undo
1912 1912
 			print "<tr><td>".$langs->trans("DefaultContact").'</td><td>';
1913 1913
 			print img_picto('', 'contact', 'class="pictofixedwidth"');
1914 1914
 			//print $form->selectcontacts($soc->id, $contactid, 'contactid', 1, empty($srccontactslist) ? "" : $srccontactslist, '', 1, 'maxwidth300 widthcentpercentminusx');
1915
-			print $form->select_contact($soc->id, $contactid, 'contactid', 1,  empty($srccontactslist) ? "" : $srccontactslist, '', 1, 'maxwidth300 widthcentpercentminusx', true);
1915
+			print $form->select_contact($soc->id, $contactid, 'contactid', 1, empty($srccontactslist) ? "" : $srccontactslist, '', 1, 'maxwidth300 widthcentpercentminusx', true);
1916 1916
 			print '</td></tr>';
1917 1917
 
1918 1918
 			// Ligne info remises tiers
@@ -2023,7 +2023,7 @@  discard block
 block discarded – undo
2023 2023
 		// Other attributes
2024 2024
 		$parameters = array();
2025 2025
 		if (!empty($origin) && !empty($originid) && is_object($objectsrc)) {
2026
-			$parameters['objectsrc'] =  $objectsrc;
2026
+			$parameters['objectsrc'] = $objectsrc;
2027 2027
 		}
2028 2028
 		$parameters['socid'] = $socid;
2029 2029
 
@@ -2240,7 +2240,7 @@  discard block
 block discarded – undo
2240 2240
 			$nbMandated = 0;
2241 2241
 			foreach ($object->lines as $line) {
2242 2242
 				$res = $line->fetch_product();
2243
-				if ($res  > 0) {
2243
+				if ($res > 0) {
2244 2244
 					if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) {
2245 2245
 						$nbMandated++;
2246 2246
 						break;
@@ -2264,7 +2264,7 @@  discard block
 block discarded – undo
2264 2264
 				$deposit_percent_from_payment_terms = (float) getDictionaryValue('c_payment_term', 'deposit_percent', $object->cond_reglement_id);
2265 2265
 
2266 2266
 				if (!empty($deposit_percent_from_payment_terms) && isModEnabled('invoice') && $user->hasRight('facture', 'creer')) {
2267
-					require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
2267
+					require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
2268 2268
 
2269 2269
 					$object->fetchObjectLinked();
2270 2270
 
@@ -2475,7 +2475,7 @@  discard block
 block discarded – undo
2475 2475
 		$morehtmlref = '<div class="refidno">';
2476 2476
 		// Ref customer
2477 2477
 		$morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string', '', 0, 1);
2478
-		$morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1);
2478
+		$morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1);
2479 2479
 		// Thirdparty
2480 2480
 		$morehtmlref .= '<br>'.$soc->getNomUrl(1, 'customer');
2481 2481
 		if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $object->thirdparty->id > 0) {
@@ -2798,36 +2798,36 @@  discard block
 block discarded – undo
2798 2798
 
2799 2799
 			$alert = '';
2800 2800
 			if (getDolGlobalString('ORDER_MANAGE_MIN_AMOUNT') && $object->total_ht < $object->thirdparty->order_min_amount) {
2801
-				$alert = ' ' . img_warning($langs->trans('OrderMinAmount') . ': ' . price($object->thirdparty->order_min_amount));
2801
+				$alert = ' '.img_warning($langs->trans('OrderMinAmount').': '.price($object->thirdparty->order_min_amount));
2802 2802
 			}
2803 2803
 
2804 2804
 			print '<tr>';
2805
-			print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>';
2806
-			print '<td class="nowrap amountcard right">' . price($object->total_ht, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
2805
+			print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>';
2806
+			print '<td class="nowrap amountcard right">'.price($object->total_ht, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
2807 2807
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2808 2808
 				// Multicurrency Amount HT
2809
-				print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
2809
+				print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
2810 2810
 			}
2811 2811
 			print '</tr>';
2812 2812
 
2813 2813
 			print '<tr>';
2814
-			print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>';
2815
-			print '<td class="nowrap amountcard right">' . price($object->total_tva, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
2814
+			print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>';
2815
+			print '<td class="nowrap amountcard right">'.price($object->total_tva, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
2816 2816
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2817 2817
 				// Multicurrency Amount VAT
2818
-				print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
2818
+				print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
2819 2819
 			}
2820 2820
 			print '</tr>';
2821 2821
 
2822 2822
 			// Amount Local Taxes
2823 2823
 			if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) {
2824 2824
 				print '<tr>';
2825
-				print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
2826
-				print '<td class="nowrap amountcard right">' . price($object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
2825
+				print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>';
2826
+				print '<td class="nowrap amountcard right">'.price($object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
2827 2827
 				if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2828 2828
 					$object->multicurrency_total_localtax1 = price2num($object->total_localtax1 * $object->multicurrency_tx, 'MT');
2829 2829
 
2830
-					print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
2830
+					print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
2831 2831
 				}
2832 2832
 				print '</tr>';
2833 2833
 			}
@@ -2835,22 +2835,22 @@  discard block
 block discarded – undo
2835 2835
 			// Amount Local Taxes
2836 2836
 			if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) {
2837 2837
 				print '<tr>';
2838
-				print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>';
2839
-				print '<td class="nowrap amountcard right">' . price($object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
2838
+				print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>';
2839
+				print '<td class="nowrap amountcard right">'.price($object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
2840 2840
 				if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2841 2841
 					$object->multicurrency_total_localtax2 = price2num($object->total_localtax2 * $object->multicurrency_tx, 'MT');
2842 2842
 
2843
-					print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
2843
+					print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
2844 2844
 				}
2845 2845
 				print '</tr>';
2846 2846
 			}
2847 2847
 
2848 2848
 			print '<tr>';
2849
-			print '<td>' . $langs->trans('AmountTTC') . '</td>';
2850
-			print '<td class="valuefield nowrap right amountcard">' . price($object->total_ttc, 1, '', 1, -1, -1, $conf->currency) . '</td>';
2849
+			print '<td>'.$langs->trans('AmountTTC').'</td>';
2850
+			print '<td class="valuefield nowrap right amountcard">'.price($object->total_ttc, 1, '', 1, -1, -1, $conf->currency).'</td>';
2851 2851
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2852 2852
 				// Multicurrency Amount TTC
2853
-				print '<td class="valuefield nowrap right amountcard">' . price($object->multicurrency_total_ttc, 1, '', 1, -1, -1, $object->multicurrency_code) . '</td>';
2853
+				print '<td class="valuefield nowrap right amountcard">'.price($object->multicurrency_total_ttc, 1, '', 1, -1, -1, $object->multicurrency_code).'</td>';
2854 2854
 			}
2855 2855
 			print '</tr>'."\n";
2856 2856
 
@@ -2967,7 +2967,7 @@  discard block
 block discarded – undo
2967 2967
 						if ($usercansend) {
2968 2968
 							print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', '');
2969 2969
 						} else {
2970
-							print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER['PHP_SELF']. '#', '', false);
2970
+							print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER['PHP_SELF'].'#', '', false);
2971 2971
 						}
2972 2972
 					}
2973 2973
 				}
@@ -2989,7 +2989,7 @@  discard block
 block discarded – undo
2989 2989
 				// Create a purchase order
2990 2990
 
2991 2991
 
2992
-				if (! getDolGlobalInt('COMMANDE_DISABLE_ADD_PURCHASE_ORDER')) {
2992
+				if (!getDolGlobalInt('COMMANDE_DISABLE_ADD_PURCHASE_ORDER')) {
2993 2993
 					$arrayforbutaction[] = array('lang' => 'orders', 'enabled' => (isModEnabled("supplier_order") && $object->statut > Commande::STATUS_DRAFT), 'perm' => $usercancreatepurchaseorder, 'label' => 'AddPurchaseOrder', 'url' => '/fourn/commande/card.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id);
2994 2994
 				}
2995 2995
 
@@ -3040,7 +3040,7 @@  discard block
 block discarded – undo
3040 3040
 						}*/
3041 3041
 					} else {
3042 3042
 						$langs->load("errors");
3043
-						print dolGetButtonAction($langs->trans('ErrorModuleSetupNotComplete'), $langs->trans('CreateShipment'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
3043
+						print dolGetButtonAction($langs->trans('ErrorModuleSetupNotComplete'), $langs->trans('CreateShipment'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
3044 3044
 					}
3045 3045
 				}
3046 3046
 
@@ -3102,7 +3102,7 @@  discard block
 block discarded – undo
3102 3102
 					if ($numshipping == 0) {
3103 3103
 						print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id, '');
3104 3104
 					} else {
3105
-						print dolGetButtonAction($langs->trans('ShippingExist'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
3105
+						print dolGetButtonAction($langs->trans('ShippingExist'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
3106 3106
 					}
3107 3107
 				}
3108 3108
 			}
Please login to merge, or discard this patch.