Completed
Branch develop (c7ab7c)
by
unknown
26:46
created
htdocs/bookcal/lib/bookcal_calendar.lib.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -38,13 +38,13 @@  discard block
 block discarded – undo
38 38
 	$h = 0;
39 39
 	$head = array();
40 40
 
41
-	$head[$h][0] = DOL_URL_ROOT . '/bookcal/calendar_card.php?id=' . $object->id;
41
+	$head[$h][0] = DOL_URL_ROOT.'/bookcal/calendar_card.php?id='.$object->id;
42 42
 	$head[$h][1] = $langs->trans("Calendar");
43 43
 	$head[$h][2] = 'card';
44 44
 	$h++;
45 45
 
46 46
 	//if ($object->status == Calendar::STATUS_VALIDATED) {
47
-		$head[$h][0] = DOL_URL_ROOT . '/bookcal/booking_list.php?id=' . $object->id;
47
+		$head[$h][0] = DOL_URL_ROOT.'/bookcal/booking_list.php?id='.$object->id;
48 48
 		$head[$h][1] = $langs->trans("Bookings");
49 49
 		$head[$h][2] = 'booking';
50 50
 		$h++;
@@ -63,10 +63,10 @@  discard block
 block discarded – undo
63 63
 		if (!empty($object->note_public)) {
64 64
 			$nbNote++;
65 65
 		}
66
-		$head[$h][0] = DOL_URL_ROOT . '/bookcal/calendar_note.php?id=' . $object->id;
66
+		$head[$h][0] = DOL_URL_ROOT.'/bookcal/calendar_note.php?id='.$object->id;
67 67
 		$head[$h][1] = $langs->trans('Notes');
68 68
 		if ($nbNote > 0) {
69
-			$head[$h][1] .= (!getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER') ? '<span class="badge marginleftonlyshort">' . $nbNote . '</span>' : '');
69
+			$head[$h][1] .= (!getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER') ? '<span class="badge marginleftonlyshort">'.$nbNote.'</span>' : '');
70 70
 		}
71 71
 		$head[$h][2] = 'note';
72 72
 		$h++;
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	// $head[$h][2] = 'document';
86 86
 	// $h++;
87 87
 
88
-	$head[$h][0] = DOL_URL_ROOT . '/bookcal/calendar_agenda.php?id=' . $object->id;
88
+	$head[$h][0] = DOL_URL_ROOT.'/bookcal/calendar_agenda.php?id='.$object->id;
89 89
 	$head[$h][1] = $langs->trans("Events");
90 90
 	$head[$h][2] = 'agenda';
91 91
 	$h++;
Please login to merge, or discard this patch.
htdocs/bookcal/class/availabilities.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -789,7 +789,7 @@
 block discarded – undo
789 789
 		$return .= img_picto('', $this->picto);
790 790
 		$return .= '</span>';
791 791
 		$return .= '<div class="info-box-content">';
792
-		$return .= '<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">' . $this->getNomUrl() . '</span>';
792
+		$return .= '<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.$this->getNomUrl().'</span>';
793 793
 		if ($selected >= 0) {
794 794
 			$return .= '<input id="cb'.$this->id.'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>';
795 795
 		}
Please login to merge, or discard this patch.
htdocs/bookcal/calendar_card.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,14 +46,14 @@  discard block
 block discarded – undo
46 46
 // Get parameters
47 47
 $id = GETPOSTINT('id');
48 48
 $ref = GETPOST('ref', 'alpha');
49
-$lineid   = GETPOSTINT('lineid');
49
+$lineid = GETPOSTINT('lineid');
50 50
 
51 51
 $action = GETPOST('action', 'aZ09');
52 52
 $confirm = GETPOST('confirm', 'alpha');
53 53
 $cancel = GETPOST('cancel', 'aZ09');
54 54
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search
55
-$backtopage = GETPOST('backtopage', 'alpha');					// if not set, a default page will be used
56
-$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');	// if not set, $backtopage will be used
55
+$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used
56
+$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used
57 57
 $dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09');
58 58
 
59 59
 // Initialize a technical objects
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 // Load object
84 84
 include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'.
85 85
 
86
-$object->entity	= ((GETPOSTISSET('entity') && GETPOST('entity') != '') ? GETPOSTINT('entity') : $conf->entity);
86
+$object->entity = ((GETPOSTISSET('entity') && GETPOST('entity') != '') ? GETPOSTINT('entity') : $conf->entity);
87 87
 
88 88
 // There is several ways to check permission.
89 89
 // Set $enablepermissioncheck to 1 to enable a minimum low level of checks
Please login to merge, or discard this patch.
htdocs/projet/card.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
 $permissiontoadd = $user->hasRight('projet', 'creer');
116 116
 $permissiontodelete = $user->hasRight('projet', 'supprimer');
117
-$permissiondellink = $user->hasRight('projet', 'creer');	// Used by the include of actions_dellink.inc.php
117
+$permissiondellink = $user->hasRight('projet', 'creer'); // Used by the include of actions_dellink.inc.php
118 118
 $permissiontoeditextra = $permissiontoadd;
119 119
 
120 120
 if (GETPOST('attribute', 'aZ09') && isset($extrafields->attributes[$object->table_element]['perms'][GETPOST('attribute', 'aZ09')])) {
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 		$action = '';
174 174
 	}
175 175
 
176
-	include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';		// Must be 'include', not 'include_once'
176
+	include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once'
177 177
 
178 178
 	// Action setdraft object
179 179
 	if ($action == 'confirm_setdraft' && $confirm == 'yes' && $permissiontoadd) {
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 		$action = '';
188 188
 
189 189
 		// For backward compatibility
190
-		$object->statut = $object::STATUS_DRAFT;	// this is already set for $object->status by $object->setStatut()
190
+		$object->statut = $object::STATUS_DRAFT; // this is already set for $object->status by $object->setStatut()
191 191
 	}
192 192
 
193 193
 	// Action add
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 		$db->begin();
318 318
 		$old_start_date = 0;
319 319
 		if (!$error) {
320
-			$object->oldcopy = clone $object;  // @phan-suppress-current-line PhanTypeMismatchProperty
320
+			$object->oldcopy = clone $object; // @phan-suppress-current-line PhanTypeMismatchProperty
321 321
 
322 322
 			$old_start_date = $object->date_start;
323 323
 
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
 			$object->date_end_event   = (!GETPOST('date_end_event')) ? '' : $date_end_event;
335 335
 			$object->location     = $location;
336 336
 			if (GETPOSTISSET('opp_amount')) {
337
-				$object->opp_amount   = price2num(GETPOST('opp_amount', 'alpha'));
337
+				$object->opp_amount = price2num(GETPOST('opp_amount', 'alpha'));
338 338
 			}
339 339
 			if (GETPOSTISSET('budget_amount')) {
340 340
 				$object->budget_amount = price2num(GETPOST('budget_amount', 'alpha'));
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
 			if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) {
553 553
 				$tmpurl = $_SESSION['pageforbacktolist']['project'];
554 554
 				$tmpurl = preg_replace('/__SOCID__/', (string) $object->socid, $tmpurl);
555
-				$urlback = $tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1';
555
+				$urlback = $tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?').'restore_lastsearch_values=1';
556 556
 			} else {
557 557
 				$urlback = DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1';
558 558
 			}
@@ -591,7 +591,7 @@  discard block
 block discarded – undo
591 591
 
592 592
 	// Quick edit for extrafields
593 593
 	if ($action == 'update_extras' && $permissiontoeditextra) {
594
-		$object->oldcopy = dol_clone($object, 2);  // @phan-suppress-current-line PhanTypeMismatchProperty
594
+		$object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty
595 595
 
596 596
 		$attribute_name = GETPOST('attribute', 'aZ09');
597 597
 
@@ -1022,7 +1022,7 @@  discard block
 block discarded – undo
1022 1022
 	$userDelete = $object->restrictedProjectArea($user, 'delete');
1023 1023
 	//print "userAccess=".$userAccess." userWrite=".$userWrite." userDelete=".$userDelete;
1024 1024
 
1025
-	$formconfirm = "" ;
1025
+	$formconfirm = "";
1026 1026
 
1027 1027
 	// Confirmation validation
1028 1028
 	if ($action == 'validate') {
@@ -1160,7 +1160,7 @@  discard block
 block discarded – undo
1160 1160
 				print '<br>';
1161 1161
 			}
1162 1162
 			if (!getDolGlobalString('PROJECT_HIDE_TASKS')) {
1163
-				print '<input type="checkbox" id="usage_task" name="usage_task"' . (GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')) . '> ';
1163
+				print '<input type="checkbox" id="usage_task" name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')).'> ';
1164 1164
 				$htmltext = $langs->trans("ProjectFollowTasks");
1165 1165
 				print '<label for="usage_task">'.$form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext).'</label>';
1166 1166
 				print '<script>';
@@ -1186,7 +1186,7 @@  discard block
 block discarded – undo
1186 1186
 				print '<br>';
1187 1187
 			}
1188 1188
 			if (!getDolGlobalString('PROJECT_HIDE_TASKS') && getDolGlobalString('PROJECT_BILL_TIME_SPENT')) {
1189
-				print '<input type="checkbox" id="usage_bill_time" name="usage_bill_time"' . (GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')) . '> ';
1189
+				print '<input type="checkbox" id="usage_bill_time" name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')).'> ';
1190 1190
 				$htmltext = $langs->trans("ProjectBillTimeDescription");
1191 1191
 				print '<label for="usage_bill_time">'.$form->textwithpicto($langs->trans("BillTime"), $htmltext).'</label>';
1192 1192
 				print '<script>';
@@ -1212,7 +1212,7 @@  discard block
 block discarded – undo
1212 1212
 				print '<br>';
1213 1213
 			}
1214 1214
 			if (isModEnabled('eventorganization')) {
1215
-				print '<input type="checkbox" id="usage_organize_event" name="usage_organize_event"'. (GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')) . '> ';
1215
+				print '<input type="checkbox" id="usage_organize_event" name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')).'> ';
1216 1216
 				$htmltext = $langs->trans("EventOrganizationDescriptionLong");
1217 1217
 				print '<label for="usage_organize_event">'.$form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext).'</label>';
1218 1218
 				print '<script>';
@@ -1384,7 +1384,7 @@  discard block
 block discarded – undo
1384 1384
 		if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) {
1385 1385
 			$tmpurl = $_SESSION['pageforbacktolist']['project'];
1386 1386
 			$tmpurl = preg_replace('/__SOCID__/', (string) $object->socid, $tmpurl);
1387
-			$linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
1387
+			$linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?').'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
1388 1388
 		} else {
1389 1389
 			$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
1390 1390
 		}
@@ -1461,8 +1461,8 @@  discard block
 block discarded – undo
1461 1461
 				print '<a class="editfielda paddingtop" href="'.$_SERVER["PHP_SELF"].'?action=edit_opp_status&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'</a>';
1462 1462
 			}
1463 1463
 			print '</td><td>';
1464
-			$html_name_status 	= ($action == 'edit_opp_status') ? 'opp_status' : 'none';
1465
-			$html_name_percent 	= ($action == 'edit_opp_status') ? 'opp_percent' : 'none';
1464
+			$html_name_status = ($action == 'edit_opp_status') ? 'opp_status' : 'none';
1465
+			$html_name_percent = ($action == 'edit_opp_status') ? 'opp_percent' : 'none';
1466 1466
 			$percent_value = (GETPOSTISSET('opp_percent') ? GETPOSTINT('opp_percent') : (strcmp($object->opp_percent, '') ? vatrate($object->opp_percent) : ''));
1467 1467
 			$formproject->formOpportunityStatus($_SERVER['PHP_SELF'].'?socid='.$object->id, (string) $object->opp_status, $percent_value, $html_name_status, $html_name_percent);
1468 1468
 			print '</td></tr>';
@@ -1689,7 +1689,7 @@  discard block
 block discarded – undo
1689 1689
 					if ($userWrite > 0) {
1690 1690
 						print dolGetButtonAction('', $langs->trans('SetToDraft'), 'default', $_SERVER["PHP_SELF"].'?action=confirm_setdraft&amp;confirm=yes&amp;token='.newToken().'&amp;id='.$object->id, '');
1691 1691
 					} else {
1692
-						print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('SetToDraft'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
1692
+						print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('SetToDraft'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
1693 1693
 					}
1694 1694
 				}
1695 1695
 			}
@@ -1699,7 +1699,7 @@  discard block
 block discarded – undo
1699 1699
 				if ($userWrite > 0) {
1700 1700
 					print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'&id='.$object->id, '');
1701 1701
 				} else {
1702
-					print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Modify'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
1702
+					print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Modify'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
1703 1703
 				}
1704 1704
 			}
1705 1705
 
@@ -1709,7 +1709,7 @@  discard block
 block discarded – undo
1709 1709
 					//print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=validate&token='.newToken().'&id='.$object->id, '');
1710 1710
 					print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=confirm_validate&confirm=yes&token='.newToken().'&id='.$object->id, '');
1711 1711
 				} else {
1712
-					print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
1712
+					print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
1713 1713
 				}
1714 1714
 			}
1715 1715
 
@@ -1719,7 +1719,7 @@  discard block
 block discarded – undo
1719 1719
 					//print dolGetButtonAction('', $langs->trans('Close'), 'default', $_SERVER["PHP_SELF"].'?action=close&amp;token='.newToken().'&amp;id='.$object->id, '');
1720 1720
 					print dolGetButtonAction('', $langs->trans('Close'), 'default', $_SERVER["PHP_SELF"].'?action=confirm_close&confirm=yes&token='.newToken().'&id='.$object->id, '');
1721 1721
 				} else {
1722
-					print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Close'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
1722
+					print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Close'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
1723 1723
 				}
1724 1724
 			}
1725 1725
 
@@ -1728,7 +1728,7 @@  discard block
 block discarded – undo
1728 1728
 				if ($userWrite > 0) {
1729 1729
 					print dolGetButtonAction('', $langs->trans('ReOpen'), 'default', $_SERVER["PHP_SELF"].'?action=reopen&amp;token='.newToken().'&amp;id='.$object->id, '');
1730 1730
 				} else {
1731
-					print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('ReOpen'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
1731
+					print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('ReOpen'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
1732 1732
 				}
1733 1733
 			}
1734 1734
 
@@ -1737,7 +1737,7 @@  discard block
 block discarded – undo
1737 1737
 			if (!getDolGlobalString('PROJECT_HIDE_CREATE_OBJECT_BUTTON')) {
1738 1738
 				// We check the type of thirdparty
1739 1739
 				$is_customer_or_prospect = (!empty($object->thirdparty->prospect) || !empty($object->thirdparty->client));
1740
-				$is_supplier_only= (!empty($object->thirdparty->fournisseur) && !$is_customer_or_prospect);
1740
+				$is_supplier_only = (!empty($object->thirdparty->fournisseur) && !$is_customer_or_prospect);
1741 1741
 
1742 1742
 				$arrayforbutaction = array(
1743 1743
 					10 => array('lang'=>'propal', 'enabled' => (isModEnabled("propal") && $is_customer_or_prospect), 'perm' => $user->hasRight('propal', 'creer') ? true : false, 'label' => 'AddProp', 'url'=>'/comm/propal/card.php?action=create&amp;projectid='.$object->id.'&amp;socid='.$object->socid),
@@ -1763,7 +1763,7 @@  discard block
 block discarded – undo
1763 1763
 				if ($userWrite > 0) {
1764 1764
 					print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER["PHP_SELF"].'?action=clone&token='.newToken().'&id='.((int) $object->id), '');
1765 1765
 				} else {
1766
-					print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
1766
+					print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
1767 1767
 				}
1768 1768
 			}
1769 1769
 
@@ -1772,7 +1772,7 @@  discard block
 block discarded – undo
1772 1772
 				if ($userDelete > 0 || ($object->status == Project::STATUS_DRAFT && $user->hasRight('projet', 'creer'))) {
1773 1773
 					print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id, '');
1774 1774
 				} else {
1775
-					print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
1775
+					print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
1776 1776
 				}
1777 1777
 			}
1778 1778
 		}
Please login to merge, or discard this patch.
htdocs/admin/propal.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
 $action = GETPOST('action', 'aZ09');
58 58
 $value = GETPOST('value', 'alpha');
59
-$modulepart = GETPOST('modulepart', 'aZ09');	// Used by actions_setmoduleoptions.inc.php
59
+$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
60 60
 
61 61
 $label = GETPOST('label', 'alpha');
62 62
 $scandir = GETPOST('scan_dir', 'alpha');
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 		setEventMessages($langs->trans('Error'), null, 'errors');
219 219
 	} else {
220 220
 		setEventMessages($langs->trans('SetupSaved'), null, 'mesgs');
221
-		header("Location: " . $_SERVER["PHP_SELF"]);
221
+		header("Location: ".$_SERVER["PHP_SELF"]);
222 222
 		exit();
223 223
 	}
224 224
 } elseif (preg_match('/del_(.*)/', $action, $reg)) {
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 		setEventMessages($langs->trans('Error'), null, 'errors');
234 234
 	} else {
235 235
 		setEventMessages($langs->trans('SetupSaved'), null, 'mesgs');
236
-		header("Location: " . $_SERVER["PHP_SELF"]);
236
+		header("Location: ".$_SERVER["PHP_SELF"]);
237 237
 		exit();
238 238
 	}
239 239
 }
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
 								print(empty($module->name) ? $name : $module->name);
442 442
 								print "</td><td>\n";
443 443
 								if (method_exists($module, 'info')) {
444
-									print $module->info($langs);  // @phan-suppress-current-line PhanUndeclaredMethod
444
+									print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
445 445
 								} else {
446 446
 									print $module->description;
447 447
 								}
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
 print '<tr class="oddeven">';
636 636
 print '<td>'.$langs->trans("DefaultProposalDurationValidity").'</td>';
637 637
 print '<td>';
638
-print "<input size=\"3\" class=\"flat\" type=\"text\" name=\"PROPALE_VALIDITY_DURATION\" value=\"" . getDolGlobalString('PROPALE_VALIDITY_DURATION')."\"></td>";
638
+print "<input size=\"3\" class=\"flat\" type=\"text\" name=\"PROPALE_VALIDITY_DURATION\" value=\"".getDolGlobalString('PROPALE_VALIDITY_DURATION')."\"></td>";
639 639
 print '</tr>';
640 640
 
641 641
 $substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2);
Please login to merge, or discard this patch.
htdocs/admin/supplier_order.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
 $type = GETPOST('type', 'alpha');
55 55
 $value = GETPOST('value', 'alpha');
56
-$modulepart = GETPOST('modulepart', 'aZ09');	// Used by actions_setmoduleoptions.inc.php
56
+$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
57 57
 
58 58
 $label = GETPOST('label', 'alpha');
59 59
 $scandir = GETPOST('scan_dir', 'alpha');
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 					$module = new $classname($db, $specimenthirdparty);
405 405
 					'@phan-var-force ModelePDFSuppliersOrders $module';
406 406
 					if (method_exists($module, 'info')) {
407
-						print $module->info($langs);  // @phan-suppress-current-line PhanUndeclaredMethod
407
+						print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
408 408
 					} else {
409 409
 						print $module->description;
410 410
 					}
@@ -532,8 +532,8 @@  discard block
 block discarded – undo
532 532
 
533 533
 
534 534
 // Disallow to classify billed a supplier order without invoice
535
-print '<tr class="oddeven"><td>'.$langs->trans("SupplierOrderClassifyBilledWithoutInvoice"). '&nbsp;' ;
536
-print $form->textwithpicto('', $langs->trans("SupplierOrderClassifyBilledWithoutInvoiceHelp"), 1, 'help') . '</td>';
535
+print '<tr class="oddeven"><td>'.$langs->trans("SupplierOrderClassifyBilledWithoutInvoice").'&nbsp;';
536
+print $form->textwithpicto('', $langs->trans("SupplierOrderClassifyBilledWithoutInvoiceHelp"), 1, 'help').'</td>';
537 537
 print '<td colspan="2">';
538 538
 print ajax_constantonoff('SUPPLIER_ORDER_DISABLE_CLASSIFY_BILLED_FROM_SUPPLIER_ORDER');
539 539
 print '</td></tr>';
Please login to merge, or discard this patch.
htdocs/comm/propal/card.php 1 patch
Spacing   +263 added lines, -263 removed lines patch added patch discarded remove patch
@@ -44,24 +44,24 @@  discard block
 block discarded – undo
44 44
 // Load Dolibarr environment
45 45
 require '../../main.inc.php';
46 46
 require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
47
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
48
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php';
49
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formpropal.class.php';
50
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formmargin.class.php';
51
-require_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php';
52
-require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php';
53
-require_once DOL_DOCUMENT_ROOT . '/core/modules/propale/modules_propale.php';
54
-require_once DOL_DOCUMENT_ROOT . '/core/lib/propal.lib.php';
55
-require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
56
-require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php';
57
-require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
47
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
48
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
49
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formpropal.class.php';
50
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmargin.class.php';
51
+require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
52
+require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
53
+require_once DOL_DOCUMENT_ROOT.'/core/modules/propale/modules_propale.php';
54
+require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php';
55
+require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
56
+require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
57
+require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
58 58
 if (isModEnabled('project')) {
59
-	require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
60
-	require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php';
59
+	require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
60
+	require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
61 61
 }
62 62
 
63 63
 if (isModEnabled('variants')) {
64
-	require_once DOL_DOCUMENT_ROOT . '/variants/class/ProductCombination.class.php';
64
+	require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination.class.php';
65 65
 }
66 66
 
67 67
 /**
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 $cancel = GETPOST('cancel', 'alpha');
94 94
 $origin = GETPOST('origin', 'alpha');
95 95
 $originid = GETPOSTINT('originid');
96
-$renewal = GETPOST('renewal');	// for contract renewal
96
+$renewal = GETPOST('renewal'); // for contract renewal
97 97
 $confirm = GETPOST('confirm', 'alpha');
98 98
 $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
99 99
 $lineid = GETPOSTINT('lineid');
@@ -178,34 +178,34 @@  discard block
 block discarded – undo
178 178
 	setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
179 179
 }
180 180
 if (empty($reshook)) {
181
-	$backurlforlist = DOL_URL_ROOT . '/comm/propal/list.php';
181
+	$backurlforlist = DOL_URL_ROOT.'/comm/propal/list.php';
182 182
 
183 183
 	if (empty($backtopage) || ($cancel && empty($id))) {
184 184
 		if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
185 185
 			if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) {
186 186
 				$backtopage = $backurlforlist;
187 187
 			} else {
188
-				$backtopage = DOL_URL_ROOT . '/comm/propal/card.php?id=' . ((!empty($id) && $id > 0) ? $id : '__ID__');
188
+				$backtopage = DOL_URL_ROOT.'/comm/propal/card.php?id='.((!empty($id) && $id > 0) ? $id : '__ID__');
189 189
 			}
190 190
 		}
191 191
 	}
192 192
 
193 193
 	if ($cancel) {
194 194
 		if (!empty($backtopageforcancel)) {
195
-			header("Location: " . $backtopageforcancel);
195
+			header("Location: ".$backtopageforcancel);
196 196
 			exit;
197 197
 		} elseif (!empty($backtopage)) {
198
-			header("Location: " . $backtopage);
198
+			header("Location: ".$backtopage);
199 199
 			exit;
200 200
 		}
201 201
 		$action = '';
202 202
 	}
203 203
 
204
-	include DOL_DOCUMENT_ROOT . '/core/actions_setnotes.inc.php'; // Must be include, not includ_once
204
+	include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once
205 205
 
206
-	include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once'
206
+	include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once'
207 207
 
208
-	include DOL_DOCUMENT_ROOT . '/core/actions_lineupdown.inc.php'; // Must be 'include', not 'include_once'
208
+	include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be 'include', not 'include_once'
209 209
 	// Action clone object
210 210
 	if ($action == 'confirm_clone' && $confirm == 'yes' && $usercancreate) {
211 211
 		if (!($socid > 0)) {
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 							$object->delivery_date = $date_delivery;
240 240
 							foreach ($object->lines as $line) {
241 241
 								if (isset($line->date_start)) {
242
-									$line->date_start +=  $difference;
242
+									$line->date_start += $difference;
243 243
 								}
244 244
 								if (isset($line->date_end)) {
245 245
 									$line->date_end += $difference;
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 						setEventMessages('', $warningMsgLineList, 'warnings');
268 268
 					}
269 269
 
270
-					header("Location: " . $_SERVER['PHP_SELF'] . '?id=' . $result);
270
+					header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result);
271 271
 					exit();
272 272
 				} else {
273 273
 					if (count($object->errors) > 0) {
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 		// Cancel proposal
282 282
 		$result = $object->setCancel($user);
283 283
 		if ($result > 0) {
284
-			header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
284
+			header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
285 285
 			exit();
286 286
 		} else {
287 287
 			$langs->load("errors");
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 		// Delete proposal
292 292
 		$result = $object->delete($user);
293 293
 		if ($result > 0) {
294
-			header('Location: ' . DOL_URL_ROOT . '/comm/propal/list.php?restore_lastsearch_values=1');
294
+			header('Location: '.DOL_URL_ROOT.'/comm/propal/list.php?restore_lastsearch_values=1');
295 295
 			exit();
296 296
 		} else {
297 297
 			$langs->load("errors");
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
 			$object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
324 324
 		}
325 325
 
326
-		header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
326
+		header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
327 327
 		exit();
328 328
 	} elseif ($action == 'confirm_delete_subtotalline' && $confirm == 'yes' && $usercancreate) {
329 329
 		// Delete line
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
 				$result = $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
354 354
 			}
355 355
 			if ($result >= 0) {
356
-				header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id);
356
+				header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
357 357
 				exit();
358 358
 			}
359 359
 		} else {
@@ -625,14 +625,14 @@  discard block
 block discarded – undo
625 625
 
626 626
 					$id = $object->create($user);
627 627
 					if ($id > 0) {
628
-						dol_include_once('/' . $element . '/class/' . $subelement . '.class.php');
628
+						dol_include_once('/'.$element.'/class/'.$subelement.'.class.php');
629 629
 
630 630
 						$classname = ucfirst($subelement);
631 631
 						$srcobject = new $classname($db);
632
-						'@phan-var-force Commande|Propal|Contrat|Fichinter|Expedition $srcobject';  // Can be other class, but CommonObject is too generic
632
+						'@phan-var-force Commande|Propal|Contrat|Fichinter|Expedition $srcobject'; // Can be other class, but CommonObject is too generic
633 633
 						/** @var Commande|Propal|Contrat|Fichinter|Expedition $srcobject */
634 634
 
635
-						dol_syslog("Try to find source object origin=" . $object->origin . " originid=" . $object->origin_id . " to add lines");
635
+						dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines");
636 636
 						$result = $srcobject->fetch($object->origin_id);
637 637
 
638 638
 						if ($result > 0) {
@@ -697,7 +697,7 @@  discard block
 block discarded – undo
697 697
 
698 698
 								$tva_tx = $lines[$i]->tva_tx;
699 699
 								if (!empty($lines[$i]->vat_src_code) && !preg_match('/\(/', $tva_tx)) {
700
-									$tva_tx .= ' (' . $lines[$i]->vat_src_code . ')';
700
+									$tva_tx .= ' ('.$lines[$i]->vat_src_code.')';
701 701
 								}
702 702
 
703 703
 								$result = $object->addline($desc, $lines[$i]->subprice, $lines[$i]->qty, $tva_tx, $lines[$i]->localtax1_tx, $lines[$i]->localtax2_tx, $lines[$i]->fk_product, $lines[$i]->remise_percent, 'HT', 0, $lines[$i]->info_bits, $product_type, $lines[$i]->rang, $lines[$i]->special_code, $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, $label, $date_start, $date_end, $array_options, $lines[$i]->fk_unit);
@@ -787,7 +787,7 @@  discard block
 block discarded – undo
787 787
 							}
788 788
 						}
789 789
 
790
-						header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id);
790
+						header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
791 791
 						exit();
792 792
 					} else {
793 793
 						$db->rollback();
@@ -835,7 +835,7 @@  discard block
 block discarded – undo
835 835
 					$error++;
836 836
 				} else {
837 837
 					// Needed if object linked modified by trigger (because linked objects can't be fetched two times : linkedObjectsFullLoaded)
838
-					$locationTarget = DOL_URL_ROOT . '/comm/propal/card.php?id=' . $object->id;
838
+					$locationTarget = DOL_URL_ROOT.'/comm/propal/card.php?id='.$object->id;
839 839
 				}
840 840
 
841 841
 				$deposit = null;
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
846 846
 					!$error && GETPOSTINT('statut') == $object::STATUS_SIGNED && GETPOST('generate_deposit') == 'on'
847 847
 					&& !empty($deposit_percent_from_payment_terms) && isModEnabled('invoice') && $user->hasRight('facture', 'creer')
848 848
 				) {
849
-					require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
849
+					require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
850 850
 
851 851
 					$date = dol_mktime(0, 0, 0, GETPOSTINT('datefmonth'), GETPOSTINT('datefday'), GETPOSTINT('datefyear'));
852 852
 					$forceFields = array();
@@ -859,10 +859,10 @@  discard block
 block discarded – undo
859 859
 
860 860
 					if ($deposit) {
861 861
 						setEventMessage('DepositGenerated');
862
-						$locationTarget = DOL_URL_ROOT . '/compta/facture/card.php?id=' . $deposit->id;
862
+						$locationTarget = DOL_URL_ROOT.'/compta/facture/card.php?id='.$deposit->id;
863 863
 					} else {
864 864
 						$error++;
865
-						setEventMessages("Failed to create down payment - " . $object->error, $object->errors, 'errors');
865
+						setEventMessages("Failed to create down payment - ".$object->error, $object->errors, 'errors');
866 866
 					}
867 867
 				}
868 868
 
@@ -887,12 +887,12 @@  discard block
 block discarded – undo
887 887
 					}
888 888
 
889 889
 					if ($locationTarget) {
890
-						header('Location: ' . $locationTarget);
890
+						header('Location: '.$locationTarget);
891 891
 						exit;
892 892
 					}
893 893
 				} else {
894 894
 					$object->status = $oldstatus;
895
-					$object->statut = $oldstatus;	// deprecated
895
+					$object->statut = $oldstatus; // deprecated
896 896
 
897 897
 					$db->rollback();
898 898
 					$action = '';
@@ -911,7 +911,7 @@  discard block
 block discarded – undo
911 911
 				setEventMessages($object->error, $object->errors, 'errors');
912 912
 				$error++;
913 913
 			} else {
914
-				$object->statut = $newstatus;	// deprecated
914
+				$object->statut = $newstatus; // deprecated
915 915
 				$object->status = $newstatus;
916 916
 			}
917 917
 
@@ -929,13 +929,13 @@  discard block
 block discarded – undo
929 929
 
930 930
 		if (!empty($importLines) && is_array($importLines) && !empty($fromElement) && ctype_alpha($fromElement) && !empty($fromElementid)) {
931 931
 			if ($fromElement == 'commande') {
932
-				dol_include_once('/' . $fromElement . '/class/' . $fromElement . '.class.php');
932
+				dol_include_once('/'.$fromElement.'/class/'.$fromElement.'.class.php');
933 933
 				$lineClassName = 'OrderLine';
934 934
 			} elseif ($fromElement == 'propal') {
935
-				dol_include_once('/comm/' . $fromElement . '/class/' . $fromElement . '.class.php');
935
+				dol_include_once('/comm/'.$fromElement.'/class/'.$fromElement.'.class.php');
936 936
 				$lineClassName = 'PropaleLigne';
937 937
 			} elseif ($fromElement == 'facture') {
938
-				dol_include_once('/compta/' . $fromElement . '/class/' . $fromElement . '.class.php');
938
+				dol_include_once('/compta/'.$fromElement.'/class/'.$fromElement.'.class.php');
939 939
 				$lineClassName = 'FactureLigne';
940 940
 			} else {
941 941
 				$lineClassName = null;
@@ -1002,14 +1002,14 @@  discard block
 block discarded – undo
1002 1002
 		$object->updateSubtotalLineBlockLines($langs, $object->getRangOfLine($lineid), 'discount', $discount);
1003 1003
 	}
1004 1004
 
1005
-	include DOL_DOCUMENT_ROOT . '/core/actions_printing.inc.php';
1005
+	include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
1006 1006
 
1007 1007
 	// Actions to send emails
1008 1008
 	$actiontypecode = 'AC_OTH_AUTO';
1009 1009
 	$triggersendname = 'PROPAL_SENTBYMAIL';
1010 1010
 	$autocopy = 'MAIN_MAIL_AUTOCOPY_PROPOSAL_TO';
1011
-	$trackid = 'pro' . $object->id;
1012
-	include DOL_DOCUMENT_ROOT . '/core/actions_sendmails.inc.php';
1011
+	$trackid = 'pro'.$object->id;
1012
+	include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
1013 1013
 
1014 1014
 
1015 1015
 	// Go back to draft
@@ -1078,7 +1078,7 @@  discard block
 block discarded – undo
1078 1078
 			}
1079 1079
 			$tvatx = $line->tva_tx;
1080 1080
 			if (!empty($line->vat_src_code)) {
1081
-				$tvatx .= ' (' . $line->vat_src_code . ')';
1081
+				$tvatx .= ' ('.$line->vat_src_code.')';
1082 1082
 			}
1083 1083
 			$result = $object->updateline($line->id, $line->subprice, $line->qty, (float) $remise_percent, $tvatx, $line->localtax1_tx, $line->localtax2_tx, $line->desc, 'HT', $line->info_bits, $line->special_code, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->product_type, $line->date_start, $line->date_end, $line->array_options, $line->fk_unit, $line->multicurrency_subprice);
1084 1084
 			$object->lines[$key] = $object->line;
@@ -1096,7 +1096,7 @@  discard block
 block discarded – undo
1096 1096
 			if ($prod->price_min > $subprice) {
1097 1097
 				$price_subprice  = price($subprice, 0, $outlangs, 1, -1, -1, 'auto');
1098 1098
 				$price_price_min = price($prod->price_min, 0, $outlangs, 1, -1, -1, 'auto');
1099
-				setEventMessages($prod->ref . ' - ' . $prod->label . ' (' . $price_subprice . ' < ' . $price_price_min . ' ' . strtolower($langs->trans("MinPrice")) . ')' . "\n", null, 'warnings');
1099
+				setEventMessages($prod->ref.' - '.$prod->label.' ('.$price_subprice.' < '.$price_price_min.' '.strtolower($langs->trans("MinPrice")).')'."\n", null, 'warnings');
1100 1100
 			}
1101 1101
 			// Manage $line->subprice and $line->multicurrency_subprice
1102 1102
 			if ($line->subprice <> 0) {
@@ -1166,7 +1166,7 @@  discard block
 block discarded – undo
1166 1166
 		} else {
1167 1167
 			setEventMessages($object->error, $object->errors, 'errors');
1168 1168
 		}
1169
-		header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id);
1169
+		header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
1170 1170
 		exit();
1171 1171
 	} elseif ($action == 'confirm_addsubtotalline' && $usercancreate) {
1172 1172
 		// Handling adding a new subtotal line for subtotals module
@@ -1218,7 +1218,7 @@  discard block
 block discarded – undo
1218 1218
 		} else {
1219 1219
 			setEventMessages($object->error, $object->errors, 'errors');
1220 1220
 		}
1221
-		header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id);
1221
+		header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
1222 1222
 		exit();
1223 1223
 	} elseif ($action == 'addline' && !GETPOST('submitforalllines', 'alpha') && !GETPOST('submitforallmargins', 'alpha') && !GETPOST('markforalllines', 'alpha') && $usercancreate) {
1224 1224
 		// Add line
@@ -1260,8 +1260,8 @@  discard block
 block discarded – undo
1260 1260
 
1261 1261
 		$tva_tx = GETPOST('tva_tx', 'alpha');
1262 1262
 
1263
-		$qty = price2num(GETPOST('qty' . $predef, 'alpha'), 'MS', 2);
1264
-		$remise_percent = (GETPOSTISSET('remise_percent' . $predef) ? price2num(GETPOST('remise_percent' . $predef, 'alpha'), '', 2) : 0);
1263
+		$qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS', 2);
1264
+		$remise_percent = (GETPOSTISSET('remise_percent'.$predef) ? price2num(GETPOST('remise_percent'.$predef, 'alpha'), '', 2) : 0);
1265 1265
 		if (empty($remise_percent)) {
1266 1266
 			$remise_percent = 0;
1267 1267
 		}
@@ -1273,7 +1273,7 @@  discard block
 block discarded – undo
1273 1273
 		if (is_array($extralabelsline)) {
1274 1274
 			// Get extra fields
1275 1275
 			foreach ($extralabelsline as $key => $value) {
1276
-				unset($_POST["options_" . $key]);
1276
+				unset($_POST["options_".$key]);
1277 1277
 			}
1278 1278
 		}
1279 1279
 
@@ -1345,7 +1345,7 @@  discard block
 block discarded – undo
1345 1345
 
1346 1346
 				if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) {
1347 1347
 					// If price per customer
1348
-					require_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php';
1348
+					require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php';
1349 1349
 					$prodcustprice = new ProductCustomerPrice($db);
1350 1350
 					$filter = array('t.fk_product' => (string) $prod->id, 't.fk_soc' => (string) $object->thirdparty->id);
1351 1351
 
@@ -1409,7 +1409,7 @@  discard block
 block discarded – undo
1409 1409
 					}
1410 1410
 				} elseif (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) {
1411 1411
 					// If price per customer
1412
-					require_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php';
1412
+					require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php';
1413 1413
 
1414 1414
 					$prodcustprice = new ProductCustomerPrice($db);
1415 1415
 
@@ -1556,23 +1556,23 @@  discard block
 block discarded – undo
1556 1556
 							$outputlangs->load('products');
1557 1557
 						}
1558 1558
 						if (!empty($prod->customcode)) {
1559
-							$tmptxt .= $outputlangs->transnoentitiesnoconv("CustomsCode") . ': ' . $prod->customcode;
1559
+							$tmptxt .= $outputlangs->transnoentitiesnoconv("CustomsCode").': '.$prod->customcode;
1560 1560
 						}
1561 1561
 						if (!empty($prod->customcode) && !empty($prod->country_code)) {
1562 1562
 							$tmptxt .= ' - ';
1563 1563
 						}
1564 1564
 						if (!empty($prod->country_code)) {
1565
-							$tmptxt .= $outputlangs->transnoentitiesnoconv("CountryOrigin") . ': ' . getCountry($prod->country_code, '', $db, $outputlangs, 0);
1565
+							$tmptxt .= $outputlangs->transnoentitiesnoconv("CountryOrigin").': '.getCountry($prod->country_code, '', $db, $outputlangs, 0);
1566 1566
 						}
1567 1567
 					} else {
1568 1568
 						if (!empty($prod->customcode)) {
1569
-							$tmptxt .= $langs->transnoentitiesnoconv("CustomsCode") . ': ' . $prod->customcode;
1569
+							$tmptxt .= $langs->transnoentitiesnoconv("CustomsCode").': '.$prod->customcode;
1570 1570
 						}
1571 1571
 						if (!empty($prod->customcode) && !empty($prod->country_code)) {
1572 1572
 							$tmptxt .= ' - ';
1573 1573
 						}
1574 1574
 						if (!empty($prod->country_code)) {
1575
-							$tmptxt .= $langs->transnoentitiesnoconv("CountryOrigin") . ': ' . getCountry($prod->country_code, '', $db, $langs, 0);
1575
+							$tmptxt .= $langs->transnoentitiesnoconv("CountryOrigin").': '.getCountry($prod->country_code, '', $db, $langs, 0);
1576 1576
 						}
1577 1577
 					}
1578 1578
 					$tmptxt .= ')';
@@ -1611,11 +1611,11 @@  discard block
 block discarded – undo
1611 1611
 			$localtax2_tx = get_localtax($tva_tx, 2, $object->thirdparty, $mysoc, $tva_npr);
1612 1612
 
1613 1613
 			// Margin
1614
-			$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
1615
-			$buyingprice = price2num((GETPOST('buying_price' . $predef) != '' ? GETPOST('buying_price' . $predef) : ''), '', 2); // If buying_price is '0', we must keep this value
1614
+			$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
1615
+			$buyingprice = price2num((GETPOST('buying_price'.$predef) != '' ? GETPOST('buying_price'.$predef) : ''), '', 2); // If buying_price is '0', we must keep this value
1616 1616
 
1617
-			$date_start = dol_mktime(GETPOSTINT('date_start' . $predef . 'hour'), GETPOSTINT('date_start' . $predef . 'min'), GETPOSTINT('date_start' . $predef . 'sec'), GETPOSTINT('date_start' . $predef . 'month'), GETPOSTINT('date_start' . $predef . 'day'), GETPOSTINT('date_start' . $predef . 'year'));
1618
-			$date_end = dol_mktime(GETPOSTINT('date_end' . $predef . 'hour'), GETPOSTINT('date_end' . $predef . 'min'), GETPOSTINT('date_end' . $predef . 'sec'), GETPOSTINT('date_end' . $predef . 'month'), GETPOSTINT('date_end' . $predef . 'day'), GETPOSTINT('date_end' . $predef . 'year'));
1617
+			$date_start = dol_mktime(GETPOSTINT('date_start'.$predef.'hour'), GETPOSTINT('date_start'.$predef.'min'), GETPOSTINT('date_start'.$predef.'sec'), GETPOSTINT('date_start'.$predef.'month'), GETPOSTINT('date_start'.$predef.'day'), GETPOSTINT('date_start'.$predef.'year'));
1618
+			$date_end = dol_mktime(GETPOSTINT('date_end'.$predef.'hour'), GETPOSTINT('date_end'.$predef.'min'), GETPOSTINT('date_end'.$predef.'sec'), GETPOSTINT('date_end'.$predef.'month'), GETPOSTINT('date_end'.$predef.'day'), GETPOSTINT('date_end'.$predef.'year'));
1619 1619
 
1620 1620
 			// Prepare a price equivalent for minimum price check
1621 1621
 			$pu_equivalent = $pu_ht;
@@ -1746,7 +1746,7 @@  discard block
 block discarded – undo
1746 1746
 				if ($prod->price_min > $line->subprice) {
1747 1747
 					$price_subprice = price($line->subprice, 0, $outlangs, 1, -1, -1, 'auto');
1748 1748
 					$price_price_min = price($prod->price_min, 0, $outlangs, 1, -1, -1, 'auto');
1749
-					setEventMessages($prod->ref . ' - ' . $prod->label . ' (' . $price_subprice . ' < ' . $price_price_min . ' ' . strtolower($langs->trans("MinPrice")) . ')' . "\n", null, 'warnings');
1749
+					setEventMessages($prod->ref.' - '.$prod->label.' ('.$price_subprice.' < '.$price_price_min.' '.strtolower($langs->trans("MinPrice")).')'."\n", null, 'warnings');
1750 1750
 				} else {
1751 1751
 					setEventMessages($prod->error, $prod->errors, 'errors');
1752 1752
 				}
@@ -1884,7 +1884,7 @@  discard block
 block discarded – undo
1884 1884
 		$pu_ttc = price2num(GETPOST('price_ttc'), '', 2);
1885 1885
 
1886 1886
 		// Add buying price
1887
-		$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
1887
+		$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
1888 1888
 		$buyingprice = price2num((GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''), '', 2); // If buying_price is '0', we must keep this value
1889 1889
 
1890 1890
 		$pu_ht_devise = price2num(GETPOST('multicurrency_subprice'), '', 2);
@@ -1931,7 +1931,7 @@  discard block
 block discarded – undo
1931 1931
 		if (is_array($extralabelsline)) {
1932 1932
 			// Get extra fields
1933 1933
 			foreach ($extralabelsline as $key => $value) {
1934
-				unset($_POST["options_" . $key]);
1934
+				unset($_POST["options_".$key]);
1935 1935
 			}
1936 1936
 		}
1937 1937
 
@@ -2063,7 +2063,7 @@  discard block
 block discarded – undo
2063 2063
 			}
2064 2064
 		}
2065 2065
 	} elseif ($action == 'updateline' && $usercancreate && GETPOST('cancel', 'alpha')) {
2066
-		header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); //  To re-display card in edit mode
2066
+		header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); //  To re-display card in edit mode
2067 2067
 		exit();
2068 2068
 	} elseif ($action == 'classin' && $usercancreate) {
2069 2069
 		// Set project
@@ -2077,8 +2077,8 @@  discard block
 block discarded – undo
2077 2077
 	} elseif ($action == 'setconditions' && $usercancreate) {
2078 2078
 		// Terms of payment
2079 2079
 		$sql = "SELECT code ";
2080
-		$sql .= "FROM " . $db->prefix() . "c_payment_term";
2081
-		$sql .= " WHERE rowid = " . ((int) GETPOST('cond_reglement_id', 'int'));
2080
+		$sql .= "FROM ".$db->prefix()."c_payment_term";
2081
+		$sql .= " WHERE rowid = ".((int) GETPOST('cond_reglement_id', 'int'));
2082 2082
 		$result = $db->query($sql);
2083 2083
 		if ($result) {
2084 2084
 			$obj = $db->fetch_object($result);
@@ -2143,7 +2143,7 @@  discard block
 block discarded – undo
2143 2143
 			}
2144 2144
 
2145 2145
 			if ($result >= 0) {
2146
-				header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id);
2146
+				header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
2147 2147
 				exit();
2148 2148
 			} else {
2149 2149
 				if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
@@ -2166,7 +2166,7 @@  discard block
 block discarded – undo
2166 2166
 			$result = $object->delete_contact($lineid);
2167 2167
 
2168 2168
 			if ($result >= 0) {
2169
-				header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id);
2169
+				header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
2170 2170
 				exit();
2171 2171
 			} else {
2172 2172
 				dol_print_error($db);
@@ -2177,7 +2177,7 @@  discard block
 block discarded – undo
2177 2177
 	// Actions to build doc
2178 2178
 	$upload_dir = !empty($conf->propal->multidir_output[$object->entity ?? $conf->entity]) ? $conf->propal->multidir_output[$object->entity ?? $conf->entity] : $conf->propal->dir_output;
2179 2179
 	$permissiontoadd = $usercancreate;
2180
-	include DOL_DOCUMENT_ROOT . '/core/actions_builddoc.inc.php';
2180
+	include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
2181 2181
 }
2182 2182
 
2183 2183
 
@@ -2194,7 +2194,7 @@  discard block
 block discarded – undo
2194 2194
 	$formproject = new FormProjets($db);
2195 2195
 }
2196 2196
 
2197
-$title = $object->ref . " - " . $langs->trans('Card');
2197
+$title = $object->ref." - ".$langs->trans('Card');
2198 2198
 if ($action == 'create') {
2199 2199
 	$title = $langs->trans("NewPropal");
2200 2200
 }
@@ -2260,11 +2260,11 @@  discard block
 block discarded – undo
2260 2260
 				$element = $subelement = 'expedition';
2261 2261
 			}
2262 2262
 
2263
-			dol_include_once('/' . $element . '/class/' . $subelement . '.class.php');
2263
+			dol_include_once('/'.$element.'/class/'.$subelement.'.class.php');
2264 2264
 
2265 2265
 			$classname = ucfirst($subelement);
2266 2266
 			$objectsrc = new $classname($db);
2267
-			'@phan-var-force Commande|Propal|Contrat|Expedition $objectsrc';  // Can be other class, but CommonObject is too generic
2267
+			'@phan-var-force Commande|Propal|Contrat|Expedition $objectsrc'; // Can be other class, but CommonObject is too generic
2268 2268
 			/** @var Commande|Propal|Contrat|Expedition $objectsrc */
2269 2269
 			$objectsrc->fetch($originid);
2270 2270
 			if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) {
@@ -2340,19 +2340,19 @@  discard block
 block discarded – undo
2340 2340
 		}
2341 2341
 	}
2342 2342
 
2343
-	print '<form name="addprop" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
2344
-	print '<input type="hidden" name="token" value="' . newToken() . '">';
2343
+	print '<form name="addprop" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
2344
+	print '<input type="hidden" name="token" value="'.newToken().'">';
2345 2345
 	print '<input type="hidden" name="action" value="add">';
2346
-	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
2347
-	print '<input type="hidden" name="backtopage" value="' . $backtopage . '">';
2346
+	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
2347
+	print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
2348 2348
 	if ($origin != 'project' && $originid) {
2349
-		print '<input type="hidden" name="origin" value="' . $origin . '">';
2350
-		print '<input type="hidden" name="originid" value="' . $originid . '">';
2349
+		print '<input type="hidden" name="origin" value="'.$origin.'">';
2350
+		print '<input type="hidden" name="originid" value="'.$originid.'">';
2351 2351
 		if ($origin == 'contrat' && !empty($renewal)) {
2352
-			print '<input type="hidden" name="renewal" value="' . $renewal . '">';
2352
+			print '<input type="hidden" name="renewal" value="'.$renewal.'">';
2353 2353
 		}
2354 2354
 	} elseif ($origin == 'project' && !empty($projectid)) {
2355
-		print '<input type="hidden" name="projectid" value="' . $projectid . '">';
2355
+		print '<input type="hidden" name="projectid" value="'.$projectid.'">';
2356 2356
 	}
2357 2357
 
2358 2358
 	print dol_get_fiche_head();
@@ -2365,22 +2365,22 @@  discard block
 block discarded – undo
2365 2365
 		print '<table class="border centpercent">';
2366 2366
 
2367 2367
 		// Reference
2368
-		print '<tr class="field_ref"><td class="titlefieldcreate fieldrequired">' . $langs->trans('Ref') . '</td><td class="valuefieldcreate">' . $langs->trans("Draft") . '</td></tr>';
2368
+		print '<tr class="field_ref"><td class="titlefieldcreate fieldrequired">'.$langs->trans('Ref').'</td><td class="valuefieldcreate">'.$langs->trans("Draft").'</td></tr>';
2369 2369
 
2370 2370
 		// Ref customer
2371
-		print '<tr class="field_ref_client"><td class="titlefieldcreate">' . $langs->trans('RefCustomer') . '</td><td class="valuefieldcreate">';
2372
-		print '<input type="text" name="ref_client" value="' . (!empty($ref_client) ? $ref_client : GETPOST('ref_client')) . '"></td>';
2371
+		print '<tr class="field_ref_client"><td class="titlefieldcreate">'.$langs->trans('RefCustomer').'</td><td class="valuefieldcreate">';
2372
+		print '<input type="text" name="ref_client" value="'.(!empty($ref_client) ? $ref_client : GETPOST('ref_client')).'"></td>';
2373 2373
 		print '</tr>';
2374 2374
 
2375 2375
 		// Third party
2376 2376
 		print '<tr class="field_socid">';
2377
-		print '<td class="titlefieldcreate fieldrequired">' . $langs->trans('Customer') . '</td>';
2377
+		print '<td class="titlefieldcreate fieldrequired">'.$langs->trans('Customer').'</td>';
2378 2378
 		$shipping_method_id = 0;
2379 2379
 		$warehouse_id = 0;
2380 2380
 		if ($socid > 0) {
2381 2381
 			print '<td class="valuefieldcreate">';
2382 2382
 			print $soc->getNomUrl(1, 'customer');
2383
-			print '<input type="hidden" name="socid" value="' . $soc->id . '">';
2383
+			print '<input type="hidden" name="socid" value="'.$soc->id.'">';
2384 2384
 			print '</td>';
2385 2385
 			if (getDolGlobalString('SOCIETE_ASK_FOR_SHIPPING_METHOD') && !empty($soc->shipping_method_id)) {
2386 2386
 				$shipping_method_id = $soc->shipping_method_id;
@@ -2389,7 +2389,7 @@  discard block
 block discarded – undo
2389 2389
 		} else {
2390 2390
 			print '<td class="valuefieldcreate">';
2391 2391
 			$filter = '((s.client:IN:1,2,3) AND (s.status:=:1))';
2392
-			print img_picto('', 'company', 'class="pictofixedwidth"') . $form->select_company('', 'socid', $filter, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth300 maxwidth500 widthcentpercentminusxx');
2392
+			print img_picto('', 'company', 'class="pictofixedwidth"').$form->select_company('', 'socid', $filter, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth300 maxwidth500 widthcentpercentminusxx');
2393 2393
 			// reload page to retrieve customer information
2394 2394
 			if (!getDolGlobalString('RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED')) {
2395 2395
 				print '<script>
@@ -2405,63 +2405,63 @@  discard block
 block discarded – undo
2405 2405
 				});
2406 2406
 				</script>';
2407 2407
 			}
2408
-			print ' <a href="' . DOL_URL_ROOT . '/societe/card.php?action=create&prospect=3&fournisseur=0&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?action=create') . '"><span class="fa fa-plus-circle valignmiddle paddingleft" title="' . $langs->trans("AddThirdParty") . '"></span></a>';
2408
+			print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&prospect=3&fournisseur=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddThirdParty").'"></span></a>';
2409 2409
 			print '</td>';
2410 2410
 		}
2411
-		print '</tr>' . "\n";
2411
+		print '</tr>'."\n";
2412 2412
 
2413 2413
 		if ($socid > 0) {
2414 2414
 			// Contacts (ask contact only if thirdparty already defined).
2415
-			print '<tr class="field_contactid"><td class="titlefieldcreate">' . $langs->trans("DefaultContact") . '</td><td class="valuefieldcreate">';
2415
+			print '<tr class="field_contactid"><td class="titlefieldcreate">'.$langs->trans("DefaultContact").'</td><td class="valuefieldcreate">';
2416 2416
 			print img_picto('', 'contact', 'class="pictofixedwidth"');
2417 2417
 			//print $form->selectcontacts($soc->id, $contactid, 'contactid', 1, '', '', 0, 'minwidth300 widthcentpercentminusx');
2418 2418
 			print $form->select_contact($soc->id, $contactid, 'contactid', 1, '', '', 1, 'maxwidth300 widthcentpercentminusx', true);
2419 2419
 			print '</td></tr>';
2420 2420
 
2421 2421
 			// Third party discounts info line
2422
-			print '<tr class="field_discount_info"><td class="titlefieldcreate">' . $langs->trans('Discounts') . '</td><td class="valuefieldcreate">';
2422
+			print '<tr class="field_discount_info"><td class="titlefieldcreate">'.$langs->trans('Discounts').'</td><td class="valuefieldcreate">';
2423 2423
 
2424 2424
 			$absolute_discount = $soc->getAvailableDiscounts();
2425 2425
 
2426 2426
 			$thirdparty = $soc;
2427 2427
 			$discount_type = 0;
2428
-			$backtopage = $_SERVER["PHP_SELF"] . '?socid=' . $thirdparty->id . '&action=' . $action . '&origin=' . urlencode((string) (GETPOST('origin'))) . '&originid=' . urlencode((string) (GETPOSTINT('originid')));
2429
-			include DOL_DOCUMENT_ROOT . '/core/tpl/object_discounts.tpl.php';
2428
+			$backtopage = $_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.urlencode((string) (GETPOST('origin'))).'&originid='.urlencode((string) (GETPOSTINT('originid')));
2429
+			include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php';
2430 2430
 			print '</td></tr>';
2431 2431
 		}
2432 2432
 
2433 2433
 		$newdatepropal = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver');
2434 2434
 		// Date
2435
-		print '<tr class="field_addprop"><td class="titlefieldcreate fieldrequired">' . $langs->trans('DatePropal') . '</td><td class="valuefieldcreate">';
2435
+		print '<tr class="field_addprop"><td class="titlefieldcreate fieldrequired">'.$langs->trans('DatePropal').'</td><td class="valuefieldcreate">';
2436 2436
 		print img_picto('', 'action', 'class="pictofixedwidth"');
2437 2437
 		print $form->selectDate($newdatepropal ? $newdatepropal : $datepropal, '', 0, 0, 0, "addprop", 1, 1);
2438 2438
 		print '</td></tr>';
2439 2439
 
2440 2440
 		// Validaty duration
2441
-		print '<tr class="field_duree_validitee"><td class="titlefieldcreate fieldrequired">' . $langs->trans("ValidityDuration") . '</td><td class="valuefieldcreate">' . img_picto('', 'clock', 'class="pictofixedwidth"') . '<input name="duree_validite" class="width50" value="' . (GETPOSTISSET('duree_validite') ? GETPOST('duree_validite', 'alphanohtml') : getDolGlobalString('PROPALE_VALIDITY_DURATION')) . '"> ' . $langs->trans("days") . '</td></tr>';
2441
+		print '<tr class="field_duree_validitee"><td class="titlefieldcreate fieldrequired">'.$langs->trans("ValidityDuration").'</td><td class="valuefieldcreate">'.img_picto('', 'clock', 'class="pictofixedwidth"').'<input name="duree_validite" class="width50" value="'.(GETPOSTISSET('duree_validite') ? GETPOST('duree_validite', 'alphanohtml') : getDolGlobalString('PROPALE_VALIDITY_DURATION')).'"> '.$langs->trans("days").'</td></tr>';
2442 2442
 
2443 2443
 		// Terms of payment
2444
-		print '<tr class="field_cond_reglement_id"><td class="nowrap">' . $langs->trans('PaymentConditionsShort') . '</td><td>';
2444
+		print '<tr class="field_cond_reglement_id"><td class="nowrap">'.$langs->trans('PaymentConditionsShort').'</td><td>';
2445 2445
 		print img_picto('', 'payment', 'class="pictofixedwidth"');
2446 2446
 		// at last resort we take the payment term id which may be filled by default values set (if not getpostisset)
2447 2447
 		print $form->getSelectConditionsPaiements((int) $cond_reglement_id, 'cond_reglement_id', 1, 1, 0, '', $deposit_percent);
2448 2448
 		print '</td></tr>';
2449 2449
 
2450 2450
 		// Mode of payment
2451
-		print '<tr class="field_mode_reglement_id"><td class="titlefieldcreate">' . $langs->trans('PaymentMode') . '</td><td class="valuefieldcreate">';
2451
+		print '<tr class="field_mode_reglement_id"><td class="titlefieldcreate">'.$langs->trans('PaymentMode').'</td><td class="valuefieldcreate">';
2452 2452
 		print img_picto('', 'bank', 'class="pictofixedwidth"');
2453 2453
 		print $form->select_types_paiements((string) $mode_reglement_id, 'mode_reglement_id', 'CRDT', 0, 1, 0, 0, 1, 'maxwidth200 widthcentpercentminusx', 1);
2454 2454
 		print '</td></tr>';
2455 2455
 
2456 2456
 		// Bank Account
2457 2457
 		if (getDolGlobalString('BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL') && isModEnabled("bank")) {
2458
-			print '<tr class="field_fk_account"><td class="titlefieldcreate">' . $langs->trans('BankAccount') . '</td><td class="valuefieldcreate">';
2459
-			print img_picto('', 'bank_account', 'class="pictofixedwidth"') . $form->select_comptes((int) $fk_account, 'fk_account', 0, '', 1, '', 0, 'maxwidth200 widthcentpercentminusx', 1);
2458
+			print '<tr class="field_fk_account"><td class="titlefieldcreate">'.$langs->trans('BankAccount').'</td><td class="valuefieldcreate">';
2459
+			print img_picto('', 'bank_account', 'class="pictofixedwidth"').$form->select_comptes((int) $fk_account, 'fk_account', 0, '', 1, '', 0, 'maxwidth200 widthcentpercentminusx', 1);
2460 2460
 			print '</td></tr>';
2461 2461
 		}
2462 2462
 
2463 2463
 		// Source / Channel - What trigger creation
2464
-		print '<tr class="field_demand_reason_id"><td class="titlefieldcreate">' . $langs->trans('Source') . '</td><td class="valuefieldcreate">';
2464
+		print '<tr class="field_demand_reason_id"><td class="titlefieldcreate">'.$langs->trans('Source').'</td><td class="valuefieldcreate">';
2465 2465
 		print img_picto('', 'question', 'class="pictofixedwidth"');
2466 2466
 		$form->selectInputReason((GETPOSTISSET('demand_reason_id') ? GETPOSTINT('demand_reason_id') : ''), 'demand_reason_id', "SRC_PROP", 1, 'maxwidth200 widthcentpercentminusx');
2467 2467
 		print '</td></tr>';
@@ -2471,7 +2471,7 @@  discard block
 block discarded – undo
2471 2471
 			if (getDolGlobalString('SOCIETE_ASK_FOR_SHIPPING_METHOD') && !empty($soc->shipping_method_id)) {
2472 2472
 				$shipping_method_id = $soc->shipping_method_id;
2473 2473
 			}
2474
-			print '<tr class="field_shipping_method_id"><td class="titlefieldcreate">' . $langs->trans('SendingMethod') . '</td><td class="valuefieldcreate">';
2474
+			print '<tr class="field_shipping_method_id"><td class="titlefieldcreate">'.$langs->trans('SendingMethod').'</td><td class="valuefieldcreate">';
2475 2475
 			print img_picto('', 'dolly', 'class="pictofixedwidth"');
2476 2476
 			$form->selectShippingMethod((string) (GETPOSTISSET('shipping_method_id') ? GETPOSTINT('shipping_method_id') : $shipping_method_id), 'shipping_method_id', '', 1, '', 0, 'maxwidth200 widthcentpercentminusx');
2477 2477
 			print '</td></tr>';
@@ -2480,17 +2480,17 @@  discard block
 block discarded – undo
2480 2480
 		$formproduct = null;
2481 2481
 		// Warehouse
2482 2482
 		if (isModEnabled('stock') && getDolGlobalString('WAREHOUSE_ASK_WAREHOUSE_DURING_PROPAL')) {
2483
-			require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
2483
+			require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
2484 2484
 			$formproduct = new FormProduct($db);
2485
-			print '<tr class="field_warehouse_id"><td class="titlefieldcreate">' . $langs->trans('Warehouse') . '</td><td class="valuefieldcreate">';
2486
-			print img_picto('', 'stock', 'class="pictofixedwidth"') . $formproduct->selectWarehouses($warehouse_id, 'warehouse_id', '', 1, 0, 0, '', 0, 0, array(), 'maxwidth500 widthcentpercentminusxx');
2485
+			print '<tr class="field_warehouse_id"><td class="titlefieldcreate">'.$langs->trans('Warehouse').'</td><td class="valuefieldcreate">';
2486
+			print img_picto('', 'stock', 'class="pictofixedwidth"').$formproduct->selectWarehouses($warehouse_id, 'warehouse_id', '', 1, 0, 0, '', 0, 0, array(), 'maxwidth500 widthcentpercentminusxx');
2487 2487
 			print '</td></tr>';
2488 2488
 		}
2489 2489
 
2490 2490
 		// Delivery delay
2491
-		print '<tr class="field_availability_id"><td class="titlefieldcreate">' . $langs->trans('AvailabilityPeriod');
2491
+		print '<tr class="field_availability_id"><td class="titlefieldcreate">'.$langs->trans('AvailabilityPeriod');
2492 2492
 		if (isModEnabled('order')) {
2493
-			print ' (' . $langs->trans('AfterOrder') . ')';
2493
+			print ' ('.$langs->trans('AfterOrder').')';
2494 2494
 		}
2495 2495
 		print '</td><td class="valuefieldcreate">';
2496 2496
 		print img_picto('', 'clock', 'class="pictofixedwidth"');
@@ -2498,7 +2498,7 @@  discard block
 block discarded – undo
2498 2498
 		print '</td></tr>';
2499 2499
 
2500 2500
 		// Delivery date (or manufacturing)
2501
-		print '<tr class="field_date_livraison"><td class="titlefieldcreate">' . $langs->trans("DeliveryDate") . '</td>';
2501
+		print '<tr class="field_date_livraison"><td class="titlefieldcreate">'.$langs->trans("DeliveryDate").'</td>';
2502 2502
 		print '<td class="valuefieldcreate">';
2503 2503
 		print img_picto('', 'action', 'class="pictofixedwidth"');
2504 2504
 		if (is_numeric(getDolGlobalString('DATE_LIVRAISON_WEEK_DELAY'))) {	// If value set to 0 or a num, not empty
@@ -2506,7 +2506,7 @@  discard block
 block discarded – undo
2506 2506
 			$syear = date("Y", $tmpdte);
2507 2507
 			$smonth = date("m", $tmpdte);
2508 2508
 			$sday = date("d", $tmpdte);
2509
-			print $form->selectDate($syear . "-" . $smonth . "-" . $sday, 'date_livraison', 0, 0, 0, "addprop");
2509
+			print $form->selectDate($syear."-".$smonth."-".$sday, 'date_livraison', 0, 0, 0, "addprop");
2510 2510
 		} else {
2511 2511
 			$tmp_date_delivery = GETPOST('date_delivery') ?: -1;
2512 2512
 			print $form->selectDate($tmp_date_delivery, 'date_livraison', 0, 0, 0, "addprop", 1, 1);
@@ -2527,7 +2527,7 @@  discard block
 block discarded – undo
2527 2527
 		// Incoterms
2528 2528
 		if (isModEnabled('incoterm')) {
2529 2529
 			print '<tr class="field_incoterm_id">';
2530
-			print '<td class="titlefieldcreate"><label for="incoterm_id">' . $form->textwithpicto($langs->trans("IncotermLabel"), $soc->label_incoterms, 1) . '</label></td>';
2530
+			print '<td class="titlefieldcreate"><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), $soc->label_incoterms, 1).'</label></td>';
2531 2531
 			print '<td  class="valuefieldcreate maxwidthonsmartphone">';
2532 2532
 			print img_picto('', 'incoterm', 'class="pictofixedwidth"');
2533 2533
 			print $form->select_incoterms((!empty($soc->fk_incoterms) ? $soc->fk_incoterms : ''), (!empty($soc->location_incoterms) ? $soc->location_incoterms : ''));
@@ -2541,7 +2541,7 @@  discard block
 block discarded – undo
2541 2541
 		}
2542 2542
 		// Template to use by default
2543 2543
 		print '<tr class="field_model">';
2544
-		print '<td class="titlefieldcreate">' . $langs->trans("DefaultModel") . '</td>';
2544
+		print '<td class="titlefieldcreate">'.$langs->trans("DefaultModel").'</td>';
2545 2545
 		print '<td class="valuefieldcreate">';
2546 2546
 		print img_picto('', 'pdf', 'class="pictofixedwidth"');
2547 2547
 		$liste = ModelePDFPropales::liste_modeles($db);
@@ -2552,15 +2552,15 @@  discard block
 block discarded – undo
2552 2552
 		// Multicurrency
2553 2553
 		if (isModEnabled("multicurrency")) {
2554 2554
 			print '<tr class="field_currency">';
2555
-			print '<td class="titlefieldcreate">' . $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0) . '</td>';
2555
+			print '<td class="titlefieldcreate">'.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).'</td>';
2556 2556
 			print '<td class="valuefieldcreate maxwidthonsmartphone">';
2557
-			print img_picto('', 'currency', 'class="pictofixedwidth"') . $form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany')) ? GETPOST('multicurrency_code') : $currency_code), 'multicurrency_code', 0, '', false, 'maxwidth200 widthcentpercentminusx');
2557
+			print img_picto('', 'currency', 'class="pictofixedwidth"').$form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany')) ? GETPOST('multicurrency_code') : $currency_code), 'multicurrency_code', 0, '', false, 'maxwidth200 widthcentpercentminusx');
2558 2558
 			print '</td></tr>';
2559 2559
 		}
2560 2560
 
2561 2561
 		// Public note
2562 2562
 		print '<tr class="field_note_public">';
2563
-		print '<td class="titlefieldcreate tdtop">' . $langs->trans('NotePublic') . '</td>';
2563
+		print '<td class="titlefieldcreate tdtop">'.$langs->trans('NotePublic').'</td>';
2564 2564
 		print '<td class="valuefieldcreate">';
2565 2565
 		$note_public = $object->getDefaultCreateValueFor('note_public', (!empty($objectsrc) ? $objectsrc->note_public : (getDolGlobalString('PROPALE_ADDON_NOTE_PUBLIC_DEFAULT') ? $conf->global->PROPALE_ADDON_NOTE_PUBLIC_DEFAULT : null)), 'restricthtml');
2566 2566
 		$doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', false, false, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PUBLIC') ? 0 : 1, ROWS_3, '90%');
@@ -2569,7 +2569,7 @@  discard block
 block discarded – undo
2569 2569
 		// Private note
2570 2570
 		if (empty($user->socid)) {
2571 2571
 			print '<tr class="field_note_private">';
2572
-			print '<td class="titlefieldcreate tdtop">' . $langs->trans('NotePrivate') . '</td>';
2572
+			print '<td class="titlefieldcreate tdtop">'.$langs->trans('NotePrivate').'</td>';
2573 2573
 			print '<td class="valuefieldcreate">';
2574 2574
 			$note_private = $object->getDefaultCreateValueFor('note_private', ((!empty($origin) && !empty($originid) && is_object($objectsrc)) ? $objectsrc->note_private : null));
2575 2575
 			$doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', false, false, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PRIVATE') ? 0 : 1, ROWS_3, '90%');
@@ -2579,7 +2579,7 @@  discard block
 block discarded – undo
2579 2579
 		}
2580 2580
 
2581 2581
 		// Other attributes
2582
-		include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_add.tpl.php';
2582
+		include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
2583 2583
 
2584 2584
 		// Lines from source
2585 2585
 		if (!empty($origin) && !empty($originid) && is_object($objectsrc)) {
@@ -2591,13 +2591,13 @@  discard block
 block discarded – undo
2591 2591
 				$objectsrc->update_price(1, 'auto', 1);
2592 2592
 			}
2593 2593
 
2594
-			print "\n<!-- " . $classname . " info -->";
2594
+			print "\n<!-- ".$classname." info -->";
2595 2595
 			print "\n";
2596
-			print '<input type="hidden" name="amount"         value="' . $objectsrc->total_ht . '">' . "\n";
2597
-			print '<input type="hidden" name="total"          value="' . $objectsrc->total_ttc . '">' . "\n";
2598
-			print '<input type="hidden" name="tva"            value="' . $objectsrc->total_tva . '">' . "\n";
2599
-			print '<input type="hidden" name="origin"         value="' . $objectsrc->element . '">';
2600
-			print '<input type="hidden" name="originid"       value="' . $objectsrc->id . '">';
2596
+			print '<input type="hidden" name="amount"         value="'.$objectsrc->total_ht.'">'."\n";
2597
+			print '<input type="hidden" name="total"          value="'.$objectsrc->total_ttc.'">'."\n";
2598
+			print '<input type="hidden" name="tva"            value="'.$objectsrc->total_tva.'">'."\n";
2599
+			print '<input type="hidden" name="origin"         value="'.$objectsrc->element.'">';
2600
+			print '<input type="hidden" name="originid"       value="'.$objectsrc->id.'">';
2601 2601
 
2602 2602
 			$newclassname = $classname;
2603 2603
 			if ($newclassname == 'Propal') {
@@ -2610,22 +2610,22 @@  discard block
 block discarded – undo
2610 2610
 				$newclassname = 'Intervention';
2611 2611
 			}
2612 2612
 
2613
-			print '<tr><td>' . $langs->trans($newclassname) . '</td><td>' . $objectsrc->getNomUrl(1) . '</td></tr>';
2614
-			print '<tr><td>' . $langs->trans('AmountHT') . '</td><td>' . price($objectsrc->total_ht, 0, $langs, 1, -1, -1, $conf->currency) . '</td></tr>';
2615
-			print '<tr><td>' . $langs->trans('AmountVAT') . '</td><td>' . price($objectsrc->total_tva, 0, $langs, 1, -1, -1, $conf->currency) . "</td></tr>";
2613
+			print '<tr><td>'.$langs->trans($newclassname).'</td><td>'.$objectsrc->getNomUrl(1).'</td></tr>';
2614
+			print '<tr><td>'.$langs->trans('AmountHT').'</td><td>'.price($objectsrc->total_ht, 0, $langs, 1, -1, -1, $conf->currency).'</td></tr>';
2615
+			print '<tr><td>'.$langs->trans('AmountVAT').'</td><td>'.price($objectsrc->total_tva, 0, $langs, 1, -1, -1, $conf->currency)."</td></tr>";
2616 2616
 			if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) { 		// Localtax1
2617
-				print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td><td>' . price($objectsrc->total_localtax1, 0, $langs, 1, -1, -1, $conf->currency) . "</td></tr>";
2617
+				print '<tr><td>'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td><td>'.price($objectsrc->total_localtax1, 0, $langs, 1, -1, -1, $conf->currency)."</td></tr>";
2618 2618
 			}
2619 2619
 
2620 2620
 			if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) { 		// Localtax2
2621
-				print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td><td>' . price($objectsrc->total_localtax2, 0, $langs, 1, -1, -1, $conf->currency) . "</td></tr>";
2621
+				print '<tr><td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td><td>'.price($objectsrc->total_localtax2, 0, $langs, 1, -1, -1, $conf->currency)."</td></tr>";
2622 2622
 			}
2623
-			print '<tr><td>' . $langs->trans('AmountTTC') . '</td><td>' . price($objectsrc->total_ttc, 0, $langs, 1, -1, -1, $conf->currency) . "</td></tr>";
2623
+			print '<tr><td>'.$langs->trans('AmountTTC').'</td><td>'.price($objectsrc->total_ttc, 0, $langs, 1, -1, -1, $conf->currency)."</td></tr>";
2624 2624
 
2625 2625
 			if (isModEnabled("multicurrency")) {
2626
-				print '<tr><td>' . $langs->trans('MulticurrencyAmountHT') . '</td><td>' . price($objectsrc->multicurrency_total_ht) . '</td></tr>';
2627
-				print '<tr><td>' . $langs->trans('MulticurrencyAmountVAT') . '</td><td>' . price($objectsrc->multicurrency_total_tva) . "</td></tr>";
2628
-				print '<tr><td>' . $langs->trans('MulticurrencyAmountTTC') . '</td><td>' . price($objectsrc->multicurrency_total_ttc) . "</td></tr>";
2626
+				print '<tr><td>'.$langs->trans('MulticurrencyAmountHT').'</td><td>'.price($objectsrc->multicurrency_total_ht).'</td></tr>';
2627
+				print '<tr><td>'.$langs->trans('MulticurrencyAmountVAT').'</td><td>'.price($objectsrc->multicurrency_total_tva)."</td></tr>";
2628
+				print '<tr><td>'.$langs->trans('MulticurrencyAmountTTC').'</td><td>'.price($objectsrc->multicurrency_total_ttc)."</td></tr>";
2629 2629
 			}
2630 2630
 		}
2631 2631
 
@@ -2646,16 +2646,16 @@  discard block
 block discarded – undo
2646 2646
 			// For backward compatibility
2647 2647
 			print '<tr>';
2648 2648
 			print '<td><input type="radio" name="createmode" value="copy"></td>';
2649
-			print '<td>' . $langs->trans("CopyPropalFrom") . ' </td>';
2649
+			print '<td>'.$langs->trans("CopyPropalFrom").' </td>';
2650 2650
 			print '<td>';
2651 2651
 			$liste_propal = array();
2652 2652
 			$liste_propal[0] = '';
2653 2653
 
2654 2654
 			$sql = "SELECT p.rowid as id, p.ref, s.nom";
2655
-			$sql .= " FROM " . MAIN_DB_PREFIX . "propal p";
2656
-			$sql .= ", " . MAIN_DB_PREFIX . "societe s";
2655
+			$sql .= " FROM ".MAIN_DB_PREFIX."propal p";
2656
+			$sql .= ", ".MAIN_DB_PREFIX."societe s";
2657 2657
 			$sql .= " WHERE s.rowid = p.fk_soc";
2658
-			$sql .= " AND p.entity IN (" . getEntity('propal') . ")";
2658
+			$sql .= " AND p.entity IN (".getEntity('propal').")";
2659 2659
 			$sql .= " AND p.fk_statut <> 0";
2660 2660
 			$sql .= " ORDER BY Id";
2661 2661
 
@@ -2665,7 +2665,7 @@  discard block
 block discarded – undo
2665 2665
 				$i = 0;
2666 2666
 				while ($i < $num) {
2667 2667
 					$row = $db->fetch_row($resql);
2668
-					$propalRefAndSocName = $row[1] . " - " . $row[2];
2668
+					$propalRefAndSocName = $row[1]." - ".$row[2];
2669 2669
 					$liste_propal[$row[0]] = $propalRefAndSocName;
2670 2670
 					$i++;
2671 2671
 				}
@@ -2676,7 +2676,7 @@  discard block
 block discarded – undo
2676 2676
 			print '</td></tr>';
2677 2677
 
2678 2678
 			print '<tr><td class="tdtop"><input type="radio" name="createmode" value="empty" checked></td>';
2679
-			print '<td valign="top" colspan="2">' . $langs->trans("CreateEmptyPropal") . '</td></tr>';
2679
+			print '<td valign="top" colspan="2">'.$langs->trans("CreateEmptyPropal").'</td></tr>';
2680 2680
 			print '</table>';
2681 2681
 		}
2682 2682
 	}
@@ -2736,7 +2736,7 @@  discard block
 block discarded – undo
2736 2736
 			$formquestion[] = array('type' => 'date', 'name' => 'date_delivery', 'label' => $langs->trans("DeliveryDate"), 'value' => $object->delivery_date);
2737 2737
 		}
2738 2738
 		// Incomplete payment. We ask if reason = discount or other
2739
-		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 250, 600);
2739
+		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 250, 600);
2740 2740
 	}
2741 2741
 
2742 2742
 	// Subtotal line form
@@ -2756,9 +2756,9 @@  discard block
 block discarded – undo
2756 2756
 		//Form to close proposal (signed or not)
2757 2757
 		$formquestion = array();
2758 2758
 		if (!getDolGlobalString('PROPAL_SKIP_ACCEPT_REFUSE')) {
2759
-			$formquestion[] = array('type' => 'select', 'name' => 'statut', 'label' => '<span class="fieldrequired">' . $langs->trans("CloseAs") . '</span>', 'values' => array($object::STATUS_SIGNED => $object->LibStatut($object::STATUS_SIGNED), $object::STATUS_NOTSIGNED => $object->LibStatut($object::STATUS_NOTSIGNED)));
2759
+			$formquestion[] = array('type' => 'select', 'name' => 'statut', 'label' => '<span class="fieldrequired">'.$langs->trans("CloseAs").'</span>', 'values' => array($object::STATUS_SIGNED => $object->LibStatut($object::STATUS_SIGNED), $object::STATUS_NOTSIGNED => $object->LibStatut($object::STATUS_NOTSIGNED)));
2760 2760
 		}
2761
-		$formquestion[] = array('type' => 'text', 'name' => 'note_private', 'label' => $langs->trans("Note"), 'value' => '');				// Field to complete private note (not replace)
2761
+		$formquestion[] = array('type' => 'text', 'name' => 'note_private', 'label' => $langs->trans("Note"), 'value' => ''); // Field to complete private note (not replace)
2762 2762
 
2763 2763
 		if (getDolGlobalInt('PROPOSAL_SUGGEST_DOWN_PAYMENT_INVOICE_CREATION')) {
2764 2764
 			// This is a hidden option:
@@ -2768,7 +2768,7 @@  discard block
 block discarded – undo
2768 2768
 			$deposit_percent_from_payment_terms = getDictionaryValue('c_payment_term', 'deposit_percent', $object->cond_reglement_id);
2769 2769
 
2770 2770
 			if (!empty($deposit_percent_from_payment_terms) && isModEnabled('invoice') && $user->hasRight('facture', 'creer')) {
2771
-				require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
2771
+				require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
2772 2772
 
2773 2773
 				$object->fetchObjectLinked();
2774 2774
 
@@ -2854,7 +2854,7 @@  discard block
 block discarded – undo
2854 2854
 						'type' => 'onecolumn',
2855 2855
 						'value' => '
2856 2856
 							<script>
2857
-								let signedValue = ' . $object::STATUS_SIGNED . ';
2857
+								let signedValue = ' . $object::STATUS_SIGNED.';
2858 2858
 
2859 2859
 								$(document).ready(function() {
2860 2860
 									$("[name=generate_deposit]").change(function () {
@@ -2894,7 +2894,7 @@  discard block
 block discarded – undo
2894 2894
 		}
2895 2895
 
2896 2896
 		if (isModEnabled('notification')) {
2897
-			require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
2897
+			require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
2898 2898
 			$notify = new Notify($db);
2899 2899
 			$formquestion = array_merge($formquestion, array(
2900 2900
 				array('type' => 'onecolumn', 'value' => $notify->confirmMessage('PROPAL_CLOSE_SIGNED', $object->socid, $object)),
@@ -2902,22 +2902,22 @@  discard block
 block discarded – undo
2902 2902
 		}
2903 2903
 
2904 2904
 		if (!getDolGlobalString('PROPAL_SKIP_ACCEPT_REFUSE')) {
2905
-			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('SetAcceptedRefused'), '', 'confirm_closeas', $formquestion, '', 1, 250);
2905
+			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('SetAcceptedRefused'), '', 'confirm_closeas', $formquestion, '', 1, 250);
2906 2906
 		} else {
2907
-			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?statut=3&id=' . $object->id, $langs->trans('Close'), '', 'confirm_closeas', $formquestion, '', 1, 250);
2907
+			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?statut=3&id='.$object->id, $langs->trans('Close'), '', 'confirm_closeas', $formquestion, '', 1, 250);
2908 2908
 		}
2909 2909
 	} elseif ($action == 'cancel') {
2910 2910
 		// Confirm cancel
2911
-		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans("CancelPropal"), $langs->trans('ConfirmCancelPropal', $object->ref), 'confirm_cancel', '', 0, 1);
2911
+		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("CancelPropal"), $langs->trans('ConfirmCancelPropal', $object->ref), 'confirm_cancel', '', 0, 1);
2912 2912
 	} elseif ($action == 'delete') {
2913 2913
 		// Confirm delete
2914
-		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp', $object->ref), 'confirm_delete', '', 0, 1);
2914
+		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp', $object->ref), 'confirm_delete', '', 0, 1);
2915 2915
 	} elseif ($action == 'reopen') {
2916 2916
 		// Confirm reopen
2917
-		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenProp', $object->ref), 'confirm_reopen', '', 0, 1);
2917
+		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenProp', $object->ref), 'confirm_reopen', '', 0, 1);
2918 2918
 	} elseif ($action == 'ask_deleteline') {
2919 2919
 		// Confirmation delete product/service line
2920
-		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1);
2920
+		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1);
2921 2921
 	} elseif ($action == 'ask_subtotal_deleteline') {
2922 2922
 		// Confirmation de la suppression d'une ligne subtotal
2923 2923
 		$langs->load("subtotals");
@@ -2928,7 +2928,7 @@  discard block
 block discarded – undo
2928 2928
 			$title = "DeleteTitleLine";
2929 2929
 			$question = "ConfirmDeleteTitleLine";
2930 2930
 		}
2931
-		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans($title), $langs->trans($question), 'confirm_delete_subtotalline', $formconfirm, 'no', 1);
2931
+		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans($title), $langs->trans($question), 'confirm_delete_subtotalline', $formconfirm, 'no', 1);
2932 2932
 	} elseif ($action == 'validate') {
2933 2933
 		// Confirm validate proposal
2934 2934
 		$error = 0;
@@ -2947,7 +2947,7 @@  discard block
 block discarded – undo
2947 2947
 
2948 2948
 		$text = $langs->trans('ConfirmValidateProp', $numref);
2949 2949
 		if (isModEnabled('notification')) {
2950
-			require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
2950
+			require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
2951 2951
 			$notify = new Notify($db);
2952 2952
 			$text .= '<br>';
2953 2953
 			$text .= $notify->confirmMessage('PROPAL_VALIDATE', $object->socid, $object);
@@ -2957,7 +2957,7 @@  discard block
 block discarded – undo
2957 2957
 		$nbMandated = 0;
2958 2958
 		foreach ($object->lines as $line) {
2959 2959
 			$res = $line->fetch_product();
2960
-			if ($res  > 0) {
2960
+			if ($res > 0) {
2961 2961
 				if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) {
2962 2962
 					$nbMandated++;
2963 2963
 					break;
@@ -2969,12 +2969,12 @@  discard block
 block discarded – undo
2969 2969
 				setEventMessages($langs->trans("mandatoryPeriodNeedTobeSetMsgValidate"), null, 'errors');
2970 2970
 				$error++;
2971 2971
 			} else {
2972
-				$text .= '<div><span class="clearboth nowraponall warning">' . img_warning() . $langs->trans("mandatoryPeriodNeedTobeSetMsgValidate") . '</span></div>';
2972
+				$text .= '<div><span class="clearboth nowraponall warning">'.img_warning().$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>';
2973 2973
 			}
2974 2974
 		}
2975 2975
 
2976 2976
 		if (!$error) {
2977
-			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate', '', 0, 1, 240);
2977
+			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate', '', 0, 1, 240);
2978 2978
 		}
2979 2979
 	}
2980 2980
 
@@ -2993,16 +2993,16 @@  discard block
 block discarded – undo
2993 2993
 
2994 2994
 	// Proposal card
2995 2995
 
2996
-	$linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
2996
+	$linkback = '<a href="'.DOL_URL_ROOT.'/comm/propal/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
2997 2997
 
2998 2998
 	$morehtmlref = '<div class="refidno">';
2999 2999
 	// Ref customer
3000 3000
 	$morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string', '', 0, 1);
3001
-	$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);
3001
+	$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);
3002 3002
 	// Thirdparty
3003
-	$morehtmlref .= '<br>' . $soc->getNomUrl(1, 'customer');
3003
+	$morehtmlref .= '<br>'.$soc->getNomUrl(1, 'customer');
3004 3004
 	if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $soc->id > 0) {
3005
-		$morehtmlref .= ' (<a href="' . DOL_URL_ROOT . '/comm/propal/list.php?socid=' . $soc->id . '&search_societe=' . urlencode($soc->name) . '">' . $langs->trans("OtherProposals") . '</a>)';
3005
+		$morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/comm/propal/list.php?socid='.$soc->id.'&search_societe='.urlencode($soc->name).'">'.$langs->trans("OtherProposals").'</a>)';
3006 3006
 	}
3007 3007
 	// Project
3008 3008
 	if (isModEnabled('project')) {
@@ -3011,16 +3011,16 @@  discard block
 block discarded – undo
3011 3011
 		if ($usercancreate) {
3012 3012
 			$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
3013 3013
 			if ($action != 'classify') {
3014
-				$morehtmlref .= '<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> ';
3014
+				$morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> ';
3015 3015
 			}
3016
-			$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');
3016
+			$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');
3017 3017
 		} else {
3018 3018
 			if (!empty($object->fk_project)) {
3019 3019
 				$proj = new Project($db);
3020 3020
 				$proj->fetch($object->fk_project);
3021 3021
 				$morehtmlref .= $proj->getNomUrl(1);
3022 3022
 				if ($proj->title) {
3023
-					$morehtmlref .= '<span class="opacitymedium"> - ' . dol_escape_htmltag($proj->title) . '</span>';
3023
+					$morehtmlref .= '<span class="opacitymedium"> - '.dol_escape_htmltag($proj->title).'</span>';
3024 3024
 				}
3025 3025
 			}
3026 3026
 		}
@@ -3050,7 +3050,7 @@  discard block
 block discarded – undo
3050 3050
 			$filtercreditnote = "fk_facture_source IS NOT NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS RECEIVED)%')";
3051 3051
 		}
3052 3052
 
3053
-		print '<tr><td class="titlefieldmax45">' . $langs->trans('Discounts') . '</td><td>';
3053
+		print '<tr><td class="titlefieldmax45">'.$langs->trans('Discounts').'</td><td>';
3054 3054
 
3055 3055
 		$absolute_discount = $soc->getAvailableDiscounts(null, $filterabsolutediscount);
3056 3056
 		$absolute_creditnote = $soc->getAvailableDiscounts(null, $filtercreditnote);
@@ -3061,8 +3061,8 @@  discard block
 block discarded – undo
3061 3061
 
3062 3062
 		$thirdparty = $soc;
3063 3063
 		$discount_type = 0;
3064
-		$backtopage = $_SERVER["PHP_SELF"] . '?id=' . $object->id;
3065
-		include DOL_DOCUMENT_ROOT . '/core/tpl/object_discounts.tpl.php';
3064
+		$backtopage = $_SERVER["PHP_SELF"].'?id='.$object->id;
3065
+		include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php';
3066 3066
 
3067 3067
 		print '</td></tr>';
3068 3068
 
@@ -3081,12 +3081,12 @@  discard block
 block discarded – undo
3081 3081
 		print $form->editfieldkey("DatePropal", 'date', '', $object, (int) $editenable);
3082 3082
 		print '</td><td class="valuefield">';
3083 3083
 		if ($action == 'editdate' && $usercancreate && $caneditfield) {
3084
-			print '<form name="editdate" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
3085
-			print '<input type="hidden" name="token" value="' . newToken() . '">';
3084
+			print '<form name="editdate" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
3085
+			print '<input type="hidden" name="token" value="'.newToken().'">';
3086 3086
 			print '<input type="hidden" name="action" value="setdate">';
3087
-			print '<input type="hidden" name="backtopage" value="' . $backtopage . '">';
3087
+			print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
3088 3088
 			print $form->selectDate($object->date, 're', 0, 0, 0, "editdate");
3089
-			print '<input type="submit" class="button button-edit" value="' . $langs->trans('Modify') . '">';
3089
+			print '<input type="submit" class="button button-edit" value="'.$langs->trans('Modify').'">';
3090 3090
 			print '</form>';
3091 3091
 		} else {
3092 3092
 			if ($object->date) {
@@ -3104,17 +3104,17 @@  discard block
 block discarded – undo
3104 3104
 		print $langs->trans('DateEndPropal');
3105 3105
 		print '</td>';
3106 3106
 		if ($action != 'editecheance' && $usercancreate && $caneditfield) {
3107
-			print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editecheance&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->trans('SetConditions'), 1) . '</a></td>';
3107
+			print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editecheance&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetConditions'), 1).'</a></td>';
3108 3108
 		}
3109 3109
 		print '</tr></table>';
3110 3110
 		print '</td><td class="valuefield">';
3111 3111
 		if ($action == 'editecheance' && $usercancreate && $caneditfield) {
3112
-			print '<form name="editecheance" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
3113
-			print '<input type="hidden" name="token" value="' . newToken() . '">';
3112
+			print '<form name="editecheance" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
3113
+			print '<input type="hidden" name="token" value="'.newToken().'">';
3114 3114
 			print '<input type="hidden" name="action" value="setecheance">';
3115
-			print '<input type="hidden" name="backtopage" value="' . $backtopage . '">';
3115
+			print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
3116 3116
 			print $form->selectDate($object->fin_validite, 'ech', 0, 0, 0, "editecheance");
3117
-			print '<input type="submit" class="button button-edit" value="' . $langs->trans('Modify') . '">';
3117
+			print '<input type="submit" class="button button-edit" value="'.$langs->trans('Modify').'">';
3118 3118
 			print '</form>';
3119 3119
 		} else {
3120 3120
 			if (!empty($object->fin_validite)) {
@@ -3135,14 +3135,14 @@  discard block
 block discarded – undo
3135 3135
 		print $langs->trans('PaymentConditionsShort');
3136 3136
 		print '</td>';
3137 3137
 		if ($action != 'editconditions' && $usercancreate && $caneditfield) {
3138
-			print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editconditions&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetConditions'), 1) . '</a></td>';
3138
+			print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editconditions&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetConditions'), 1).'</a></td>';
3139 3139
 		}
3140 3140
 		print '</tr></table>';
3141 3141
 		print '</td><td class="valuefield">';
3142 3142
 		if ($action == 'editconditions' && $usercancreate && $caneditfield) {
3143
-			$form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->cond_reglement_id, 'cond_reglement_id', 0, '', 1, $object->deposit_percent);
3143
+			$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->cond_reglement_id, 'cond_reglement_id', 0, '', 1, $object->deposit_percent);
3144 3144
 		} else {
3145
-			$form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->cond_reglement_id, 'none', 0, '', 1, $object->deposit_percent);
3145
+			$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->cond_reglement_id, 'none', 0, '', 1, $object->deposit_percent);
3146 3146
 		}
3147 3147
 		print '</td>';
3148 3148
 		print '</tr>';
@@ -3154,14 +3154,14 @@  discard block
 block discarded – undo
3154 3154
 		print $langs->trans('PaymentMode');
3155 3155
 		print '</td>';
3156 3156
 		if ($action != 'editmode' && $usercancreate && $caneditfield) {
3157
-			print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editmode&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMode'), 1) . '</a></td>';
3157
+			print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editmode&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetMode'), 1).'</a></td>';
3158 3158
 		}
3159 3159
 		print '</tr></table>';
3160 3160
 		print '</td><td class="valuefieldcreate">';
3161 3161
 		if ($action == 'editmode' && $usercancreate && $caneditfield) {
3162
-			$form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->mode_reglement_id, 'mode_reglement_id', 'CRDT', 1, 1);
3162
+			$form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->mode_reglement_id, 'mode_reglement_id', 'CRDT', 1, 1);
3163 3163
 		} else {
3164
-			$form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->mode_reglement_id, 'none');
3164
+			$form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->mode_reglement_id, 'none');
3165 3165
 		}
3166 3166
 		print '</td></tr>';
3167 3167
 
@@ -3177,20 +3177,20 @@  discard block
 block discarded – undo
3177 3177
 		print '<tr class="fielddeliverydelay"><td>';
3178 3178
 		print '<table class="nobordernopadding centpercent"><tr><td>';
3179 3179
 		if (isModEnabled('order')) {
3180
-			print $form->textwithpicto($langs->trans('AvailabilityPeriod'), $langs->trans('AvailabilityPeriod') . ' (' . $langs->trans('AfterOrder') . ')');
3180
+			print $form->textwithpicto($langs->trans('AvailabilityPeriod'), $langs->trans('AvailabilityPeriod').' ('.$langs->trans('AfterOrder').')');
3181 3181
 		} else {
3182 3182
 			print $langs->trans('AvailabilityPeriod');
3183 3183
 		}
3184 3184
 		print '</td>';
3185 3185
 		if ($action != 'editavailability' && $usercancreate && $caneditfield) {
3186
-			print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editavailability&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetAvailability'), 1) . '</a></td>';
3186
+			print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editavailability&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetAvailability'), 1).'</a></td>';
3187 3187
 		}
3188 3188
 		print '</tr></table>';
3189 3189
 		print '</td><td class="valuefield">';
3190 3190
 		if ($action == 'editavailability' && $usercancreate && $caneditfield) {
3191
-			$form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->availability_id, 'availability_id', 1);
3191
+			$form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->availability_id, 'availability_id', 1);
3192 3192
 		} else {
3193
-			$form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->availability_id, 'none', 1);
3193
+			$form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->availability_id, 'none', 1);
3194 3194
 		}
3195 3195
 
3196 3196
 		print '</td>';
@@ -3203,14 +3203,14 @@  discard block
 block discarded – undo
3203 3203
 			print $langs->trans('SendingMethod');
3204 3204
 			print '</td>';
3205 3205
 			if ($action != 'editshippingmethod' && $usercancreate && $caneditfield) {
3206
-				print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editshippingmethod&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->trans('SetShippingMode'), 1) . '</a></td>';
3206
+				print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editshippingmethod&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetShippingMode'), 1).'</a></td>';
3207 3207
 			}
3208 3208
 			print '</tr></table>';
3209 3209
 			print '</td><td class="valuefield">';
3210 3210
 			if ($action == 'editshippingmethod' && $usercancreate && $caneditfield) {
3211
-				$form->formSelectShippingMethod($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->shipping_method_id, 'shipping_method_id', 1);
3211
+				$form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->shipping_method_id, 'shipping_method_id', 1);
3212 3212
 			} else {
3213
-				$form->formSelectShippingMethod($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->shipping_method_id, 'none');
3213
+				$form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->shipping_method_id, 'none');
3214 3214
 			}
3215 3215
 			print '</td>';
3216 3216
 			print '</tr>';
@@ -3219,16 +3219,16 @@  discard block
 block discarded – undo
3219 3219
 		// Warehouse
3220 3220
 		if (isModEnabled('stock') && getDolGlobalString('WAREHOUSE_ASK_WAREHOUSE_DURING_PROPAL')) {
3221 3221
 			$langs->load('stocks');
3222
-			require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
3222
+			require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
3223 3223
 			$formproduct = new FormProduct($db);
3224 3224
 			print '<tr class="field_warehouse_id"><td>';
3225 3225
 			$editenable = $usercancreate;
3226 3226
 			print $form->editfieldkey("Warehouse", 'warehouse', '', $object, $editenable);
3227 3227
 			print '</td><td class="valuefieldcreate">';
3228 3228
 			if ($action == 'editwarehouse') {
3229
-				$formproduct->formSelectWarehouses($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->warehouse_id, 'warehouse_id', 1);
3229
+				$formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'warehouse_id', 1);
3230 3230
 			} else {
3231
-				$formproduct->formSelectWarehouses($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->warehouse_id, 'none');
3231
+				$formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'none');
3232 3232
 			}
3233 3233
 			print '</td>';
3234 3234
 			print '</tr>';
@@ -3240,14 +3240,14 @@  discard block
 block discarded – undo
3240 3240
 		print $langs->trans('Source');
3241 3241
 		print '</td>';
3242 3242
 		if ($action != 'editdemandreason' && $usercancreate) {
3243
-			print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editdemandreason&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetDemandReason'), 1) . '</a></td>';
3243
+			print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editdemandreason&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetDemandReason'), 1).'</a></td>';
3244 3244
 		}
3245 3245
 		print '</tr></table>';
3246 3246
 		print '</td><td class="valuefield">';
3247 3247
 		if ($action == 'editdemandreason' && $usercancreate) {
3248
-			$form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->demand_reason_id, 'demand_reason_id', 1);
3248
+			$form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->demand_reason_id, 'demand_reason_id', 1);
3249 3249
 		} else {
3250
-			$form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->demand_reason_id, 'none');
3250
+			$form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->demand_reason_id, 'none');
3251 3251
 		}
3252 3252
 		print '</td>';
3253 3253
 		print '</tr>';
@@ -3259,7 +3259,7 @@  discard block
 block discarded – undo
3259 3259
 			print '</td><td class="valuefield">';
3260 3260
 			$arrayoutstandingbills = $soc->getOutstandingBills();
3261 3261
 			print($arrayoutstandingbills['opened'] > $soc->outstanding_limit ? img_warning() : '');
3262
-			print price($arrayoutstandingbills['opened']) . ' / ';
3262
+			print price($arrayoutstandingbills['opened']).' / ';
3263 3263
 			print price($soc->outstanding_limit, 0, $langs, 1, -1, -1, $conf->currency);
3264 3264
 			print '</td>';
3265 3265
 			print '</tr>';
@@ -3272,14 +3272,14 @@  discard block
 block discarded – undo
3272 3272
 			print $langs->trans('BankAccount');
3273 3273
 			print '</td>';
3274 3274
 			if ($action != 'editbankaccount' && $usercancreate) {
3275
-				print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editbankaccount&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->trans('SetBankAccount'), 1) . '</a></td>';
3275
+				print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'</a></td>';
3276 3276
 			}
3277 3277
 			print '</tr></table>';
3278 3278
 			print '</td><td class="valuefield">';
3279 3279
 			if ($action == 'editbankaccount') {
3280
-				$form->formSelectAccount($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->fk_account, 'fk_account', 1);
3280
+				$form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->fk_account, 'fk_account', 1);
3281 3281
 			} else {
3282
-				$form->formSelectAccount($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->fk_account, 'none');
3282
+				$form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->fk_account, 'none');
3283 3283
 			}
3284 3284
 			print '</td>';
3285 3285
 			print '</tr>';
@@ -3290,13 +3290,13 @@  discard block
 block discarded – undo
3290 3290
 			$totalWeight = isset($tmparray['weight']) ? $tmparray['weight'] : 0;
3291 3291
 			$totalVolume = isset($tmparray['volume']) ? $tmparray['volume'] : 0;
3292 3292
 			if ($totalWeight) {
3293
-				print '<tr><td>' . $langs->trans("CalculatedWeight") . '</td>';
3293
+				print '<tr><td>'.$langs->trans("CalculatedWeight").'</td>';
3294 3294
 				print '<td class="valuefield">';
3295 3295
 				print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, getDolGlobalInt('MAIN_WEIGHT_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_WEIGHT_DEFAULT_UNIT', 'no'), 1);
3296 3296
 				print '</td></tr>';
3297 3297
 			}
3298 3298
 			if ($totalVolume) {
3299
-				print '<tr><td>' . $langs->trans("CalculatedVolume") . '</td>';
3299
+				print '<tr><td>'.$langs->trans("CalculatedVolume").'</td>';
3300 3300
 				print '<td class="valuefield">';
3301 3301
 				print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, getDolGlobalInt('MAIN_VOLUME_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_VOLUME_DEFAULT_UNIT', 'no'), 1);
3302 3302
 				print '</td></tr>';
@@ -3310,7 +3310,7 @@  discard block
 block discarded – undo
3310 3310
 			print $langs->trans('IncotermLabel');
3311 3311
 			print '<td><td class="right">';
3312 3312
 			if ($action != 'editincoterm' && $usercancreate && $caneditfield) {
3313
-				print '<a class="editfielda" href="' . DOL_URL_ROOT . '/comm/propal/card.php?id=' . $object->id . '&action=editincoterm&token=' . newToken() . '">' . img_edit() . '</a>';
3313
+				print '<a class="editfielda" href="'.DOL_URL_ROOT.'/comm/propal/card.php?id='.$object->id.'&action=editincoterm&token='.newToken().'">'.img_edit().'</a>';
3314 3314
 			} else {
3315 3315
 				print '&nbsp;';
3316 3316
 			}
@@ -3318,7 +3318,7 @@  discard block
 block discarded – undo
3318 3318
 			print '</td>';
3319 3319
 			print '<td class="valuefield">';
3320 3320
 			if ($action == 'editincoterm' && $usercancreate && $caneditfield) {
3321
-				print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'] . '?id=' . $object->id);
3321
+				print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'].'?id='.$object->id);
3322 3322
 			} else {
3323 3323
 				print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1);
3324 3324
 			}
@@ -3353,7 +3353,7 @@  discard block
 block discarded – undo
3353 3353
 		}
3354 3354
 
3355 3355
 		// Other attributes
3356
-		include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
3356
+		include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
3357 3357
 
3358 3358
 		print '</table>';
3359 3359
 
@@ -3363,53 +3363,53 @@  discard block
 block discarded – undo
3363 3363
 
3364 3364
 		print '<table class="border tableforfield centpercent">';
3365 3365
 
3366
-		include DOL_DOCUMENT_ROOT . '/core/tpl/object_currency_amount.tpl.php';
3366
+		include DOL_DOCUMENT_ROOT.'/core/tpl/object_currency_amount.tpl.php';
3367 3367
 
3368 3368
 		print '<tr>';
3369
-		print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>';
3370
-		print '<td class="nowrap amountcard right">' . price($object->total_ht, 0, $langs, 1, -1, -1, $conf->currency) . '</td>';
3369
+		print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>';
3370
+		print '<td class="nowrap amountcard right">'.price($object->total_ht, 0, $langs, 1, -1, -1, $conf->currency).'</td>';
3371 3371
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
3372
-			print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, 0, $langs, 1, -1, -1, $object->multicurrency_code) . '</td>';
3372
+			print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, 0, $langs, 1, -1, -1, $object->multicurrency_code).'</td>';
3373 3373
 		}
3374 3374
 		print '</tr>';
3375 3375
 
3376 3376
 		print '<tr>';
3377
-		print '<td>' . $langs->trans('AmountVAT') . '</td>';
3378
-		print '<td class="nowrap amountcard right">' . price($object->total_tva, 0, $langs, 1, -1, -1, $conf->currency) . '</td>';
3377
+		print '<td>'.$langs->trans('AmountVAT').'</td>';
3378
+		print '<td class="nowrap amountcard right">'.price($object->total_tva, 0, $langs, 1, -1, -1, $conf->currency).'</td>';
3379 3379
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
3380
-			print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, 0, $langs, 1, -1, -1, $object->multicurrency_code) . '</td>';
3380
+			print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, 0, $langs, 1, -1, -1, $object->multicurrency_code).'</td>';
3381 3381
 		}
3382 3382
 		print '</tr>';
3383 3383
 
3384 3384
 		if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) {
3385 3385
 			print '<tr>';
3386
-			print '<td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
3387
-			print '<td class="nowrap amountcard right">' . price($object->total_localtax1, 0, $langs, 1, -1, -1, $conf->currency) . '</td>';
3386
+			print '<td>'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>';
3387
+			print '<td class="nowrap amountcard right">'.price($object->total_localtax1, 0, $langs, 1, -1, -1, $conf->currency).'</td>';
3388 3388
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
3389 3389
 				$object->multicurrency_total_localtax1 = price2num($object->total_localtax1 * $object->multicurrency_tx, 'MT');
3390 3390
 
3391
-				print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_localtax1, 0, $langs, 1, -1, -1, $object->multicurrency_code) . '</td>';
3391
+				print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_localtax1, 0, $langs, 1, -1, -1, $object->multicurrency_code).'</td>';
3392 3392
 			}
3393 3393
 			print '</tr>';
3394 3394
 		}
3395 3395
 
3396 3396
 		if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) {
3397 3397
 			print '<tr>';
3398
-			print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>';
3399
-			print '<td class="nowrap amountcard right">' . price($object->total_localtax2, 0, $langs, 1, -1, -1, $conf->currency) . '</td>';
3398
+			print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>';
3399
+			print '<td class="nowrap amountcard right">'.price($object->total_localtax2, 0, $langs, 1, -1, -1, $conf->currency).'</td>';
3400 3400
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
3401 3401
 				$object->multicurrency_total_localtax2 = price2num($object->total_localtax2 * $object->multicurrency_tx, 'MT');
3402 3402
 
3403
-				print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_localtax2, 0, $langs, 1, -1, -1, $object->multicurrency_code) . '</td>';
3403
+				print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_localtax2, 0, $langs, 1, -1, -1, $object->multicurrency_code).'</td>';
3404 3404
 			}
3405 3405
 			print '</tr>';
3406 3406
 		}
3407 3407
 
3408 3408
 		print '<tr>';
3409
-		print '<td>' . $langs->trans('AmountTTC') . '</td>';
3410
-		print '<td class="nowrap amountcard right">' . price($object->total_ttc, 0, $langs, 1, -1, -1, $conf->currency) . '</td>';
3409
+		print '<td>'.$langs->trans('AmountTTC').'</td>';
3410
+		print '<td class="nowrap amountcard right">'.price($object->total_ttc, 0, $langs, 1, -1, -1, $conf->currency).'</td>';
3411 3411
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
3412
-			print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ttc, 0, $langs, 1, -1, -1, $object->multicurrency_code) . '</td>';
3412
+			print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ttc, 0, $langs, 1, -1, -1, $object->multicurrency_code).'</td>';
3413 3413
 		}
3414 3414
 		print '</tr>';
3415 3415
 
@@ -3428,13 +3428,13 @@  discard block
 block discarded – undo
3428 3428
 		if (getDolGlobalString('MAIN_DISABLE_CONTACTS_TAB')) {
3429 3429
 			$blocname = 'contacts';
3430 3430
 			$title = $langs->trans('ContactsAddresses');
3431
-			include DOL_DOCUMENT_ROOT . '/core/tpl/bloc_showhide.tpl.php';
3431
+			include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php';
3432 3432
 		}
3433 3433
 
3434 3434
 		if (getDolGlobalString('MAIN_DISABLE_NOTES_TAB')) {
3435 3435
 			$blocname = 'notes';
3436 3436
 			$title = $langs->trans('Notes');
3437
-			include DOL_DOCUMENT_ROOT . '/core/tpl/bloc_showhide.tpl.php';
3437
+			include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php';
3438 3438
 		}
3439 3439
 
3440 3440
 		/*
@@ -3449,20 +3449,20 @@  discard block
 block discarded – undo
3449 3449
 		global $inputalsopricewithtax;
3450 3450
 		$inputalsopricewithtax = 1;
3451 3451
 
3452
-		print '	<form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="POST">
3453
-		<input type="hidden" name="token" value="' . newToken() . '">
3454
-		<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '">
3452
+		print '	<form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="POST">
3453
+		<input type="hidden" name="token" value="' . newToken().'">
3454
+		<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">
3455 3455
 		<input type="hidden" name="mode" value="">
3456 3456
 		<input type="hidden" name="page_y" value="">
3457
-		<input type="hidden" name="backtopage" value="' . $backtopage . '">
3458
-		<input type="hidden" name="id" value="' . $object->id . '">
3457
+		<input type="hidden" name="backtopage" value="' . $backtopage.'">
3458
+		<input type="hidden" name="id" value="' . $object->id.'">
3459 3459
 		';
3460 3460
 
3461 3461
 		if (!empty($conf->use_javascript_ajax) && $object->status == Propal::STATUS_DRAFT) {
3462 3462
 			if (isModEnabled('subtotals')) {
3463
-				include DOL_DOCUMENT_ROOT . '/core/tpl/subtotal_ajaxrow.tpl.php';
3463
+				include DOL_DOCUMENT_ROOT.'/core/tpl/subtotal_ajaxrow.tpl.php';
3464 3464
 			} else {
3465
-				include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php';
3465
+				include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
3466 3466
 			}
3467 3467
 		}
3468 3468
 
@@ -3517,7 +3517,7 @@  discard block
 block discarded – undo
3517 3517
 		if (empty($reshook)) {
3518 3518
 			if ($action != 'editline') {
3519 3519
 				// Subtotal
3520
-				if ($object->status == Propal::STATUS_DRAFT && isModEnabled('subtotals') && getDolGlobalString('SUBTOTAL_TITLE_' . strtoupper($object->element))) {
3520
+				if ($object->status == Propal::STATUS_DRAFT && isModEnabled('subtotals') && getDolGlobalString('SUBTOTAL_TITLE_'.strtoupper($object->element))) {
3521 3521
 					$langs->load('subtotals');
3522 3522
 
3523 3523
 					$url_button = array();
@@ -3527,7 +3527,7 @@  discard block
 block discarded – undo
3527 3527
 						'enabled' => (isModEnabled('propal') && $object->status == Propal::STATUS_DRAFT),
3528 3528
 						'perm' => (bool) $usercancreate,
3529 3529
 						'label' => $langs->trans('AddTitleLine'),
3530
-						'url' => '/comm/propal/card.php?id=' . $object->id . '&action=add_title_line&token=' . newToken()
3530
+						'url' => '/comm/propal/card.php?id='.$object->id.'&action=add_title_line&token='.newToken()
3531 3531
 					);
3532 3532
 
3533 3533
 					$url_button[] = array(
@@ -3535,7 +3535,7 @@  discard block
 block discarded – undo
3535 3535
 						'enabled' => (isModEnabled('propal') && $object->status == Propal::STATUS_DRAFT),
3536 3536
 						'perm' => (bool) $usercancreate,
3537 3537
 						'label' => $langs->trans('AddSubtotalLine'),
3538
-						'url' => '/comm/propal/card.php?id=' . $object->id . '&action=add_subtotal_line&token=' . newToken()
3538
+						'url' => '/comm/propal/card.php?id='.$object->id.'&action=add_subtotal_line&token='.newToken()
3539 3539
 					);
3540 3540
 
3541 3541
 					print dolGetButtonAction('', $langs->trans('Subtotal'), 'default', $url_button, '', true);
@@ -3546,9 +3546,9 @@  discard block
 block discarded – undo
3546 3546
 					|| ($object->status == Propal::STATUS_DRAFT && getDolGlobalString('PROPAL_ENABLE_NEGATIVE') && count($object->lines) > 0)
3547 3547
 				) {
3548 3548
 					if ($usercanvalidate) {
3549
-						print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=validate&token=' . newToken() . '">' . (!getDolGlobalString('PROPAL_SKIP_ACCEPT_REFUSE') ? $langs->trans('Validate') : $langs->trans('ValidateAndSign')) . '</a>';
3549
+						print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=validate&token='.newToken().'">'.(!getDolGlobalString('PROPAL_SKIP_ACCEPT_REFUSE') ? $langs->trans('Validate') : $langs->trans('ValidateAndSign')).'</a>';
3550 3550
 					} else {
3551
-						print '<a class="butActionRefused classfortooltip" href="#">' . $langs->trans('Validate') . '</a>';
3551
+						print '<a class="butActionRefused classfortooltip" href="#">'.$langs->trans('Validate').'</a>';
3552 3552
 					}
3553 3553
 				}
3554 3554
 				// Create event
@@ -3558,23 +3558,23 @@  discard block
 block discarded – undo
3558 3558
 				}*/
3559 3559
 				// Edit
3560 3560
 				if ($object->status == Propal::STATUS_VALIDATED && $usercancreate) {
3561
-					print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=modif&token=' . newToken() . '">' . $langs->trans('Modify') . '</a>';
3561
+					print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=modif&token='.newToken().'">'.$langs->trans('Modify').'</a>';
3562 3562
 				}
3563 3563
 
3564 3564
 				// ReOpen
3565 3565
 				if (((getDolGlobalString('PROPAL_REOPEN_UNSIGNED_ONLY') && $object->status == Propal::STATUS_NOTSIGNED) || (!getDolGlobalString('PROPAL_REOPEN_UNSIGNED_ONLY') && ($object->status == Propal::STATUS_SIGNED || $object->status == Propal::STATUS_NOTSIGNED || $object->status == Propal::STATUS_BILLED || $object->status == Propal::STATUS_CANCELED)))) {
3566 3566
 					if ($usercanreopen) {
3567
-						print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=reopen&token=' . newToken() . (!getDolGlobalString('MAIN_JUMP_TAG') ? '' : '#reopen') . '"';
3568
-						print '>' . $langs->trans('ReOpen') . '</a>';
3567
+						print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen&token='.newToken().(!getDolGlobalString('MAIN_JUMP_TAG') ? '' : '#reopen').'"';
3568
+						print '>'.$langs->trans('ReOpen').'</a>';
3569 3569
 					} else {
3570
-						print '<a class="butActionRefused classfortooltip" href="#" title="' . $langs->trans("NotEnoughPermissions") . '">' . $langs->trans("ReOpen") . '</a>';
3570
+						print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans("ReOpen").'</a>';
3571 3571
 					}
3572 3572
 				}
3573 3573
 
3574 3574
 				// Send
3575 3575
 				if (empty($user->socid)) {
3576 3576
 					if ($object->status == Propal::STATUS_VALIDATED || $object->status == Propal::STATUS_SIGNED || getDolGlobalString('PROPOSAL_SENDBYEMAIL_FOR_ALL_STATUS')) {
3577
-						print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"] . '?action=presend&token=' . newToken() . '&id=' . $object->id . '&mode=init#formmailbeforetitle', '', $usercansend);
3577
+						print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', '', $usercansend);
3578 3578
 					}
3579 3579
 				}
3580 3580
 
@@ -3586,7 +3586,7 @@  discard block
 block discarded – undo
3586 3586
 					'enabled' => (isModEnabled('order') && $object->status == Propal::STATUS_SIGNED),
3587 3587
 					'perm' => $usercancreateorder,
3588 3588
 					'label' => 'AddOrder',
3589
-					'url' => '/commande/card.php?action=create&origin=' . urlencode($object->element) . '&originid=' . ((int) $object->id) . '&socid=' . ((int) $object->socid)
3589
+					'url' => '/commande/card.php?action=create&origin='.urlencode($object->element).'&originid='.((int) $object->id).'&socid='.((int) $object->socid)
3590 3590
 				);
3591 3591
 				/*if (isModEnabled('order') && $object->status == Propal::STATUS_SIGNED) {
3592 3592
 					if ($usercancreateorder) {
@@ -3601,7 +3601,7 @@  discard block
 block discarded – undo
3601 3601
 						'enabled' => ($object->status == Propal::STATUS_SIGNED && isModEnabled("supplier_order")),
3602 3602
 						'perm' => $usercancreatepurchaseorder,
3603 3603
 						'label' => 'AddPurchaseOrder',
3604
-						'url' => '/fourn/commande/card.php?action=create&origin=' . urlencode($object->element) . '&originid=' . ((int) $object->id) . '&socid=' . ((int) $object->socid)
3604
+						'url' => '/fourn/commande/card.php?action=create&origin='.urlencode($object->element).'&originid='.((int) $object->id).'&socid='.((int) $object->socid)
3605 3605
 					);
3606 3606
 					/*if ($object->status == Propal::STATUS_SIGNED && isModEnabled("supplier_order")) {
3607 3607
 						if ($usercancreatepurchaseorder) {
@@ -3616,7 +3616,7 @@  discard block
 block discarded – undo
3616 3616
 					'enabled' => (isModEnabled("service") && isModEnabled('intervention') && $object->status == Propal::STATUS_SIGNED),
3617 3617
 					'perm' => $usercancreateintervention,
3618 3618
 					'label' => 'AddIntervention',
3619
-					'url' => '/fichinter/card.php?action=create&origin=' . urlencode($object->element) . '&originid=' . ((int) $object->id) . '&socid=' . ((int) $object->socid)
3619
+					'url' => '/fichinter/card.php?action=create&origin='.urlencode($object->element).'&originid='.((int) $object->id).'&socid='.((int) $object->socid)
3620 3620
 				);
3621 3621
 				/*if (isModEnabled("service") && isModEnabled('intervention') && $object->status == Propal::STATUS_SIGNED) {
3622 3622
 					if ($usercancreateintervention) {
@@ -3631,7 +3631,7 @@  discard block
 block discarded – undo
3631 3631
 					'enabled' => (isModEnabled('contract') && $object->status == Propal::STATUS_SIGNED),
3632 3632
 					'perm' => $usercancreatecontract,
3633 3633
 					'label' => 'AddContract',
3634
-					'url' => '/contrat/card.php?action=create&origin=' . urlencode($object->element) . '&originid=' . ((int) $object->id) . '&socid=' . ((int) $object->socid)
3634
+					'url' => '/contrat/card.php?action=create&origin='.urlencode($object->element).'&originid='.((int) $object->id).'&socid='.((int) $object->socid)
3635 3635
 				);
3636 3636
 				/*if (isModEnabled('contract') && $object->status == Propal::STATUS_SIGNED) {
3637 3637
 					$langs->load("contracts");
@@ -3648,7 +3648,7 @@  discard block
 block discarded – undo
3648 3648
 						'enabled' => isModEnabled('invoice'),
3649 3649
 						'perm' => $usercancreateinvoice,
3650 3650
 						'label' => 'CreateBill',
3651
-						'url' => '/compta/facture/card.php?action=create&origin=' . urlencode($object->element) . '&originid=' . ((int) $object->id) . '&socid=' . ((int) $object->socid),
3651
+						'url' => '/compta/facture/card.php?action=create&origin='.urlencode($object->element).'&originid='.((int) $object->id).'&socid='.((int) $object->socid),
3652 3652
 					];
3653 3653
 					/*if (isModEnabled('invoice') && $usercancreateinvoice) {
3654 3654
 						print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("CreateBill").'</a>';
@@ -3657,7 +3657,7 @@  discard block
 block discarded – undo
3657 3657
 
3658 3658
 				$actionButtonsParameters = [
3659 3659
 					"areDropdownButtons" => !getDolGlobalInt("MAIN_REMOVE_DROPDOWN_CREATE_BUTTONS_ON_ORDER"),
3660
-					"backtopage" => $_SERVER["PHP_SELF"] . "?id=" . ((int) $id)
3660
+					"backtopage" => $_SERVER["PHP_SELF"]."?id=".((int) $id)
3661 3661
 				];
3662 3662
 
3663 3663
 				if ($numlines > 0) {
@@ -3670,9 +3670,9 @@  discard block
 block discarded – undo
3670 3670
 					$arrayofinvoiceforpropal = $object->getInvoiceArrayList();
3671 3671
 					if ((is_array($arrayofinvoiceforpropal) && count($arrayofinvoiceforpropal) > 0) || !getDolGlobalString('WORKFLOW_PROPAL_NEED_INVOICE_TO_BE_CLASSIFIED_BILLED')) {
3672 3672
 						if ($usercanclose) {
3673
-							print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=classifybilled&token=' . newToken() . '&socid=' . $object->socid . '">' . $langs->trans("ClassifyBilled") . '</a>';
3673
+							print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifybilled&token='.newToken().'&socid='.$object->socid.'">'.$langs->trans("ClassifyBilled").'</a>';
3674 3674
 						} else {
3675
-							print '<a class="butActionRefused classfortooltip" href="#" title="' . $langs->trans("NotEnoughPermissions") . '">' . $langs->trans("ClassifyBilled") . '</a>';
3675
+							print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans("ClassifyBilled").'</a>';
3676 3676
 						}
3677 3677
 					}
3678 3678
 				}
@@ -3681,33 +3681,33 @@  discard block
 block discarded – undo
3681 3681
 					// Close as accepted/refused
3682 3682
 					if ($object->status == Propal::STATUS_VALIDATED) {
3683 3683
 						if ($usercanclose) {
3684
-							print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=closeas&token=' . newToken() . (!getDolGlobalString('MAIN_JUMP_TAG') ? '' : '#close') . '"';
3685
-							print '>' . $langs->trans('SetAcceptedRefused') . '</a>';
3684
+							print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=closeas&token='.newToken().(!getDolGlobalString('MAIN_JUMP_TAG') ? '' : '#close').'"';
3685
+							print '>'.$langs->trans('SetAcceptedRefused').'</a>';
3686 3686
 						} else {
3687
-							print '<a class="butActionRefused classfortooltip" href="#" title="' . $langs->trans("NotEnoughPermissions") . '"';
3688
-							print '>' . $langs->trans('SetAcceptedRefused') . '</a>';
3687
+							print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'"';
3688
+							print '>'.$langs->trans('SetAcceptedRefused').'</a>';
3689 3689
 						}
3690 3690
 					}
3691 3691
 				} else {
3692 3692
 					// Set not signed (close)
3693 3693
 					if ($object->status == Propal::STATUS_DRAFT && $usercanclose) {
3694
-						print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&token=' . newToken() . '&action=closeas&token=' . newToken() . (!getDolGlobalString('MAIN_JUMP_TAG') ? '' : '#close') . '"';
3695
-						print '>' . $langs->trans('SetRefusedAndClose') . '</a>';
3694
+						print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&token='.newToken().'&action=closeas&token='.newToken().(!getDolGlobalString('MAIN_JUMP_TAG') ? '' : '#close').'"';
3695
+						print '>'.$langs->trans('SetRefusedAndClose').'</a>';
3696 3696
 					}
3697 3697
 				}
3698 3698
 
3699 3699
 				// Cancel propal
3700 3700
 				if ($object->status > Propal::STATUS_DRAFT && $usercanclose) {
3701
-					print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=cancel&token=' . newToken() . '">' . $langs->trans("CancelPropal") . '</a>';
3701
+					print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=cancel&token='.newToken().'">'.$langs->trans("CancelPropal").'</a>';
3702 3702
 				}
3703 3703
 
3704 3704
 				// Clone
3705 3705
 				if ($usercancreate) {
3706
-					print '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&socid=' . $object->socid . '&action=clone&token=' . newToken() . '&object=' . $object->element . '">' . $langs->trans("ToClone") . '</a>';
3706
+					print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&token='.newToken().'&object='.$object->element.'">'.$langs->trans("ToClone").'</a>';
3707 3707
 				}
3708 3708
 
3709 3709
 				// Delete
3710
-				print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=delete&token=' . newToken(), 'delete', $usercandelete);
3710
+				print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $usercandelete);
3711 3711
 			}
3712 3712
 		}
3713 3713
 
@@ -3726,8 +3726,8 @@  discard block
 block discarded – undo
3726 3726
 		 * Generated documents
3727 3727
 		 */
3728 3728
 		$objref = dol_sanitizeFileName($object->ref);
3729
-		$filedir = $conf->propal->multidir_output[$object->entity ?? $conf->entity] . "/" . dol_sanitizeFileName($object->ref);
3730
-		$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
3729
+		$filedir = $conf->propal->multidir_output[$object->entity ?? $conf->entity]."/".dol_sanitizeFileName($object->ref);
3730
+		$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
3731 3731
 		$genallowed = $usercanread;
3732 3732
 		$delallowed = $usercancreate;
3733 3733
 		$tooltipAfterComboOfModels = '';
@@ -3754,19 +3754,19 @@  discard block
 block discarded – undo
3754 3754
 
3755 3755
 		if ($object->status != Propal::STATUS_DRAFT && $useonlinesignature) {
3756 3756
 			print '<br><!-- Link to sign -->';
3757
-			require_once DOL_DOCUMENT_ROOT . '/core/lib/signature.lib.php';
3758
-			print showOnlineSignatureUrl('proposal', $object->ref, $object) . '<br>';
3757
+			require_once DOL_DOCUMENT_ROOT.'/core/lib/signature.lib.php';
3758
+			print showOnlineSignatureUrl('proposal', $object->ref, $object).'<br>';
3759 3759
 		}
3760 3760
 
3761 3761
 		print '</div><div class="fichehalfright">';
3762 3762
 
3763 3763
 		$MAXEVENT = 10;
3764 3764
 
3765
-		$morehtmlcenter = dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT . '/comm/propal/messaging.php?id=' . $object->id);
3766
-		$morehtmlcenter .= dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT . '/comm/propal/agenda.php?id=' . $object->id);
3765
+		$morehtmlcenter = dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT.'/comm/propal/messaging.php?id='.$object->id);
3766
+		$morehtmlcenter .= dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/comm/propal/agenda.php?id='.$object->id);
3767 3767
 
3768 3768
 		// List of actions on element
3769
-		include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
3769
+		include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
3770 3770
 		$formactions = new FormActions($db);
3771 3771
 		$somethingshown = $formactions->showactions($object, 'propal', $socid, 1, '', $MAXEVENT, '', $morehtmlcenter); // Show all action for thirdparty
3772 3772
 
@@ -3777,9 +3777,9 @@  discard block
 block discarded – undo
3777 3777
 	$modelmail = 'propal_send';
3778 3778
 	$defaulttopic = 'SendPropalRef';
3779 3779
 	$diroutput = $conf->propal->multidir_output[$object->entity ?? $conf->entity];
3780
-	$trackid = 'pro' . $object->id;
3780
+	$trackid = 'pro'.$object->id;
3781 3781
 
3782
-	include DOL_DOCUMENT_ROOT . '/core/tpl/card_presend.tpl.php';
3782
+	include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
3783 3783
 }
3784 3784
 
3785 3785
 // End of page
Please login to merge, or discard this patch.
htdocs/commande/card.php 1 patch
Spacing   +280 added lines, -280 removed lines patch added patch discarded remove patch
@@ -40,30 +40,30 @@  discard block
 block discarded – undo
40 40
 
41 41
 // Load Dolibarr environment
42 42
 require '../main.inc.php';
43
-require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
44
-require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php';
45
-require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
46
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php';
47
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formorder.class.php';
48
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formmargin.class.php';
49
-require_once DOL_DOCUMENT_ROOT . '/core/modules/commande/modules_commande.php';
50
-require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
51
-require_once DOL_DOCUMENT_ROOT . '/core/lib/order.lib.php';
52
-
53
-require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php';
54
-require_once DOL_DOCUMENT_ROOT . '/commande/class/commande.class.php';
43
+require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
44
+require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
45
+require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
46
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
47
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formorder.class.php';
48
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmargin.class.php';
49
+require_once DOL_DOCUMENT_ROOT.'/core/modules/commande/modules_commande.php';
50
+require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
51
+require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php';
52
+
53
+require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
54
+require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
55 55
 
56 56
 if (isModEnabled("propal")) {
57
-	require_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php';
57
+	require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
58 58
 }
59 59
 
60 60
 if (isModEnabled('project')) {
61
-	require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php';
62
-	require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
61
+	require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
62
+	require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
63 63
 }
64 64
 
65 65
 if (isModEnabled('variants')) {
66
-	require_once DOL_DOCUMENT_ROOT . '/variants/class/ProductCombination.class.php';
66
+	require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination.class.php';
67 67
 }
68 68
 
69 69
 
@@ -91,18 +91,18 @@  discard block
 block discarded – undo
91 91
 
92 92
 
93 93
 $id        = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('orderid'));
94
-$ref       =  GETPOST('ref', 'alpha');
95
-$socid     =  GETPOSTINT('socid');
96
-$action    =  GETPOST('action', 'aZ09');
97
-$cancel    =  GETPOST('cancel', 'alpha');
98
-$confirm   =  GETPOST('confirm', 'alpha');
94
+$ref       = GETPOST('ref', 'alpha');
95
+$socid     = GETPOSTINT('socid');
96
+$action    = GETPOST('action', 'aZ09');
97
+$cancel    = GETPOST('cancel', 'alpha');
98
+$confirm   = GETPOST('confirm', 'alpha');
99 99
 $backtopage = GETPOST('backtopage', 'alpha');
100 100
 
101
-$lineid    =  GETPOSTINT('lineid');
102
-$contactid =  GETPOSTINT('contactid');
103
-$projectid =  GETPOSTINT('projectid');
104
-$origin    =  GETPOST('origin', 'alpha');
105
-$originid  = (GETPOSTINT('originid') ? GETPOSTINT('originid') : GETPOSTINT('origin_id'));    // For backward compatibility
101
+$lineid    = GETPOSTINT('lineid');
102
+$contactid = GETPOSTINT('contactid');
103
+$projectid = GETPOSTINT('projectid');
104
+$origin    = GETPOST('origin', 'alpha');
105
+$originid  = (GETPOSTINT('originid') ? GETPOSTINT('originid') : GETPOSTINT('origin_id')); // For backward compatibility
106 106
 $rank      = (GETPOSTINT('rank') > 0) ? GETPOSTINT('rank') : -1;
107 107
 
108 108
 // Type Contact default
@@ -147,26 +147,26 @@  discard block
 block discarded – undo
147 147
 $extrafields->fetch_name_optionals_label($object->table_element);
148 148
 
149 149
 // Load object
150
-include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php';     // Must be 'include', not 'include_once'
150
+include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'
151 151
 
152 152
 // Permissions / Rights
153
-$usercanread    =  $user->hasRight("commande", "lire");
154
-$usercancreate  =  $user->hasRight("commande", "creer");
155
-$usercandelete  =  $user->hasRight("commande", "supprimer");
153
+$usercanread    = $user->hasRight("commande", "lire");
154
+$usercancreate  = $user->hasRight("commande", "creer");
155
+$usercandelete  = $user->hasRight("commande", "supprimer");
156 156
 
157 157
 // Advanced permissions
158
-$usercanclose       =  ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !empty($usercancreate)) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'close')));
159
-$usercanvalidate    =  ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $usercancreate) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'validate')));
160
-$usercancancel      =  ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $usercancreate) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'annuler')));
161
-$usercansend        =   (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('commande', 'order_advance', 'send'));
162
-$usercangeneretedoc =   (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('commande', 'order_advance', 'generetedoc'));
158
+$usercanclose       = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !empty($usercancreate)) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'close')));
159
+$usercanvalidate    = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $usercancreate) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'validate')));
160
+$usercancancel      = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $usercancreate) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'annuler')));
161
+$usercansend        = (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('commande', 'order_advance', 'send'));
162
+$usercangeneretedoc = (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('commande', 'order_advance', 'generetedoc'));
163 163
 
164 164
 $usermustrespectpricemin    = ((getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !$user->hasRight('produit', 'ignore_price_min_advance')) || !getDolGlobalString('MAIN_USE_ADVANCED_PERMS'));
165 165
 $usercancreatepurchaseorder = ($user->hasRight('fournisseur', 'commande', 'creer') || $user->hasRight('supplier_order', 'creer'));
166 166
 
167
-$permissionnote    = $usercancreate;     //  Used by the include of actions_setnotes.inc.php
168
-$permissiondellink = $usercancreate;     //  Used by the include of actions_dellink.inc.php
169
-$permissiontoadd   = $usercancreate;     //  Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
167
+$permissionnote    = $usercancreate; //  Used by the include of actions_setnotes.inc.php
168
+$permissiondellink = $usercancreate; //  Used by the include of actions_dellink.inc.php
169
+$permissiontoadd   = $usercancreate; //  Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
170 170
 $permissiontoeditextra = $usercancreate;
171 171
 if (GETPOST('attribute', 'aZ09') && isset($extrafields->attributes[$object->table_element]['perms'][GETPOST('attribute', 'aZ09')])) {
172 172
 	// For action 'update_extras', is there a specific permission set for the attribute to update
@@ -192,14 +192,14 @@  discard block
 block discarded – undo
192 192
 }
193 193
 
194 194
 if (empty($reshook)) {
195
-	$backurlforlist = DOL_URL_ROOT . '/commande/list.php';
195
+	$backurlforlist = DOL_URL_ROOT.'/commande/list.php';
196 196
 
197 197
 	if (empty($backtopage) || ($cancel && empty($id))) {
198 198
 		if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
199 199
 			if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) {
200 200
 				$backtopage = $backurlforlist;
201 201
 			} else {
202
-				$backtopage = DOL_URL_ROOT . '/commande/card.php?id=' . ((!empty($id) && $id > 0) ? $id : '__ID__');
202
+				$backtopage = DOL_URL_ROOT.'/commande/card.php?id='.((!empty($id) && $id > 0) ? $id : '__ID__');
203 203
 			}
204 204
 		}
205 205
 	}
@@ -208,20 +208,20 @@  discard block
 block discarded – undo
208 208
 
209 209
 	if ($cancel) {
210 210
 		if (!empty($backtopageforcancel)) {
211
-			header("Location: " . $backtopageforcancel);
211
+			header("Location: ".$backtopageforcancel);
212 212
 			exit;
213 213
 		} elseif (!empty($backtopage)) {
214
-			header("Location: " . $backtopage);
214
+			header("Location: ".$backtopage);
215 215
 			exit;
216 216
 		}
217 217
 		$action = '';
218 218
 	}
219 219
 
220
-	include DOL_DOCUMENT_ROOT . '/core/actions_setnotes.inc.php';    // Must be 'include', not 'include_once'
220
+	include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be 'include', not 'include_once'
221 221
 
222
-	include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php';     // Must be 'include', not 'include_once'
222
+	include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once'
223 223
 
224
-	include DOL_DOCUMENT_ROOT . '/core/actions_lineupdown.inc.php';  // Must be 'include', not 'include_once'
224
+	include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be 'include', not 'include_once'
225 225
 
226 226
 	// Action clone object
227 227
 	if ($action == 'confirm_clone' && $confirm == 'yes' && $usercancreate) {
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 						setEventMessages('', $warningMsgLineList, 'warnings');
251 251
 					}
252 252
 
253
-					header("Location: " . $_SERVER['PHP_SELF'] . '?id=' . $result);
253
+					header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result);
254 254
 					exit;
255 255
 				} else {
256 256
 					setEventMessages($object->error, $object->errors, 'errors');
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
 				$object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
310 310
 			}
311 311
 
312
-			header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
312
+			header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
313 313
 			exit;
314 314
 		} else {
315 315
 			setEventMessages($object->error, $object->errors, 'errors');
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
 				$object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
338 338
 			}
339 339
 
340
-			header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
340
+			header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
341 341
 			exit;
342 342
 		} else {
343 343
 			setEventMessages($object->error, $object->errors, 'errors');
@@ -433,14 +433,14 @@  discard block
 block discarded – undo
433 433
 					$object_id = $object->create($user);
434 434
 
435 435
 					if ($object_id > 0) {
436
-						dol_include_once('/' . $element . '/class/' . $subelement . '.class.php');
436
+						dol_include_once('/'.$element.'/class/'.$subelement.'.class.php');
437 437
 
438 438
 						$classname = ucfirst($subelement);
439 439
 						$srcobject = new $classname($db);
440 440
 						'@phan-var-force Commande|Propal|Contrat $srcobject';
441 441
 						/** @var Commande|Propal|Contrat $srcobject */
442 442
 
443
-						dol_syslog("Try to find source object origin=" . $object->origin . " originid=" . $object->origin_id . " to add lines");
443
+						dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines");
444 444
 						$result = $srcobject->fetch($object->origin_id);
445 445
 						if ($result > 0) {
446 446
 							$lines = $srcobject->lines;
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
 
492 492
 								$tva_tx = $lines[$i]->tva_tx;
493 493
 								if (!empty($lines[$i]->vat_src_code) && !preg_match('/\(/', $tva_tx)) {
494
-									$tva_tx .= ' (' . $lines[$i]->vat_src_code . ')';
494
+									$tva_tx .= ' ('.$lines[$i]->vat_src_code.')';
495 495
 								}
496 496
 
497 497
 								$result = $object->addline(
@@ -619,7 +619,7 @@  discard block
 block discarded – undo
619 619
 			// End of object creation, we show it
620 620
 			if ($object_id > 0 && !$error) {
621 621
 				$db->commit();
622
-				header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object_id);
622
+				header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object_id);
623 623
 				exit();
624 624
 			} else {
625 625
 				$db->rollback();
@@ -795,7 +795,7 @@  discard block
 block discarded – undo
795 795
 			}
796 796
 			$tvatx = $line->tva_tx;
797 797
 			if (!empty($line->vat_src_code)) {
798
-				$tvatx .= ' (' . $line->vat_src_code . ')';
798
+				$tvatx .= ' ('.$line->vat_src_code.')';
799 799
 			}
800 800
 			$result = $object->updateline($line->id, $line->desc, $line->subprice, $line->qty, (float) $remise_percent, $tvatx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->date_start, $line->date_end, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->fk_unit, $line->multicurrency_subprice);
801 801
 		}
@@ -825,7 +825,7 @@  discard block
 block discarded – undo
825 825
 				if ($prod->price_min > $line->subprice) {
826 826
 					$price_subprice = price($line->subprice, 0, $outlangs, 1, -1, -1, 'auto');
827 827
 					$price_price_min = price($prod->price_min, 0, $outlangs, 1, -1, -1, 'auto');
828
-					setEventMessages($prod->ref . ' - ' . $prod->label . ' (' . $price_subprice . ' < ' . $price_price_min . ' ' . strtolower($langs->trans("MinPrice")) . ')' . "\n", null, 'warnings');
828
+					setEventMessages($prod->ref.' - '.$prod->label.' ('.$price_subprice.' < '.$price_price_min.' '.strtolower($langs->trans("MinPrice")).')'."\n", null, 'warnings');
829 829
 				} else {
830 830
 					setEventMessages($prod->error, $prod->errors, 'errors');
831 831
 				}
@@ -900,7 +900,7 @@  discard block
 block discarded – undo
900 900
 		} else {
901 901
 			setEventMessages($object->error, $object->errors, 'errors');
902 902
 		}
903
-		header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id);
903
+		header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
904 904
 		exit();
905 905
 	} elseif ($action == 'confirm_addsubtotalline' && $usercancreate) {
906 906
 		// Handling adding a new subtotal line for subtotals module
@@ -952,7 +952,7 @@  discard block
 block discarded – undo
952 952
 		} else {
953 953
 			setEventMessages($object->error, $object->errors, 'errors');
954 954
 		}
955
-		header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id);
955
+		header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
956 956
 		exit();
957 957
 	} elseif ($action == 'addline' && !GETPOST('submitforalllines', 'alpha') && $usercancreate) {		// Add a new line
958 958
 		$langs->load('errors');
@@ -969,7 +969,7 @@  discard block
 block discarded – undo
969 969
 		$pu_ht = '';
970 970
 		$pu_ttc = '';
971 971
 		$pu_ht_devise = '';
972
-		$pu_ttc_devise  = '';
972
+		$pu_ttc_devise = '';
973 973
 
974 974
 		if (GETPOST('price_ht') !== '') {
975 975
 			$price_ht = price2num(GETPOST('price_ht'), 'MU', 2);
@@ -998,9 +998,9 @@  discard block
 block discarded – undo
998 998
 
999 999
 		$tva_tx = GETPOST('tva_tx', 'alpha');
1000 1000
 
1001
-		$qty = price2num(GETPOST('qty' . $predef, 'alpha'), 'MS', 2);
1001
+		$qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS', 2);
1002 1002
 
1003
-		$remise_percent = (GETPOSTISSET('remise_percent' . $predef) ? price2num(GETPOST('remise_percent' . $predef, 'alpha'), '', 2) : 0);
1003
+		$remise_percent = (GETPOSTISSET('remise_percent'.$predef) ? price2num(GETPOST('remise_percent'.$predef, 'alpha'), '', 2) : 0);
1004 1004
 		if (empty($remise_percent)) {
1005 1005
 			$remise_percent = 0;
1006 1006
 		}
@@ -1012,7 +1012,7 @@  discard block
 block discarded – undo
1012 1012
 		if (is_array($extralabelsline)) {
1013 1013
 			// Get extra fields
1014 1014
 			foreach ($extralabelsline as $key => $value) {
1015
-				unset($_POST["options_" . $key]);
1015
+				unset($_POST["options_".$key]);
1016 1016
 			}
1017 1017
 		}
1018 1018
 
@@ -1057,8 +1057,8 @@  discard block
 block discarded – undo
1057 1057
 
1058 1058
 		if (!$error && ($qty >= 0) && (!empty($line_desc) || (!empty($idprod) && $idprod > 0))) {
1059 1059
 			// Clean parameters
1060
-			$date_start = dol_mktime(GETPOSTINT('date_start' . $predef . 'hour'), GETPOSTINT('date_start' . $predef . 'min'), GETPOSTINT('date_start' . $predef . 'sec'), GETPOSTINT('date_start' . $predef . 'month'), GETPOSTINT('date_start' . $predef . 'day'), GETPOSTINT('date_start' . $predef . 'year'));
1061
-			$date_end = dol_mktime(GETPOSTINT('date_end' . $predef . 'hour'), GETPOSTINT('date_end' . $predef . 'min'), GETPOSTINT('date_end' . $predef . 'sec'), GETPOSTINT('date_end' . $predef . 'month'), GETPOSTINT('date_end' . $predef . 'day'), GETPOSTINT('date_end' . $predef . 'year'));
1060
+			$date_start = dol_mktime(GETPOSTINT('date_start'.$predef.'hour'), GETPOSTINT('date_start'.$predef.'min'), GETPOSTINT('date_start'.$predef.'sec'), GETPOSTINT('date_start'.$predef.'month'), GETPOSTINT('date_start'.$predef.'day'), GETPOSTINT('date_start'.$predef.'year'));
1061
+			$date_end = dol_mktime(GETPOSTINT('date_end'.$predef.'hour'), GETPOSTINT('date_end'.$predef.'min'), GETPOSTINT('date_end'.$predef.'sec'), GETPOSTINT('date_end'.$predef.'month'), GETPOSTINT('date_end'.$predef.'day'), GETPOSTINT('date_end'.$predef.'year'));
1062 1062
 			$price_base_type = (GETPOST('price_base_type', 'alpha') ? GETPOST('price_base_type', 'alpha') : 'HT');
1063 1063
 
1064 1064
 			$price_min = $price_min_ttc = 0;
@@ -1088,7 +1088,7 @@  discard block
 block discarded – undo
1088 1088
 
1089 1089
 				if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) {
1090 1090
 					// If price per customer
1091
-					require_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php';
1091
+					require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php';
1092 1092
 
1093 1093
 					$prodcustprice = new ProductCustomerPrice($db);
1094 1094
 
@@ -1110,7 +1110,7 @@  discard block
 block discarded – undo
1110 1110
 									$price_base_type = $custprice_line->price_base_type;
1111 1111
 									$tva_tx = $custprice_line->tva_tx;
1112 1112
 									if ($custprice_line->default_vat_code && !preg_match('/\(.*\)/', (string) $tva_tx)) {
1113
-										$tva_tx .= ' (' . $custprice_line->default_vat_code . ')';
1113
+										$tva_tx .= ' ('.$custprice_line->default_vat_code.')';
1114 1114
 									}
1115 1115
 									$tva_npr = $custprice_line->recuperableonly;
1116 1116
 									if (empty($tva_tx)) {
@@ -1157,7 +1157,7 @@  discard block
 block discarded – undo
1157 1157
 					}
1158 1158
 				} elseif (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) {
1159 1159
 					// If price per customer
1160
-					require_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php';
1160
+					require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php';
1161 1161
 
1162 1162
 					$prodcustprice = new ProductCustomerPrice($db);
1163 1163
 
@@ -1176,7 +1176,7 @@  discard block
 block discarded – undo
1176 1176
 									$price_base_type = $custprice_line->price_base_type;
1177 1177
 									$tva_tx = $custprice_line->tva_tx;
1178 1178
 									if ($custprice_line->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) {
1179
-										$tva_tx .= ' (' . $custprice_line->default_vat_code . ')';
1179
+										$tva_tx .= ' ('.$custprice_line->default_vat_code.')';
1180 1180
 									}
1181 1181
 									$tva_npr = $custprice_line->recuperableonly;
1182 1182
 									if (empty($tva_tx)) {
@@ -1300,23 +1300,23 @@  discard block
 block discarded – undo
1300 1300
 							$outputlangs->load('products');
1301 1301
 						}
1302 1302
 						if (!empty($prod->customcode)) {
1303
-							$tmptxt .= $outputlangs->transnoentitiesnoconv("CustomsCode") . ': ' . $prod->customcode;
1303
+							$tmptxt .= $outputlangs->transnoentitiesnoconv("CustomsCode").': '.$prod->customcode;
1304 1304
 						}
1305 1305
 						if (!empty($prod->customcode) && !empty($prod->country_code)) {
1306 1306
 							$tmptxt .= ' - ';
1307 1307
 						}
1308 1308
 						if (!empty($prod->country_code)) {
1309
-							$tmptxt .= $outputlangs->transnoentitiesnoconv("CountryOrigin") . ': ' . getCountry($prod->country_code, '', $db, $outputlangs, 0);
1309
+							$tmptxt .= $outputlangs->transnoentitiesnoconv("CountryOrigin").': '.getCountry($prod->country_code, '', $db, $outputlangs, 0);
1310 1310
 						}
1311 1311
 					} else {
1312 1312
 						if (!empty($prod->customcode)) {
1313
-							$tmptxt .= $langs->transnoentitiesnoconv("CustomsCode") . ': ' . $prod->customcode;
1313
+							$tmptxt .= $langs->transnoentitiesnoconv("CustomsCode").': '.$prod->customcode;
1314 1314
 						}
1315 1315
 						if (!empty($prod->customcode) && !empty($prod->country_code)) {
1316 1316
 							$tmptxt .= ' - ';
1317 1317
 						}
1318 1318
 						if (!empty($prod->country_code)) {
1319
-							$tmptxt .= $langs->transnoentitiesnoconv("CountryOrigin") . ': ' . getCountry($prod->country_code, '', $db, $langs, 0);
1319
+							$tmptxt .= $langs->transnoentitiesnoconv("CountryOrigin").': '.getCountry($prod->country_code, '', $db, $langs, 0);
1320 1320
 						}
1321 1321
 					}
1322 1322
 					$tmptxt .= ')';
@@ -1355,8 +1355,8 @@  discard block
 block discarded – undo
1355 1355
 			$localtax2_tx = get_localtax($tva_tx, 2, $object->thirdparty);
1356 1356
 
1357 1357
 			// Margin
1358
-			$fournprice = (int) (GETPOST('fournprice' . $predef) ? GETPOSTINT('fournprice' . $predef) : 0);	// This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only
1359
-			$buyingprice = price2num(GETPOST('buying_price' . $predef) != '' ? GETPOST('buying_price' . $predef) : ''); // If buying_price is '0', we must keep this value
1358
+			$fournprice = (int) (GETPOST('fournprice'.$predef) ? GETPOSTINT('fournprice'.$predef) : 0); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only
1359
+			$buyingprice = price2num(GETPOST('buying_price'.$predef) != '' ? GETPOST('buying_price'.$predef) : ''); // If buying_price is '0', we must keep this value
1360 1360
 
1361 1361
 			// Prepare a price equivalent for minimum price check
1362 1362
 			$pu_equivalent = $pu_ht;
@@ -1600,7 +1600,7 @@  discard block
 block discarded – undo
1600 1600
 		 */
1601 1601
 
1602 1602
 		// Add buying price
1603
-		$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
1603
+		$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
1604 1604
 		$buyingprice = price2num(GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we must keep this value
1605 1605
 
1606 1606
 		// Extrafields Lines
@@ -1609,7 +1609,7 @@  discard block
 block discarded – undo
1609 1609
 		// Unset extrafield POST Data
1610 1610
 		if (is_array($extralabelsline)) {
1611 1611
 			foreach ($extralabelsline as $key => $value) {
1612
-				unset($_POST["options_" . $key]);
1612
+				unset($_POST["options_".$key]);
1613 1613
 			}
1614 1614
 		}
1615 1615
 
@@ -1752,7 +1752,7 @@  discard block
 block discarded – undo
1752 1752
 			}
1753 1753
 		}
1754 1754
 	} elseif ($action == 'updateline' && $usercancreate && GETPOST('cancel', 'alpha')) {
1755
-		header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); //  To re-display card in edit mode
1755
+		header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); //  To re-display card in edit mode
1756 1756
 		exit();
1757 1757
 	} elseif ($action == 'confirm_validate' && $confirm == 'yes' && $usercanvalidate) {
1758 1758
 		$idwarehouse = GETPOSTINT('idwarehouse');
@@ -1789,7 +1789,7 @@  discard block
 block discarded – undo
1789 1789
 					GETPOST('generate_deposit', 'alpha') == 'on' && !empty($deposit_percent_from_payment_terms)
1790 1790
 					&& isModEnabled('invoice') && $user->hasRight('facture', 'creer')
1791 1791
 				) {
1792
-					require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
1792
+					require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
1793 1793
 
1794 1794
 					$date = dol_mktime(0, 0, 0, GETPOSTINT('datefmonth'), GETPOSTINT('datefday'), GETPOSTINT('datefyear'));
1795 1795
 					$forceFields = array();
@@ -1802,7 +1802,7 @@  discard block
 block discarded – undo
1802 1802
 
1803 1803
 					if ($deposit) {
1804 1804
 						setEventMessage('DepositGenerated');
1805
-						$locationTarget = DOL_URL_ROOT . '/compta/facture/card.php?id=' . $deposit->id;
1805
+						$locationTarget = DOL_URL_ROOT.'/compta/facture/card.php?id='.$deposit->id;
1806 1806
 					} else {
1807 1807
 						$error++;
1808 1808
 						setEventMessages($object->error, $object->errors, 'errors');
@@ -1810,7 +1810,7 @@  discard block
 block discarded – undo
1810 1810
 				}
1811 1811
 
1812 1812
 				// Define output language
1813
-				if (! $error) {
1813
+				if (!$error) {
1814 1814
 					$db->commit();
1815 1815
 
1816 1816
 					if (!getDolGlobalString('MAIN_DISABLE_PDF_AUTOUPDATE')) {
@@ -1838,7 +1838,7 @@  discard block
 block discarded – undo
1838 1838
 					}
1839 1839
 
1840 1840
 					if ($locationTarget) {
1841
-						header('Location: ' . $locationTarget);
1841
+						header('Location: '.$locationTarget);
1842 1842
 						exit;
1843 1843
 					}
1844 1844
 				} else {
@@ -1929,7 +1929,7 @@  discard block
 block discarded – undo
1929 1929
 	}
1930 1930
 
1931 1931
 	if ($action == 'update_extras' && $permissiontoeditextra) {
1932
-		$object->oldcopy = dol_clone($object, 2);  // @phan-suppress-current-line PhanTypeMismatchProperty
1932
+		$object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty
1933 1933
 
1934 1934
 		$attribute_name = GETPOST('attribute', 'aZ09');
1935 1935
 
@@ -1961,13 +1961,13 @@  discard block
 block discarded – undo
1961 1961
 
1962 1962
 		if (!empty($importLines) && is_array($importLines) && !empty($fromElement) && ctype_alpha($fromElement) && !empty($fromElementid)) {
1963 1963
 			if ($fromElement == 'commande') {
1964
-				dol_include_once('/' . $fromElement . '/class/' . $fromElement . '.class.php');
1964
+				dol_include_once('/'.$fromElement.'/class/'.$fromElement.'.class.php');
1965 1965
 				$lineClassName = 'OrderLine';
1966 1966
 			} elseif ($fromElement == 'propal') {
1967
-				dol_include_once('/comm/' . $fromElement . '/class/' . $fromElement . '.class.php');
1967
+				dol_include_once('/comm/'.$fromElement.'/class/'.$fromElement.'.class.php');
1968 1968
 				$lineClassName = 'PropaleLigne';
1969 1969
 			} elseif ($fromElement == 'facture') {
1970
-				dol_include_once('/compta/' . $fromElement . '/class/' . $fromElement . '.class.php');
1970
+				dol_include_once('/compta/'.$fromElement.'/class/'.$fromElement.'.class.php');
1971 1971
 				$lineClassName = 'FactureLigne';
1972 1972
 			}
1973 1973
 			$nextRang = count($object->lines) + 1;
@@ -2027,19 +2027,19 @@  discard block
 block discarded – undo
2027 2027
 	}
2028 2028
 
2029 2029
 	// Actions when printing a doc from card
2030
-	include DOL_DOCUMENT_ROOT . '/core/actions_printing.inc.php';
2030
+	include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
2031 2031
 
2032 2032
 	// Actions to build doc
2033 2033
 	$upload_dir = !empty($conf->commande->multidir_output[$object->entity ?? $conf->entity]) ? $conf->commande->multidir_output[$object->entity ?? $conf->entity] : $conf->commande->dir_output;
2034 2034
 	$permissiontoadd = $usercancreate;
2035
-	include DOL_DOCUMENT_ROOT . '/core/actions_builddoc.inc.php';
2035
+	include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
2036 2036
 
2037 2037
 	// Actions to send emails
2038 2038
 	$triggersendname = 'ORDER_SENTBYMAIL';
2039 2039
 	$paramname = 'id';
2040 2040
 	$autocopy = 'MAIN_MAIL_AUTOCOPY_ORDER_TO'; // used to know the automatic BCC to add
2041
-	$trackid = 'ord' . $object->id;
2042
-	include DOL_DOCUMENT_ROOT . '/core/actions_sendmails.inc.php';
2041
+	$trackid = 'ord'.$object->id;
2042
+	include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
2043 2043
 
2044 2044
 
2045 2045
 	if (!$error && getDolGlobalString('MAIN_DISABLE_CONTACTS_TAB') && $usercancreate) {
@@ -2051,7 +2051,7 @@  discard block
 block discarded – undo
2051 2051
 			}
2052 2052
 
2053 2053
 			if ($result >= 0) {
2054
-				header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id);
2054
+				header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
2055 2055
 				exit();
2056 2056
 			} else {
2057 2057
 				if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
@@ -2073,7 +2073,7 @@  discard block
 block discarded – undo
2073 2073
 			$result = $object->delete_contact($lineid);
2074 2074
 
2075 2075
 			if ($result >= 0) {
2076
-				header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id);
2076
+				header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
2077 2077
 				exit();
2078 2078
 			} else {
2079 2079
 				dol_print_error($db);
@@ -2087,7 +2087,7 @@  discard block
 block discarded – undo
2087 2087
  *	View
2088 2088
  */
2089 2089
 
2090
-$title = $object->ref . " - " . $langs->trans('Card');
2090
+$title = $object->ref." - ".$langs->trans('Card');
2091 2091
 if ($action == 'create') {
2092 2092
 	$title = $langs->trans("NewOrder");
2093 2093
 }
@@ -2160,11 +2160,11 @@  discard block
 block discarded – undo
2160 2160
 				$element = $subelement = 'contrat';
2161 2161
 			}
2162 2162
 
2163
-			dol_include_once('/' . $element . '/class/' . $subelement . '.class.php');
2163
+			dol_include_once('/'.$element.'/class/'.$subelement.'.class.php');
2164 2164
 
2165 2165
 			$classname = ucfirst($subelement);
2166 2166
 			$objectsrc = new $classname($db);
2167
-			'@phan-var-force Commande|Propal|Contrat $objectsrc';  // Can possibly be other class but CommonObject is too general
2167
+			'@phan-var-force Commande|Propal|Contrat $objectsrc'; // Can possibly be other class but CommonObject is too general
2168 2168
 			$objectsrc->fetch($originid);
2169 2169
 			if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) {
2170 2170
 				$objectsrc->fetch_lines();
@@ -2258,16 +2258,16 @@  discard block
 block discarded – undo
2258 2258
 		}
2259 2259
 	}
2260 2260
 
2261
-	print '<form name="crea_commande" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
2262
-	print '<input type="hidden" name="token" value="' . newToken() . '">';
2261
+	print '<form name="crea_commande" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
2262
+	print '<input type="hidden" name="token" value="'.newToken().'">';
2263 2263
 	print '<input type="hidden" name="action" value="add">';
2264
-	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
2265
-	print '<input type="hidden" name="remise_percent" value="' . $soc->remise_percent . '">';
2266
-	print '<input type="hidden" name="origin" value="' . $origin . '">';
2267
-	print '<input type="hidden" name="originid" value="' . $originid . '">';
2268
-	print '<input type="hidden" name="backtopage" value="' . $backtopage . '">';
2264
+	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
2265
+	print '<input type="hidden" name="remise_percent" value="'.$soc->remise_percent.'">';
2266
+	print '<input type="hidden" name="origin" value="'.$origin.'">';
2267
+	print '<input type="hidden" name="originid" value="'.$originid.'">';
2268
+	print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
2269 2269
 	if (!empty($currency_tx)) {
2270
-		print '<input type="hidden" name="originmulticurrency_tx" value="' . $currency_tx . '">';
2270
+		print '<input type="hidden" name="originmulticurrency_tx" value="'.$currency_tx.'">';
2271 2271
 	}
2272 2272
 
2273 2273
 	print dol_get_fiche_head([]);
@@ -2280,29 +2280,29 @@  discard block
 block discarded – undo
2280 2280
 		print '<table class="border centpercent">';
2281 2281
 
2282 2282
 		// Reference
2283
-		print '<tr><td class="titlefieldcreate fieldrequired">' . $langs->trans('Ref') . '</td><td>' . $langs->trans("Draft") . '</td></tr>';
2283
+		print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans('Ref').'</td><td>'.$langs->trans("Draft").'</td></tr>';
2284 2284
 
2285 2285
 		// Reference client
2286
-		print '<tr><td>' . $langs->trans('RefCustomer') . '</td><td>';
2286
+		print '<tr><td>'.$langs->trans('RefCustomer').'</td><td>';
2287 2287
 		if (getDolGlobalString('MAIN_USE_PROPAL_REFCLIENT_FOR_ORDER') && !empty($origin) && !empty($originid)) {
2288
-			print '<input type="text" name="ref_client" value="' . $ref_client . '"></td>';
2288
+			print '<input type="text" name="ref_client" value="'.$ref_client.'"></td>';
2289 2289
 		} else {
2290
-			print '<input type="text" name="ref_client" value="' . GETPOST('ref_client') . '"></td>';
2290
+			print '<input type="text" name="ref_client" value="'.GETPOST('ref_client').'"></td>';
2291 2291
 		}
2292 2292
 		print '</tr>';
2293 2293
 
2294 2294
 		// Thirdparty
2295 2295
 		print '<tr>';
2296
-		print '<td class="fieldrequired">' . $langs->trans('Customer') . '</td>';
2296
+		print '<td class="fieldrequired">'.$langs->trans('Customer').'</td>';
2297 2297
 		if ($socid > 0) {
2298 2298
 			print '<td>';
2299 2299
 			print $soc->getNomUrl(1, 'customer');
2300
-			print '<input type="hidden" name="socid" value="' . $soc->id . '">';
2300
+			print '<input type="hidden" name="socid" value="'.$soc->id.'">';
2301 2301
 			print '</td>';
2302 2302
 		} else {
2303 2303
 			print '<td class="valuefieldcreate">';
2304 2304
 			$filter = '((s.client:IN:1,2,3) AND (s.status:=:1))';
2305
-			print img_picto('', 'company', 'class="pictofixedwidth"') . $form->select_company('', 'socid', $filter, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth175 maxwidth500 widthcentpercentminusxx');
2305
+			print img_picto('', 'company', 'class="pictofixedwidth"').$form->select_company('', 'socid', $filter, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth175 maxwidth500 widthcentpercentminusxx');
2306 2306
 			// reload page to retrieve customer information
2307 2307
 			if (!getDolGlobalString('RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED')) {
2308 2308
 				print '<script>
@@ -2318,17 +2318,17 @@  discard block
 block discarded – undo
2318 2318
 				});
2319 2319
 				</script>';
2320 2320
 			}
2321
-			print ' <a href="' . DOL_URL_ROOT . '/societe/card.php?action=create&customer=3&fournisseur=0&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?action=create') . '"><span class="fa fa-plus-circle valignmiddle paddingleft" title="' . $langs->trans("AddThirdParty") . '"></span></a>';
2321
+			print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&customer=3&fournisseur=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddThirdParty").'"></span></a>';
2322 2322
 			print '</td>';
2323 2323
 		}
2324
-		print '</tr>' . "\n";
2324
+		print '</tr>'."\n";
2325 2325
 
2326 2326
 		// Contact of order
2327 2327
 		if ($socid > 0) {
2328 2328
 			// Contacts (ask contact only if thirdparty already defined).
2329 2329
 			// print "<tr><td>".$langs->trans("DefaultContact").'</td><td>';
2330 2330
 			print "<tr><td>";
2331
-			print $form->textwithpicto($langs->trans("DefaultContact"), $langs->trans("TypeContact_commande_external_" . $type_contact_code));
2331
+			print $form->textwithpicto($langs->trans("DefaultContact"), $langs->trans("TypeContact_commande_external_".$type_contact_code));
2332 2332
 			print '</td><td>';
2333 2333
 			print img_picto('', 'contact', 'class="pictofixedwidth"');
2334 2334
 			//print $form->selectcontacts($soc->id, $contactid, 'contactid', 1, empty($srccontactslist) ? "" : $srccontactslist, '', 1, 'maxwidth300 widthcentpercentminusx');
@@ -2336,26 +2336,26 @@  discard block
 block discarded – undo
2336 2336
 			print '</td></tr>';
2337 2337
 
2338 2338
 			// Ligne info remises tiers
2339
-			print '<tr><td>' . $langs->trans('Discounts') . '</td><td>';
2339
+			print '<tr><td>'.$langs->trans('Discounts').'</td><td>';
2340 2340
 
2341 2341
 			$absolute_discount = $soc->getAvailableDiscounts();
2342 2342
 
2343 2343
 			$thirdparty = $soc;
2344 2344
 			$discount_type = 0;
2345
-			$backtopage = $_SERVER["PHP_SELF"] . '?socid=' . $thirdparty->id . '&action=' . $action . '&origin=' . urlencode((string) (GETPOST('origin'))) . '&originid=' . urlencode((string) (GETPOSTINT('originid')));
2346
-			include DOL_DOCUMENT_ROOT . '/core/tpl/object_discounts.tpl.php';
2345
+			$backtopage = $_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.urlencode((string) (GETPOST('origin'))).'&originid='.urlencode((string) (GETPOSTINT('originid')));
2346
+			include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php';
2347 2347
 
2348 2348
 			print '</td></tr>';
2349 2349
 		}
2350 2350
 
2351 2351
 		// Date
2352
-		print '<tr><td class="fieldrequired">' . $langs->trans('Date') . '</td><td>';
2352
+		print '<tr><td class="fieldrequired">'.$langs->trans('Date').'</td><td>';
2353 2353
 		print img_picto('', 'action', 'class="pictofixedwidth"');
2354 2354
 		print $form->selectDate('', 're', 0, 0, 0, "crea_commande", 1, 1); // Always autofill date with current date
2355 2355
 		print '</td></tr>';
2356 2356
 
2357 2357
 		// Date delivery planned
2358
-		print '<tr><td>' . $langs->trans("DateDeliveryPlanned") . '</td>';
2358
+		print '<tr><td>'.$langs->trans("DateDeliveryPlanned").'</td>';
2359 2359
 		print '<td colspan="3">';
2360 2360
 		$date_delivery = ($date_delivery ? $date_delivery : $object->delivery_date);
2361 2361
 		print img_picto('', 'action', 'class="pictofixedwidth"');
@@ -2364,33 +2364,33 @@  discard block
 block discarded – undo
2364 2364
 		print '</tr>';
2365 2365
 
2366 2366
 		// Delivery delay
2367
-		print '<tr class="fielddeliverydelay"><td>' . $langs->trans('AvailabilityPeriod') . '</td><td>';
2367
+		print '<tr class="fielddeliverydelay"><td>'.$langs->trans('AvailabilityPeriod').'</td><td>';
2368 2368
 		print img_picto('', 'clock', 'class="pictofixedwidth"');
2369 2369
 		$form->selectAvailabilityDelay((GETPOSTISSET('availability_id') ? GETPOST('availability_id') : $availability_id), 'availability_id', '', 1, 'maxwidth200 widthcentpercentminusx');
2370 2370
 		print '</td></tr>';
2371 2371
 
2372 2372
 		// Terms of payment
2373
-		print '<tr><td class="nowrap">' . $langs->trans('PaymentConditionsShort') . '</td><td>';
2373
+		print '<tr><td class="nowrap">'.$langs->trans('PaymentConditionsShort').'</td><td>';
2374 2374
 		print img_picto('', 'payment', 'class="pictofixedwidth"');
2375 2375
 		print $form->getSelectConditionsPaiements((int) $cond_reglement_id, 'cond_reglement_id', 1, 1, 0, 'maxwidth200 widthcentpercentminusx', (float) $deposit_percent);
2376 2376
 		print '</td></tr>';
2377 2377
 
2378 2378
 		// Payment mode
2379
-		print '<tr><td>' . $langs->trans('PaymentMode') . '</td><td>';
2379
+		print '<tr><td>'.$langs->trans('PaymentMode').'</td><td>';
2380 2380
 		print img_picto('', 'bank', 'class="pictofixedwidth"');
2381 2381
 		print $form->select_types_paiements((string) $mode_reglement_id, 'mode_reglement_id', 'CRDT', 0, 1, 0, 0, 1, 'maxwidth200 widthcentpercentminusx', 1);
2382 2382
 		print '</td></tr>';
2383 2383
 
2384 2384
 		// Bank Account
2385 2385
 		if (getDolGlobalString('BANK_ASK_PAYMENT_BANK_DURING_ORDER') && isModEnabled("bank")) {
2386
-			print '<tr><td>' . $langs->trans('BankAccount') . '</td><td>';
2387
-			print img_picto('', 'bank_account', 'class="pictofixedwidth"') . $form->select_comptes((int) $fk_account, 'fk_account', 0, '', 1, '', 0, 'maxwidth200 widthcentpercentminusx', 1);
2386
+			print '<tr><td>'.$langs->trans('BankAccount').'</td><td>';
2387
+			print img_picto('', 'bank_account', 'class="pictofixedwidth"').$form->select_comptes((int) $fk_account, 'fk_account', 0, '', 1, '', 0, 'maxwidth200 widthcentpercentminusx', 1);
2388 2388
 			print '</td></tr>';
2389 2389
 		}
2390 2390
 
2391 2391
 		// Shipping Method
2392 2392
 		if (isModEnabled('shipping')) {
2393
-			print '<tr><td>' . $langs->trans('SendingMethod') . '</td><td>';
2393
+			print '<tr><td>'.$langs->trans('SendingMethod').'</td><td>';
2394 2394
 			print img_picto('', 'object_dolly', 'class="pictofixedwidth"');
2395 2395
 			$form->selectShippingMethod(((GETPOSTISSET('shipping_method_id') && GETPOSTINT('shipping_method_id') != 0) ? GETPOST('shipping_method_id') : $shipping_method_id), 'shipping_method_id', '', 1, '', 0, 'maxwidth200 widthcentpercentminusx');
2396 2396
 			print '</td></tr>';
@@ -2398,15 +2398,15 @@  discard block
 block discarded – undo
2398 2398
 
2399 2399
 		// Warehouse
2400 2400
 		if (isModEnabled('stock') && getDolGlobalString('WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER')) {
2401
-			require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
2401
+			require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
2402 2402
 			$formproduct = new FormProduct($db);
2403
-			print '<tr><td>' . $langs->trans('Warehouse') . '</td><td>';
2404
-			print img_picto('', 'stock', 'class="pictofixedwidth"') . $formproduct->selectWarehouses((GETPOSTISSET('warehouse_id') ? GETPOST('warehouse_id') : $warehouse_id), 'warehouse_id', '', 1, 0, 0, '', 0, 0, array(), 'maxwidth500 widthcentpercentminusxx');
2403
+			print '<tr><td>'.$langs->trans('Warehouse').'</td><td>';
2404
+			print img_picto('', 'stock', 'class="pictofixedwidth"').$formproduct->selectWarehouses((GETPOSTISSET('warehouse_id') ? GETPOST('warehouse_id') : $warehouse_id), 'warehouse_id', '', 1, 0, 0, '', 0, 0, array(), 'maxwidth500 widthcentpercentminusxx');
2405 2405
 			print '</td></tr>';
2406 2406
 		}
2407 2407
 
2408 2408
 		// Source / Channel - What trigger creation
2409
-		print '<tr><td>' . $langs->trans('Source') . '</td><td>';
2409
+		print '<tr><td>'.$langs->trans('Source').'</td><td>';
2410 2410
 		print img_picto('', 'question', 'class="pictofixedwidth"');
2411 2411
 		$form->selectInputReason((GETPOSTISSET('demand_reason_id') ? GETPOST('demand_reason_id') : $demand_reason_id), 'demand_reason_id', '', 1, 'maxwidth200 widthcentpercentminusx');
2412 2412
 		print '</td></tr>';
@@ -2418,7 +2418,7 @@  discard block
 block discarded – undo
2418 2418
 			$langs->load("projects");
2419 2419
 			print '<tr>';
2420 2420
 			print '<td>'.$langs->trans("Project").'</td><td>';
2421
-			print img_picto('', 'project', 'class="pictofixedwidth"').$formproject->select_projects((($soc->id > 0  && !getDolGlobalString('PROJECT_CAN_ALWAYS_LINK_TO_ALL_CUSTOMERS')) ? $soc->id : -1), (GETPOSTISSET('projectid') ? GETPOST('projectid') : $projectid), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500 widthcentpercentminusxx');
2421
+			print img_picto('', 'project', 'class="pictofixedwidth"').$formproject->select_projects((($soc->id > 0 && !getDolGlobalString('PROJECT_CAN_ALWAYS_LINK_TO_ALL_CUSTOMERS')) ? $soc->id : -1), (GETPOSTISSET('projectid') ? GETPOST('projectid') : $projectid), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500 widthcentpercentminusxx');
2422 2422
 			print ' <a 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" title="'.$langs->trans("AddProject").'"></span></a>';
2423 2423
 			print '</td>';
2424 2424
 			print '</tr>';
@@ -2427,7 +2427,7 @@  discard block
 block discarded – undo
2427 2427
 		// Incoterms
2428 2428
 		if (isModEnabled('incoterm')) {
2429 2429
 			print '<tr>';
2430
-			print '<td><label for="incoterm_id">' . $form->textwithpicto($langs->trans("IncotermLabel"), !empty($objectsrc->fk_incoterms) ? (string) $objectsrc->fk_incoterms : (string) $soc->fk_incoterms, 1) . '</label></td>';
2430
+			print '<td><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), !empty($objectsrc->fk_incoterms) ? (string) $objectsrc->fk_incoterms : (string) $soc->fk_incoterms, 1).'</label></td>';
2431 2431
 			print '<td class="maxwidthonsmartphone">';
2432 2432
 			$incoterm_id = GETPOST('incoterm_id');
2433 2433
 			$location_incoterms = GETPOST('location_incoterms');
@@ -2443,7 +2443,7 @@  discard block
 block discarded – undo
2443 2443
 		// Other attributes
2444 2444
 		$parameters = array();
2445 2445
 		if (!empty($origin) && !empty($originid) && is_object($objectsrc)) {
2446
-			$parameters['objectsrc'] =  $objectsrc;
2446
+			$parameters['objectsrc'] = $objectsrc;
2447 2447
 		}
2448 2448
 		$parameters['socid'] = $socid;
2449 2449
 
@@ -2464,9 +2464,9 @@  discard block
 block discarded – undo
2464 2464
 		}
2465 2465
 
2466 2466
 		// Template to use by default
2467
-		print '<tr><td>' . $langs->trans('DefaultModel') . '</td>';
2467
+		print '<tr><td>'.$langs->trans('DefaultModel').'</td>';
2468 2468
 		print '<td>';
2469
-		include_once DOL_DOCUMENT_ROOT . '/core/modules/commande/modules_commande.php';
2469
+		include_once DOL_DOCUMENT_ROOT.'/core/modules/commande/modules_commande.php';
2470 2470
 		$liste = ModelePDFCommandes::liste_modeles($db);
2471 2471
 		$preselected = getDolGlobalString('COMMANDE_ADDON_PDF');
2472 2472
 		print img_picto('', 'pdf', 'class="pictofixedwidth"');
@@ -2476,22 +2476,22 @@  discard block
 block discarded – undo
2476 2476
 		// Multicurrency
2477 2477
 		if (isModEnabled("multicurrency")) {
2478 2478
 			print '<tr>';
2479
-			print '<td>' . $form->editfieldkey("Currency", 'multicurrency_code', '', $object, 0) . '</td>';
2479
+			print '<td>'.$form->editfieldkey("Currency", 'multicurrency_code', '', $object, 0).'</td>';
2480 2480
 			print '<td class="maxwidthonsmartphone">';
2481
-			print img_picto('', 'currency', 'class="pictofixedwidth"') . $form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany')) ? GETPOST('multicurrency_code') : $currency_code), 'multicurrency_code', 0, '', false, 'maxwidth200 widthcentpercentminusx');
2481
+			print img_picto('', 'currency', 'class="pictofixedwidth"').$form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany')) ? GETPOST('multicurrency_code') : $currency_code), 'multicurrency_code', 0, '', false, 'maxwidth200 widthcentpercentminusx');
2482 2482
 			print '</td></tr>';
2483 2483
 		}
2484 2484
 
2485 2485
 		// Categories
2486 2486
 		if (isModEnabled('category')) {
2487
-			print '<tr><td>' . $langs->trans("Categories") . '</td><td colspan="3">';
2487
+			print '<tr><td>'.$langs->trans("Categories").'</td><td colspan="3">';
2488 2488
 			print $form->selectCategories(Categorie::TYPE_ORDER, 'categories', $object);
2489 2489
 			print "</td></tr>";
2490 2490
 		}
2491 2491
 
2492 2492
 		// Note public
2493 2493
 		print '<tr>';
2494
-		print '<td class="tdtop">' . $langs->trans('NotePublic') . '</td>';
2494
+		print '<td class="tdtop">'.$langs->trans('NotePublic').'</td>';
2495 2495
 		print '<td>';
2496 2496
 
2497 2497
 		$doleditor = new DolEditor('note_public', (string) $note_public, '', 80, 'dolibarr_notes', 'In', false, false, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PUBLIC') ? 0 : 1, ROWS_3, '90%');
@@ -2502,7 +2502,7 @@  discard block
 block discarded – undo
2502 2502
 		// Note private
2503 2503
 		if (empty($user->socid)) {
2504 2504
 			print '<tr>';
2505
-			print '<td class="tdtop">' . $langs->trans('NotePrivate') . '</td>';
2505
+			print '<td class="tdtop">'.$langs->trans('NotePrivate').'</td>';
2506 2506
 			print '<td>';
2507 2507
 
2508 2508
 			$doleditor = new DolEditor('note_private', (string) $note_private, '', 80, 'dolibarr_notes', 'In', false, false, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PRIVATE') ? 0 : 1, ROWS_3, '90%');
@@ -2520,12 +2520,12 @@  discard block
 block discarded – undo
2520 2520
 				$objectsrc->update_price(1);
2521 2521
 			}
2522 2522
 
2523
-			print "\n<!-- " . $classname . " info -->\n";
2524
-			print '<input type="hidden" name="amount"   value="' . $objectsrc->total_ht . '">' . "\n";
2525
-			print '<input type="hidden" name="total"    value="' . $objectsrc->total_ttc . '">' . "\n";
2526
-			print '<input type="hidden" name="tva"      value="' . $objectsrc->total_tva . '">' . "\n";
2527
-			print '<input type="hidden" name="origin"   value="' . $objectsrc->element . '">';
2528
-			print '<input type="hidden" name="originid" value="' . $objectsrc->id . '">';
2523
+			print "\n<!-- ".$classname." info -->\n";
2524
+			print '<input type="hidden" name="amount"   value="'.$objectsrc->total_ht.'">'."\n";
2525
+			print '<input type="hidden" name="total"    value="'.$objectsrc->total_ttc.'">'."\n";
2526
+			print '<input type="hidden" name="tva"      value="'.$objectsrc->total_tva.'">'."\n";
2527
+			print '<input type="hidden" name="origin"   value="'.$objectsrc->element.'">';
2528
+			print '<input type="hidden" name="originid" value="'.$objectsrc->id.'">';
2529 2529
 
2530 2530
 			switch ($classname) {
2531 2531
 				case 'Propal':
@@ -2544,25 +2544,25 @@  discard block
 block discarded – undo
2544 2544
 					$newclassname = $classname;
2545 2545
 			}
2546 2546
 
2547
-			print '<tr><td>' . $langs->trans($newclassname) . '</td><td>' . $objectsrc->getNomUrl(1) . '</td></tr>';
2547
+			print '<tr><td>'.$langs->trans($newclassname).'</td><td>'.$objectsrc->getNomUrl(1).'</td></tr>';
2548 2548
 
2549 2549
 			// Amount
2550
-			print '<tr><td>' . $langs->trans('AmountHT') . '</td><td>' . price($objectsrc->total_ht) . '</td></tr>';
2551
-			print '<tr><td>' . $langs->trans('AmountVAT') . '</td><td>' . price($objectsrc->total_tva) . "</td></tr>";
2550
+			print '<tr><td>'.$langs->trans('AmountHT').'</td><td>'.price($objectsrc->total_ht).'</td></tr>';
2551
+			print '<tr><td>'.$langs->trans('AmountVAT').'</td><td>'.price($objectsrc->total_tva)."</td></tr>";
2552 2552
 			if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) { 		// Localtax1 RE
2553
-				print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td><td>' . price($objectsrc->total_localtax1) . "</td></tr>";
2553
+				print '<tr><td>'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td><td>'.price($objectsrc->total_localtax1)."</td></tr>";
2554 2554
 			}
2555 2555
 
2556 2556
 			if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) { 		// Localtax2 IRPF
2557
-				print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td><td>' . price($objectsrc->total_localtax2) . "</td></tr>";
2557
+				print '<tr><td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td><td>'.price($objectsrc->total_localtax2)."</td></tr>";
2558 2558
 			}
2559 2559
 
2560
-			print '<tr><td>' . $langs->trans('AmountTTC') . '</td><td>' . price($objectsrc->total_ttc) . "</td></tr>";
2560
+			print '<tr><td>'.$langs->trans('AmountTTC').'</td><td>'.price($objectsrc->total_ttc)."</td></tr>";
2561 2561
 
2562 2562
 			if (isModEnabled("multicurrency")) {
2563
-				print '<tr><td>' . $langs->trans('MulticurrencyAmountHT') . '</td><td>' . price($objectsrc->multicurrency_total_ht) . '</td></tr>';
2564
-				print '<tr><td>' . $langs->trans('MulticurrencyAmountVAT') . '</td><td>' . price($objectsrc->multicurrency_total_tva) . "</td></tr>";
2565
-				print '<tr><td>' . $langs->trans('MulticurrencyAmountTTC') . '</td><td>' . price($objectsrc->multicurrency_total_ttc) . "</td></tr>";
2563
+				print '<tr><td>'.$langs->trans('MulticurrencyAmountHT').'</td><td>'.price($objectsrc->multicurrency_total_ht).'</td></tr>';
2564
+				print '<tr><td>'.$langs->trans('MulticurrencyAmountVAT').'</td><td>'.price($objectsrc->multicurrency_total_tva)."</td></tr>";
2565
+				print '<tr><td>'.$langs->trans('MulticurrencyAmountTTC').'</td><td>'.price($objectsrc->multicurrency_total_ttc)."</td></tr>";
2566 2566
 			}
2567 2567
 		}
2568 2568
 
@@ -2613,7 +2613,7 @@  discard block
 block discarded – undo
2613 2613
 
2614 2614
 		// Confirmation to delete
2615 2615
 		if ($action == 'delete') {
2616
-			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 1);
2616
+			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 1);
2617 2617
 		}
2618 2618
 
2619 2619
 		// Confirmation of validation
@@ -2632,7 +2632,7 @@  discard block
 block discarded – undo
2632 2632
 
2633 2633
 			$text = $langs->trans('ConfirmValidateOrder', $numref);
2634 2634
 			if (isModEnabled('notification')) {
2635
-				require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
2635
+				require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
2636 2636
 				$notify = new Notify($db);
2637 2637
 				$text .= '<br>';
2638 2638
 				$text .= $notify->confirmMessage('ORDER_VALIDATE', $object->socid, $object);
@@ -2648,7 +2648,7 @@  discard block
 block discarded – undo
2648 2648
 			$formquestion = array();
2649 2649
 			if (isModEnabled('stock') && getDolGlobalString('STOCK_CALCULATE_ON_VALIDATE_ORDER') && $qualified_for_stock_change) {
2650 2650
 				$langs->load("stocks");
2651
-				require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
2651
+				require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
2652 2652
 				$formproduct = new FormProduct($db);
2653 2653
 				$forcecombo = 0;
2654 2654
 				if ($conf->browser->name == 'ie') {
@@ -2666,7 +2666,7 @@  discard block
 block discarded – undo
2666 2666
 			$nbMandated = 0;
2667 2667
 			foreach ($object->lines as $line) {
2668 2668
 				$res = $line->fetch_product();
2669
-				if ($res  > 0) {
2669
+				if ($res > 0) {
2670 2670
 					if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) {
2671 2671
 						$nbMandated++;
2672 2672
 						break;
@@ -2678,7 +2678,7 @@  discard block
 block discarded – undo
2678 2678
 					setEventMessages($langs->trans("mandatoryPeriodNeedTobeSetMsgValidate"), null, 'errors');
2679 2679
 					$error++;
2680 2680
 				} else {
2681
-					$text .= '<div><span class="clearboth nowraponall warning">' . img_warning() . $langs->trans("mandatoryPeriodNeedTobeSetMsgValidate") . '</span></div>';
2681
+					$text .= '<div><span class="clearboth nowraponall warning">'.img_warning().$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>';
2682 2682
 				}
2683 2683
 			}
2684 2684
 
@@ -2690,7 +2690,7 @@  discard block
 block discarded – undo
2690 2690
 				$deposit_percent_from_payment_terms = (float) getDictionaryValue('c_payment_term', 'deposit_percent', $object->cond_reglement_id);
2691 2691
 
2692 2692
 				if (!empty($deposit_percent_from_payment_terms) && isModEnabled('invoice') && $user->hasRight('facture', 'creer')) {
2693
-					require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
2693
+					require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
2694 2694
 
2695 2695
 					$object->fetchObjectLinked();
2696 2696
 
@@ -2793,7 +2793,7 @@  discard block
 block discarded – undo
2793 2793
 			}
2794 2794
 
2795 2795
 			if (!$error) {
2796
-				$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateOrder'), $text, 'confirm_validate', $formquestion, 0, 1, 240);
2796
+				$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateOrder'), $text, 'confirm_validate', $formquestion, 0, 1, 240);
2797 2797
 			}
2798 2798
 		}
2799 2799
 
@@ -2810,7 +2810,7 @@  discard block
 block discarded – undo
2810 2810
 			$formquestion = array();
2811 2811
 			if (isModEnabled('stock') && getDolGlobalString('STOCK_CALCULATE_ON_VALIDATE_ORDER') && $qualified_for_stock_change) {
2812 2812
 				$langs->load("stocks");
2813
-				require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
2813
+				require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
2814 2814
 				$formproduct = new FormProduct($db);
2815 2815
 				$forcecombo = 0;
2816 2816
 				if ($conf->browser->name == 'ie') {
@@ -2829,12 +2829,12 @@  discard block
 block discarded – undo
2829 2829
 				];
2830 2830
 			}
2831 2831
 
2832
-			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('UnvalidateOrder'), $text, 'confirm_modif', $formquestion, "yes", 1, 220);
2832
+			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('UnvalidateOrder'), $text, 'confirm_modif', $formquestion, "yes", 1, 220);
2833 2833
 		}
2834 2834
 
2835 2835
 		// Confirmation of closing
2836 2836
 		if ($action == 'shipped') {
2837
-			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloseOrder'), $langs->trans('ConfirmCloseOrder'), 'confirm_shipped', '', 0, 1);
2837
+			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('CloseOrder'), $langs->trans('ConfirmCloseOrder'), 'confirm_shipped', '', 0, 1);
2838 2838
 		}
2839 2839
 
2840 2840
 		// Confirmation of cancellation
@@ -2850,7 +2850,7 @@  discard block
 block discarded – undo
2850 2850
 			$formquestion = array();
2851 2851
 			if (isModEnabled('stock') && getDolGlobalString('STOCK_CALCULATE_ON_VALIDATE_ORDER') && $qualified_for_stock_change) {
2852 2852
 				$langs->load("stocks");
2853
-				require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
2853
+				require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
2854 2854
 				$formproduct = new FormProduct($db);
2855 2855
 				$forcecombo = 0;
2856 2856
 				if ($conf->browser->name == 'ie') {
@@ -2864,12 +2864,12 @@  discard block
 block discarded – undo
2864 2864
 				);
2865 2865
 			}
2866 2866
 
2867
-			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans("Cancel"), $text, 'confirm_cancel', $formquestion, 0, 1);
2867
+			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("Cancel"), $text, 'confirm_cancel', $formquestion, 0, 1);
2868 2868
 		}
2869 2869
 
2870 2870
 		// Confirmation to delete line
2871 2871
 		if ($action == 'ask_deleteline') {
2872
-			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1);
2872
+			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1);
2873 2873
 		}
2874 2874
 
2875 2875
 		// Confirmation de la suppression d'une ligne subtotal
@@ -2882,7 +2882,7 @@  discard block
 block discarded – undo
2882 2882
 				$title = "DeleteTitleLine";
2883 2883
 				$question = "ConfirmDeleteTitleLine";
2884 2884
 			}
2885
-			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans($title), $langs->trans($question), 'confirm_delete_subtotalline', $formconfirm, 'no', 1);
2885
+			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans($title), $langs->trans($question), 'confirm_delete_subtotalline', $formconfirm, 'no', 1);
2886 2886
 		}
2887 2887
 
2888 2888
 		// Clone confirmation
@@ -2892,7 +2892,7 @@  discard block
 block discarded – undo
2892 2892
 			$formquestion = array(
2893 2893
 				array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOSTINT('socid'), 'socid', $filter, '', 0, 0, array(), 0, 'maxwidth300'))
2894 2894
 			);
2895
-			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
2895
+			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
2896 2896
 		}
2897 2897
 
2898 2898
 		// Subtotal line form
@@ -2900,12 +2900,12 @@  discard block
 block discarded – undo
2900 2900
 			$langs->load('subtotals');
2901 2901
 			$type = 'title';
2902 2902
 			$depth_array = $object->getPossibleLevels($langs);
2903
-			include DOL_DOCUMENT_ROOT . '/core/tpl/subtotal_create.tpl.php';
2903
+			include DOL_DOCUMENT_ROOT.'/core/tpl/subtotal_create.tpl.php';
2904 2904
 		} elseif ($action == 'add_subtotal_line') {
2905 2905
 			$langs->load('subtotals');
2906 2906
 			$type = 'subtotal';
2907 2907
 			$titles = $object->getPossibleTitles();
2908
-			include DOL_DOCUMENT_ROOT . '/core/tpl/subtotal_create.tpl.php';
2908
+			include DOL_DOCUMENT_ROOT.'/core/tpl/subtotal_create.tpl.php';
2909 2909
 		}
2910 2910
 
2911 2911
 		// Call Hook formConfirm
@@ -2924,16 +2924,16 @@  discard block
 block discarded – undo
2924 2924
 
2925 2925
 		// Order card
2926 2926
 
2927
-		$linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
2927
+		$linkback = '<a href="'.DOL_URL_ROOT.'/commande/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
2928 2928
 
2929 2929
 		$morehtmlref = '<div class="refidno">';
2930 2930
 		// Ref customer
2931 2931
 		$morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, (int) $usercancreate, 'string', '', 0, 1);
2932
-		$morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, (int) $usercancreate, 'string' . (isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1);
2932
+		$morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, (int) $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1);
2933 2933
 		// Thirdparty
2934
-		$morehtmlref .= '<br>' . $soc->getNomUrl(1, 'customer');
2934
+		$morehtmlref .= '<br>'.$soc->getNomUrl(1, 'customer');
2935 2935
 		if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $object->thirdparty->id > 0) {
2936
-			$morehtmlref .= ' (<a href="' . DOL_URL_ROOT . '/commande/list.php?socid=' . $object->thirdparty->id . '&search_societe=' . urlencode($object->thirdparty->name) . '">' . $langs->trans("OtherOrders") . '</a>)';
2936
+			$morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/commande/list.php?socid='.$object->thirdparty->id.'&search_societe='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherOrders").'</a>)';
2937 2937
 		}
2938 2938
 		// Project
2939 2939
 		if (isModEnabled('project')) {
@@ -2942,16 +2942,16 @@  discard block
 block discarded – undo
2942 2942
 			if ($usercancreate) {
2943 2943
 				$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
2944 2944
 				if ($action != 'classify') {
2945
-					$morehtmlref .= '<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> ';
2945
+					$morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> ';
2946 2946
 				}
2947
-				$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');
2947
+				$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');
2948 2948
 			} else {
2949 2949
 				if (!empty($object->fk_project)) {
2950 2950
 					$proj = new Project($db);
2951 2951
 					$proj->fetch($object->fk_project);
2952 2952
 					$morehtmlref .= $proj->getNomUrl(1);
2953 2953
 					if ($proj->title) {
2954
-						$morehtmlref .= '<span class="opacitymedium"> - ' . dol_escape_htmltag($proj->title) . '</span>';
2954
+						$morehtmlref .= '<span class="opacitymedium"> - '.dol_escape_htmltag($proj->title).'</span>';
2955 2955
 					}
2956 2956
 				}
2957 2957
 			}
@@ -2979,20 +2979,20 @@  discard block
 block discarded – undo
2979 2979
 				print $form->textwithpicto($langs->trans('PointOfSale'), $langs->trans('POSInfo'));
2980 2980
 				print '</td>';
2981 2981
 				if ($action != 'editposinfo' && $usercancreate) {
2982
-					print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editposinfo&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->trans('SetPOSInfo'), 1) . '</a></td>';
2982
+					print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editposinfo&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetPOSInfo'), 1).'</a></td>';
2983 2983
 				}
2984 2984
 				print '</tr></table>';
2985 2985
 				print '</td><td class="valuefield fieldname_type">';
2986
-				print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" name="formposinfo">';
2986
+				print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" name="formposinfo">';
2987 2987
 				print '<input type="hidden" name="action" value="setposinfo">';
2988
-				print '<input type="hidden" name="token" value="' . newToken() . '">';
2988
+				print '<input type="hidden" name="token" value="'.newToken().'">';
2989 2989
 				if ($action == 'editposinfo') {
2990
-					print '<input type="text" class="maxwidth150" name="posmodule" placeholder="' . $langs->trans("POSModule") . '" value="' . $object->module_source . '"> ';
2991
-					print '<input type="text" class="maxwidth100" name="posterminal" placeholder="' . $langs->trans("Terminal") . '" value="' . $object->pos_source . '">';
2992
-					print '<input type="submit" class="button" name="submitposinfo" value="' . $langs->trans("Submit") . '">';
2990
+					print '<input type="text" class="maxwidth150" name="posmodule" placeholder="'.$langs->trans("POSModule").'" value="'.$object->module_source.'"> ';
2991
+					print '<input type="text" class="maxwidth100" name="posterminal" placeholder="'.$langs->trans("Terminal").'" value="'.$object->pos_source.'">';
2992
+					print '<input type="submit" class="button" name="submitposinfo" value="'.$langs->trans("Submit").'">';
2993 2993
 				} else {
2994 2994
 					if ($object->module_source) {
2995
-						print '<span class="opacitymediumbycolor paddingleft">' . dolPrintHTML(ucfirst($object->module_source) . ' - ' . $langs->transnoentitiesnoconv("Terminal") . ' ' . $object->pos_source) . '</span>';
2995
+						print '<span class="opacitymediumbycolor paddingleft">'.dolPrintHTML(ucfirst($object->module_source).' - '.$langs->transnoentitiesnoconv("Terminal").' '.$object->pos_source).'</span>';
2996 2996
 					}
2997 2997
 				}
2998 2998
 				print '</form>';
@@ -3005,7 +3005,7 @@  discard block
 block discarded – undo
3005 3005
 				print $langs->trans('OutstandingBill');
3006 3006
 				print '</td><td class="valuefield">';
3007 3007
 				$arrayoutstandingbills = $soc->getOutstandingBills();
3008
-				print price($arrayoutstandingbills['opened']) . ' / ';
3008
+				print price($arrayoutstandingbills['opened']).' / ';
3009 3009
 				print price($soc->outstanding_limit, 0, '', 1, -1, -1, $conf->currency);
3010 3010
 				print '</td>';
3011 3011
 				print '</tr>';
@@ -3020,11 +3020,11 @@  discard block
 block discarded – undo
3020 3020
 				$filtercreditnote = "fk_facture_source IS NOT NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS RECEIVED)%')";
3021 3021
 			}
3022 3022
 
3023
-			$addrelativediscount = '<a href="' . DOL_URL_ROOT . '/comm/remise.php?id=' . $soc->id . '&backtopage=' . urlencode($_SERVER["PHP_SELF"]) . '?facid=' . $object->id . '">' . $langs->trans("EditRelativeDiscounts") . '</a>';
3024
-			$addabsolutediscount = '<a href="' . DOL_URL_ROOT . '/comm/remx.php?id=' . $soc->id . '&backtopage=' . urlencode($_SERVER["PHP_SELF"]) . '?facid=' . $object->id . '">' . $langs->trans("EditGlobalDiscounts") . '</a>';
3025
-			$addcreditnote = '<a href="' . DOL_URL_ROOT . '/compta/facture/card.php?action=create&socid=' . $soc->id . '&type=2&backtopage=' . urlencode($_SERVER["PHP_SELF"]) . '?facid=' . $object->id . '">' . $langs->trans("AddCreditNote") . '</a>';
3023
+			$addrelativediscount = '<a href="'.DOL_URL_ROOT.'/comm/remise.php?id='.$soc->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"]).'?facid='.$object->id.'">'.$langs->trans("EditRelativeDiscounts").'</a>';
3024
+			$addabsolutediscount = '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$soc->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"]).'?facid='.$object->id.'">'.$langs->trans("EditGlobalDiscounts").'</a>';
3025
+			$addcreditnote = '<a href="'.DOL_URL_ROOT.'/compta/facture/card.php?action=create&socid='.$soc->id.'&type=2&backtopage='.urlencode($_SERVER["PHP_SELF"]).'?facid='.$object->id.'">'.$langs->trans("AddCreditNote").'</a>';
3026 3026
 
3027
-			print '<tr><td class="titlefield">' . $langs->trans('Discounts') . '</td><td class="valuefield">';
3027
+			print '<tr><td class="titlefield">'.$langs->trans('Discounts').'</td><td class="valuefield">';
3028 3028
 
3029 3029
 			$absolute_discount = $soc->getAvailableDiscounts(null, $filterabsolutediscount);
3030 3030
 			$absolute_creditnote = $soc->getAvailableDiscounts(null, $filtercreditnote);
@@ -3033,8 +3033,8 @@  discard block
 block discarded – undo
3033 3033
 
3034 3034
 			$thirdparty = $soc;
3035 3035
 			$discount_type = 0;
3036
-			$backtopage = $_SERVER["PHP_SELF"] . '?id=' . $object->id;
3037
-			include DOL_DOCUMENT_ROOT . '/core/tpl/object_discounts.tpl.php';
3036
+			$backtopage = $_SERVER["PHP_SELF"].'?id='.$object->id;
3037
+			include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php';
3038 3038
 
3039 3039
 			print '</td></tr>';
3040 3040
 
@@ -3044,17 +3044,17 @@  discard block
 block discarded – undo
3044 3044
 			print $form->editfieldkey("Date", 'date', '', $object, (int) $editenable);
3045 3045
 			print '</td><td class="valuefield">';
3046 3046
 			if ($action == 'editdate') {
3047
-				print '<form name="setdate" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
3048
-				print '<input type="hidden" name="token" value="' . newToken() . '">';
3047
+				print '<form name="setdate" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
3048
+				print '<input type="hidden" name="token" value="'.newToken().'">';
3049 3049
 				print '<input type="hidden" name="action" value="setdate">';
3050
-				print '<input type="hidden" name="backtopage" value="' . $backtopage . '">';
3050
+				print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
3051 3051
 				print $form->selectDate($object->date, 'order_', 0, 0, 0, "setdate");
3052
-				print '<input type="submit" class="button button-edit" value="' . $langs->trans('Modify') . '">';
3052
+				print '<input type="submit" class="button button-edit" value="'.$langs->trans('Modify').'">';
3053 3053
 				print '</form>';
3054 3054
 			} else {
3055 3055
 				print $object->date ? dol_print_date($object->date, 'day') : '&nbsp;';
3056 3056
 				if ($object->hasDelay() && empty($object->delivery_date)) {	// If there is a delivery date planned, warning should be on this date
3057
-					print ' ' . img_picto($langs->trans("Late") . ' : ' . $object->showDelay(), "warning");
3057
+					print ' '.img_picto($langs->trans("Late").' : '.$object->showDelay(), "warning");
3058 3058
 				}
3059 3059
 			}
3060 3060
 			print '</td>';
@@ -3066,17 +3066,17 @@  discard block
 block discarded – undo
3066 3066
 			print $form->editfieldkey("DateDeliveryPlanned", 'date_livraison', '', $object, (int) $editenable);
3067 3067
 			print '</td><td class="valuefield">';
3068 3068
 			if ($action == 'editdate_livraison') {
3069
-				print '<form name="setdate_livraison" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
3070
-				print '<input type="hidden" name="token" value="' . newToken() . '">';
3069
+				print '<form name="setdate_livraison" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
3070
+				print '<input type="hidden" name="token" value="'.newToken().'">';
3071 3071
 				print '<input type="hidden" name="action" value="setdate_livraison">';
3072
-				print '<input type="hidden" name="backtopage" value="' . $backtopage . '">';
3072
+				print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
3073 3073
 				print $form->selectDate($object->delivery_date ? $object->delivery_date : -1, 'liv_', 1, 1, 0, "setdate_livraison", 1, 0);
3074
-				print '<input type="submit" class="button button-edit" value="' . $langs->trans('Modify') . '">';
3074
+				print '<input type="submit" class="button button-edit" value="'.$langs->trans('Modify').'">';
3075 3075
 				print '</form>';
3076 3076
 			} else {
3077 3077
 				print $object->delivery_date ? dol_print_date($object->delivery_date, 'dayhour') : '&nbsp;';
3078 3078
 				if ($object->hasDelay() && !empty($object->delivery_date)) {
3079
-					print ' ' . img_picto($langs->trans("Late") . ' : ' . $object->showDelay(), "warning");
3079
+					print ' '.img_picto($langs->trans("Late").' : '.$object->showDelay(), "warning");
3080 3080
 				}
3081 3081
 			}
3082 3082
 			print '</td>';
@@ -3088,9 +3088,9 @@  discard block
 block discarded – undo
3088 3088
 			print $form->editfieldkey("AvailabilityPeriod", 'availability', '', $object, (int) $editenable);
3089 3089
 			print '</td><td class="valuefield">';
3090 3090
 			if ($action == 'editavailability') {
3091
-				$form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->availability_id, 'availability_id', 1);
3091
+				$form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->availability_id, 'availability_id', 1);
3092 3092
 			} else {
3093
-				$form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->availability_id, 'none', 1);
3093
+				$form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->availability_id, 'none', 1);
3094 3094
 			}
3095 3095
 			print '</td></tr>';
3096 3096
 
@@ -3101,9 +3101,9 @@  discard block
 block discarded – undo
3101 3101
 				print $form->editfieldkey("SendingMethod", 'shippingmethod', '', $object, (int) $editenable);
3102 3102
 				print '</td><td class="valuefield">';
3103 3103
 				if ($action == 'editshippingmethod') {
3104
-					$form->formSelectShippingMethod($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->shipping_method_id, 'shipping_method_id', 1);
3104
+					$form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->shipping_method_id, 'shipping_method_id', 1);
3105 3105
 				} else {
3106
-					$form->formSelectShippingMethod($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->shipping_method_id, 'none');
3106
+					$form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->shipping_method_id, 'none');
3107 3107
 				}
3108 3108
 				print '</td>';
3109 3109
 				print '</tr>';
@@ -3112,16 +3112,16 @@  discard block
 block discarded – undo
3112 3112
 			// Warehouse
3113 3113
 			if (isModEnabled('stock') && getDolGlobalString('WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER')) {
3114 3114
 				$langs->load('stocks');
3115
-				require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
3115
+				require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
3116 3116
 				$formproduct = new FormProduct($db);
3117 3117
 				print '<tr><td>';
3118 3118
 				$editenable = $usercancreate;
3119 3119
 				print $form->editfieldkey("Warehouse", 'warehouse', '', $object, (int) $editenable);
3120 3120
 				print '</td><td class="valuefield">';
3121 3121
 				if ($action == 'editwarehouse') {
3122
-					$formproduct->formSelectWarehouses($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->warehouse_id, 'warehouse_id', 1);
3122
+					$formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'warehouse_id', 1);
3123 3123
 				} else {
3124
-					$formproduct->formSelectWarehouses($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->warehouse_id, 'none');
3124
+					$formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'none');
3125 3125
 				}
3126 3126
 				print '</td>';
3127 3127
 				print '</tr>';
@@ -3133,9 +3133,9 @@  discard block
 block discarded – undo
3133 3133
 			print $form->editfieldkey("Source", 'demandreason', '', $object, (int) $editenable);
3134 3134
 			print '</td><td class="valuefield">';
3135 3135
 			if ($action == 'editdemandreason') {
3136
-				$form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->demand_reason_id, 'demand_reason_id', 1);
3136
+				$form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->demand_reason_id, 'demand_reason_id', 1);
3137 3137
 			} else {
3138
-				$form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->demand_reason_id, 'none');
3138
+				$form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->demand_reason_id, 'none');
3139 3139
 			}
3140 3140
 			print '</td></tr>';
3141 3141
 
@@ -3145,9 +3145,9 @@  discard block
 block discarded – undo
3145 3145
 			print $form->editfieldkey("PaymentConditionsShort", 'conditions', '', $object, (int) $editenable);
3146 3146
 			print '</td><td class="valuefield">';
3147 3147
 			if ($action == 'editconditions') {
3148
-				$form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->cond_reglement_id, 'cond_reglement_id', 1, '', 1, $object->deposit_percent);
3148
+				$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->cond_reglement_id, 'cond_reglement_id', 1, '', 1, $object->deposit_percent);
3149 3149
 			} else {
3150
-				$form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->cond_reglement_id, 'none', 1, '', 1, $object->deposit_percent);
3150
+				$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->cond_reglement_id, 'none', 1, '', 1, $object->deposit_percent);
3151 3151
 			}
3152 3152
 			print '</td>';
3153 3153
 
@@ -3159,9 +3159,9 @@  discard block
 block discarded – undo
3159 3159
 			print $form->editfieldkey("PaymentMode", 'mode', '', $object, (int) $editenable);
3160 3160
 			print '</td><td class="valuefield">';
3161 3161
 			if ($action == 'editmode') {
3162
-				$form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->mode_reglement_id, 'mode_reglement_id', 'CRDT', 1, 1);
3162
+				$form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->mode_reglement_id, 'mode_reglement_id', 'CRDT', 1, 1);
3163 3163
 			} else {
3164
-				$form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->mode_reglement_id, 'none');
3164
+				$form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->mode_reglement_id, 'none');
3165 3165
 			}
3166 3166
 			print '</td></tr>';
3167 3167
 
@@ -3183,13 +3183,13 @@  discard block
 block discarded – undo
3183 3183
 			$totalWeight = $tmparray['weight'];
3184 3184
 			$totalVolume = $tmparray['volume'];
3185 3185
 			if ($totalWeight) {
3186
-				print '<tr><td>' . $langs->trans("CalculatedWeight") . '</td>';
3186
+				print '<tr><td>'.$langs->trans("CalculatedWeight").'</td>';
3187 3187
 				print '<td class="valuefield">';
3188 3188
 				print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, getDolGlobalInt('MAIN_WEIGHT_DEFAULT_ROUND', -1), isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? $conf->global->MAIN_WEIGHT_DEFAULT_UNIT : 'no');
3189 3189
 				print '</td></tr>';
3190 3190
 			}
3191 3191
 			if ($totalVolume) {
3192
-				print '<tr><td>' . $langs->trans("CalculatedVolume") . '</td>';
3192
+				print '<tr><td>'.$langs->trans("CalculatedVolume").'</td>';
3193 3193
 				print '<td class="valuefield">';
3194 3194
 				print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, getDolGlobalInt('MAIN_VOLUME_DEFAULT_ROUND', -1), isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT) ? $conf->global->MAIN_VOLUME_DEFAULT_UNIT : 'no');
3195 3195
 				print '</td></tr>';
@@ -3207,7 +3207,7 @@  discard block
 block discarded – undo
3207 3207
 				if ($action != 'editincoterm') {
3208 3208
 					print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1);
3209 3209
 				} else {
3210
-					print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'] . '?id=' . $object->id);
3210
+					print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'].'?id='.$object->id);
3211 3211
 				}
3212 3212
 				print '</td></tr>';
3213 3213
 			}
@@ -3219,9 +3219,9 @@  discard block
 block discarded – undo
3219 3219
 				print $form->editfieldkey("BankAccount", 'bankaccount', '', $object, (int) $editenable);
3220 3220
 				print '</td><td class="valuefield">';
3221 3221
 				if ($action == 'editbankaccount') {
3222
-					$form->formSelectAccount($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->fk_account, 'fk_account', 1);
3222
+					$form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->fk_account, 'fk_account', 1);
3223 3223
 				} else {
3224
-					$form->formSelectAccount($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->fk_account, 'none');
3224
+					$form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->fk_account, 'none');
3225 3225
 				}
3226 3226
 				print '</td>';
3227 3227
 				print '</tr>';
@@ -3234,7 +3234,7 @@  discard block
 block discarded – undo
3234 3234
 				print $langs->trans("Categories");
3235 3235
 				print '<td><td class="right">';
3236 3236
 				if ($usercancreate) {
3237
-					print '<a class="editfielda" href="' . DOL_URL_ROOT . '/commande/card.php?id=' . $object->id . '&action=edittags&token=' . newToken() . '">' . img_edit() . '</a>';
3237
+					print '<a class="editfielda" href="'.DOL_URL_ROOT.'/commande/card.php?id='.$object->id.'&action=edittags&token='.newToken().'">'.img_edit().'</a>';
3238 3238
 				} else {
3239 3239
 					print '&nbsp;';
3240 3240
 				}
@@ -3242,11 +3242,11 @@  discard block
 block discarded – undo
3242 3242
 				print '</td>';
3243 3243
 				print '<td>';
3244 3244
 				if ($action == 'edittags') {
3245
-					print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '">';
3245
+					print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
3246 3246
 					print '<input type="hidden" name="action" value="settags">';
3247
-					print '<input type="hidden" name="token" value="' . newToken() . '">';
3247
+					print '<input type="hidden" name="token" value="'.newToken().'">';
3248 3248
 					print $form->selectCategories(Categorie::TYPE_ORDER, 'categories', $object);
3249
-					print '<input type="submit" class="button valignmiddle smallpaddingimp" value="' . $langs->trans("Modify") . '">';
3249
+					print '<input type="submit" class="button valignmiddle smallpaddingimp" value="'.$langs->trans("Modify").'">';
3250 3250
 					print '</form>';
3251 3251
 				} else {
3252 3252
 					print $form->showCategories($object->id, Categorie::TYPE_ORDER, 1);
@@ -3255,7 +3255,7 @@  discard block
 block discarded – undo
3255 3255
 			}
3256 3256
 
3257 3257
 			// Other attributes
3258
-			include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
3258
+			include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
3259 3259
 
3260 3260
 			print '</table>';
3261 3261
 
@@ -3265,40 +3265,40 @@  discard block
 block discarded – undo
3265 3265
 
3266 3266
 			print '<table class="border tableforfield centpercent">';
3267 3267
 
3268
-			include DOL_DOCUMENT_ROOT . '/core/tpl/object_currency_amount.tpl.php';
3268
+			include DOL_DOCUMENT_ROOT.'/core/tpl/object_currency_amount.tpl.php';
3269 3269
 
3270 3270
 			$alert = '';
3271 3271
 			if (getDolGlobalString('ORDER_MANAGE_MIN_AMOUNT') && $object->total_ht < $object->thirdparty->order_min_amount) {
3272
-				$alert = ' ' . img_warning($langs->trans('OrderMinAmount') . ': ' . price($object->thirdparty->order_min_amount));
3272
+				$alert = ' '.img_warning($langs->trans('OrderMinAmount').': '.price($object->thirdparty->order_min_amount));
3273 3273
 			}
3274 3274
 
3275 3275
 			print '<tr>';
3276
-			print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>';
3277
-			print '<td class="nowrap amountcard right">' . price($object->total_ht, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
3276
+			print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>';
3277
+			print '<td class="nowrap amountcard right">'.price($object->total_ht, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
3278 3278
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
3279 3279
 				// Multicurrency Amount HT
3280
-				print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
3280
+				print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
3281 3281
 			}
3282 3282
 			print '</tr>';
3283 3283
 
3284 3284
 			print '<tr>';
3285
-			print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>';
3286
-			print '<td class="nowrap amountcard right">' . price($object->total_tva, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
3285
+			print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>';
3286
+			print '<td class="nowrap amountcard right">'.price($object->total_tva, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
3287 3287
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
3288 3288
 				// Multicurrency Amount VAT
3289
-				print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
3289
+				print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
3290 3290
 			}
3291 3291
 			print '</tr>';
3292 3292
 
3293 3293
 			// Amount Local Taxes
3294 3294
 			if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) {
3295 3295
 				print '<tr>';
3296
-				print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
3297
-				print '<td class="nowrap amountcard right">' . price($object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
3296
+				print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>';
3297
+				print '<td class="nowrap amountcard right">'.price($object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
3298 3298
 				if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
3299 3299
 					$object->multicurrency_total_localtax1 = price2num($object->total_localtax1 * $object->multicurrency_tx, 'MT');
3300 3300
 
3301
-					print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
3301
+					print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
3302 3302
 				}
3303 3303
 				print '</tr>';
3304 3304
 			}
@@ -3306,24 +3306,24 @@  discard block
 block discarded – undo
3306 3306
 			// Amount Local Taxes
3307 3307
 			if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) {
3308 3308
 				print '<tr>';
3309
-				print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>';
3310
-				print '<td class="nowrap amountcard right">' . price($object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
3309
+				print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>';
3310
+				print '<td class="nowrap amountcard right">'.price($object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
3311 3311
 				if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
3312 3312
 					$object->multicurrency_total_localtax2 = price2num($object->total_localtax2 * $object->multicurrency_tx, 'MT');
3313 3313
 
3314
-					print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
3314
+					print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
3315 3315
 				}
3316 3316
 				print '</tr>';
3317 3317
 			}
3318 3318
 
3319 3319
 			print '<tr>';
3320
-			print '<td>' . $langs->trans('AmountTTC') . '</td>';
3321
-			print '<td class="valuefield nowrap right amountcard">' . price($object->total_ttc, 1, '', 1, -1, -1, $conf->currency) . '</td>';
3320
+			print '<td>'.$langs->trans('AmountTTC').'</td>';
3321
+			print '<td class="valuefield nowrap right amountcard">'.price($object->total_ttc, 1, '', 1, -1, -1, $conf->currency).'</td>';
3322 3322
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
3323 3323
 				// Multicurrency Amount TTC
3324
-				print '<td class="valuefield nowrap right amountcard">' . price($object->multicurrency_total_ttc, 1, '', 1, -1, -1, $object->multicurrency_code) . '</td>';
3324
+				print '<td class="valuefield nowrap right amountcard">'.price($object->multicurrency_total_ttc, 1, '', 1, -1, -1, $object->multicurrency_code).'</td>';
3325 3325
 			}
3326
-			print '</tr>' . "\n";
3326
+			print '</tr>'."\n";
3327 3327
 
3328 3328
 			print '</table>';
3329 3329
 
@@ -3344,13 +3344,13 @@  discard block
 block discarded – undo
3344 3344
 			if (getDolGlobalString('MAIN_DISABLE_CONTACTS_TAB')) {
3345 3345
 				$blocname = 'contacts';
3346 3346
 				$title = $langs->trans('ContactsAddresses');
3347
-				include DOL_DOCUMENT_ROOT . '/core/tpl/bloc_showhide.tpl.php';
3347
+				include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php';
3348 3348
 			}
3349 3349
 
3350 3350
 			if (getDolGlobalString('MAIN_DISABLE_NOTES_TAB')) {
3351 3351
 				$blocname = 'notes';
3352 3352
 				$title = $langs->trans('Notes');
3353
-				include DOL_DOCUMENT_ROOT . '/core/tpl/bloc_showhide.tpl.php';
3353
+				include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php';
3354 3354
 			}
3355 3355
 
3356 3356
 			/*
@@ -3365,20 +3365,20 @@  discard block
 block discarded – undo
3365 3365
 			global $inputalsopricewithtax;
3366 3366
 			$inputalsopricewithtax = 1;
3367 3367
 
3368
-			print '<form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="POST">
3369
-			<input type="hidden" name="token" value="' . newToken() . '">
3370
-			<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '">
3368
+			print '<form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="POST">
3369
+			<input type="hidden" name="token" value="' . newToken().'">
3370
+			<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">
3371 3371
 			<input type="hidden" name="mode" value="">
3372 3372
 			<input type="hidden" name="page_y" value="">
3373
-			<input type="hidden" name="id" value="' . $object->id . '">
3374
-			<input type="hidden" name="backtopage" value="' . $backtopage . '">
3373
+			<input type="hidden" name="id" value="' . $object->id.'">
3374
+			<input type="hidden" name="backtopage" value="' . $backtopage.'">
3375 3375
 				';
3376 3376
 
3377 3377
 			if (!empty($conf->use_javascript_ajax) && $object->status == Commande::STATUS_DRAFT) {
3378 3378
 				if (isModEnabled('subtotals')) {
3379
-					include DOL_DOCUMENT_ROOT . '/core/tpl/subtotal_ajaxrow.tpl.php';
3379
+					include DOL_DOCUMENT_ROOT.'/core/tpl/subtotal_ajaxrow.tpl.php';
3380 3380
 				} else {
3381
-					include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php';
3381
+					include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
3382 3382
 				}
3383 3383
 			}
3384 3384
 
@@ -3433,22 +3433,22 @@  discard block
 block discarded – undo
3433 3433
 
3434 3434
 				// Reopen a closed order
3435 3435
 				if (($object->status == Commande::STATUS_CLOSED || $object->status == Commande::STATUS_CANCELED) && $usercancreate && (!$object->billed || !getDolGlobalInt('ORDER_DONT_REOPEN_BILLED'))) {
3436
-					print dolGetButtonAction('', $langs->trans('ReOpen'), 'default', $_SERVER["PHP_SELF"] . '?action=reopen&amp;token=' . newToken() . '&amp;id=' . $object->id, '');
3436
+					print dolGetButtonAction('', $langs->trans('ReOpen'), 'default', $_SERVER["PHP_SELF"].'?action=reopen&amp;token='.newToken().'&amp;id='.$object->id, '');
3437 3437
 				}
3438 3438
 
3439 3439
 				// Send
3440 3440
 				if (empty($user->socid)) {
3441 3441
 					if ($object->status > Commande::STATUS_DRAFT || getDolGlobalString('COMMANDE_SENDBYEMAIL_FOR_ALL_STATUS')) {
3442 3442
 						if ($usercansend) {
3443
-							print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER["PHP_SELF"] . '?action=presend&token=' . newToken() . '&id=' . $object->id . '&mode=init#formmailbeforetitle', '');
3443
+							print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', '');
3444 3444
 						} else {
3445
-							print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER['PHP_SELF'] . '#', '', false);
3445
+							print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER['PHP_SELF'].'#', '', false);
3446 3446
 						}
3447 3447
 					}
3448 3448
 				}
3449 3449
 
3450 3450
 				// Subtotal
3451
-				if ($object->status == Commande::STATUS_DRAFT && isModEnabled('subtotals') && getDolGlobalString('SUBTOTAL_TITLE_' . strtoupper($object->element))) {
3451
+				if ($object->status == Commande::STATUS_DRAFT && isModEnabled('subtotals') && getDolGlobalString('SUBTOTAL_TITLE_'.strtoupper($object->element))) {
3452 3452
 					$langs->load('subtotals');
3453 3453
 
3454 3454
 					$url_button = array();
@@ -3458,7 +3458,7 @@  discard block
 block discarded – undo
3458 3458
 						'enabled' => (isModEnabled('order') && $object->status == Commande::STATUS_DRAFT),
3459 3459
 						'perm' => (bool) $usercancreate,
3460 3460
 						'label' => $langs->trans('AddTitleLine'),
3461
-						'url' => '/commande/card.php?id=' . $object->id . '&action=add_title_line&token=' . newToken()
3461
+						'url' => '/commande/card.php?id='.$object->id.'&action=add_title_line&token='.newToken()
3462 3462
 					);
3463 3463
 
3464 3464
 					$url_button[] = array(
@@ -3466,7 +3466,7 @@  discard block
 block discarded – undo
3466 3466
 						'enabled' => (isModEnabled('order') && $object->status == Commande::STATUS_DRAFT),
3467 3467
 						'perm' => (bool) $usercancreate,
3468 3468
 						'label' => $langs->trans('AddSubtotalLine'),
3469
-						'url' => '/commande/card.php?id=' . $object->id . '&action=add_subtotal_line&token=' . newToken()
3469
+						'url' => '/commande/card.php?id='.$object->id.'&action=add_subtotal_line&token='.newToken()
3470 3470
 					);
3471 3471
 					print dolGetButtonAction('', $langs->trans('Subtotal'), 'default', $url_button, '', true);
3472 3472
 				}
@@ -3474,15 +3474,15 @@  discard block
 block discarded – undo
3474 3474
 				// Valid
3475 3475
 				if ($object->status == Commande::STATUS_DRAFT && ($object->total_ttc >= 0 || getDolGlobalString('ORDER_ENABLE_NEGATIVE')) && $usercanvalidate) {
3476 3476
 					if ($numlines > 0) {
3477
-						print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"] . '?action=validate&amp;token=' . newToken() . '&amp;id=' . $object->id, (string) $object->id, 1);
3477
+						print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=validate&amp;token='.newToken().'&amp;id='.$object->id, (string) $object->id, 1);
3478 3478
 					} else {
3479 3479
 						$langs->load("errors");
3480
-						print dolGetButtonAction($langs->trans("ErrorObjectMustHaveLinesToBeValidated", $object->ref), $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"] . '?action=validate&amp;token=' . newToken() . '&amp;id=' . $object->id, (string) $object->id, -1);
3480
+						print dolGetButtonAction($langs->trans("ErrorObjectMustHaveLinesToBeValidated", $object->ref), $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=validate&amp;token='.newToken().'&amp;id='.$object->id, (string) $object->id, -1);
3481 3481
 					}
3482 3482
 				}
3483 3483
 				// Edit
3484 3484
 				if (($object->status == Commande::STATUS_VALIDATED || ($object->status == Commande::STATUS_SHIPMENTONPROCESS && getDolGlobalString('EDIT_ORDER_SHIPMENT_ON_PROCESS'))) && $usercancreate) {
3485
-					print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"] . '?action=modif&amp;token=' . newToken() . '&amp;id=' . $object->id, '');
3485
+					print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?action=modif&amp;token='.newToken().'&amp;id='.$object->id, '');
3486 3486
 				}
3487 3487
 
3488 3488
 				$arrayforbutaction = array();
@@ -3494,7 +3494,7 @@  discard block
 block discarded – undo
3494 3494
 						'enabled' => (isModEnabled("supplier_order") && $object->status > Commande::STATUS_DRAFT),
3495 3495
 						'perm' => $usercancreatepurchaseorder,
3496 3496
 						'label' => 'AddPurchaseOrder',
3497
-						'url' => '/fourn/commande/card.php?action=create&amp;origin=' . urlencode($object->element) . '&amp;originid=' . ((int) $object->id)
3497
+						'url' => '/fourn/commande/card.php?action=create&amp;origin='.urlencode($object->element).'&amp;originid='.((int) $object->id)
3498 3498
 					);
3499 3499
 				}
3500 3500
 
@@ -3511,7 +3511,7 @@  discard block
 block discarded – undo
3511 3511
 						'enabled' => (isModEnabled("intervention") && $object->status > Commande::STATUS_DRAFT && $object->status < Commande::STATUS_CLOSED && $object->getNbOfServicesLines() > 0),
3512 3512
 						'perm' => ($user->hasRight('ficheinter', 'creer') == 1),
3513 3513
 						'label' => 'AddIntervention',
3514
-						'url' => '/fichinter/card.php?action=create&origin=' . urlencode($object->element) . '&originid=' . ((int) $object->id) . '&socid=' . ((int) $object->socid),
3514
+						'url' => '/fichinter/card.php?action=create&origin='.urlencode($object->element).'&originid='.((int) $object->id).'&socid='.((int) $object->socid),
3515 3515
 					);
3516 3516
 				}
3517 3517
 
@@ -3521,7 +3521,7 @@  discard block
 block discarded – undo
3521 3521
 					'enabled' => (isModEnabled("contract") && ($object->status == Commande::STATUS_VALIDATED || $object->status == Commande::STATUS_SHIPMENTONPROCESS || $object->status == Commande::STATUS_CLOSED)),
3522 3522
 					'perm' => ($user->hasRight('contrat', 'creer') == 1),
3523 3523
 					'label' => 'AddContract',
3524
-					'url' => '/contrat/card.php?action=create&amp;origin=' . $object->element . '&amp;originid=' . $object->id . '&amp;socid=' . $object->socid,
3524
+					'url' => '/contrat/card.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid,
3525 3525
 				);
3526 3526
 				/*if (isModEnabled('contrat') && ($object->status == Commande::STATUS_VALIDATED || $object->status == Commande::STATUS_SHIPMENTONPROCESS || $object->status == Commande::STATUS_CLOSED)) {
3527 3527
 					$langs->load("contracts");
@@ -3545,7 +3545,7 @@  discard block
 block discarded – undo
3545 3545
 								'enabled' => (isModEnabled("shipping") && ($object->status > Commande::STATUS_DRAFT && $object->status < Commande::STATUS_CLOSED && ($object->getNbOfProductsLines() > 0 || getDolGlobalString('STOCK_SUPPORTS_SERVICES')))),
3546 3546
 								'perm' => $user->hasRight('expedition', 'creer'),
3547 3547
 								'label' => 'CreateShipment',
3548
-								'url' => '/expedition/shipment.php?id=' . $object->id
3548
+								'url' => '/expedition/shipment.php?id='.$object->id
3549 3549
 							);
3550 3550
 						} else {
3551 3551
 							//c$langs->load("errors");
@@ -3555,7 +3555,7 @@  discard block
 block discarded – undo
3555 3555
 								'enabled' => (isModEnabled("shipping") && ($object->status > Commande::STATUS_DRAFT && $object->status < Commande::STATUS_CLOSED && ($object->getNbOfProductsLines() > 0 || getDolGlobalString('STOCK_SUPPORTS_SERVICES')))),
3556 3556
 								'perm' => 0,
3557 3557
 								'label' => 'CreateShipment',
3558
-								'url' => '/expedition/shipment.php?id=' . $object->id
3558
+								'url' => '/expedition/shipment.php?id='.$object->id
3559 3559
 							);
3560 3560
 						}
3561 3561
 					}
@@ -3567,7 +3567,7 @@  discard block
 block discarded – undo
3567 3567
 					'enabled' => (isModEnabled('invoice') && $object->status > Commande::STATUS_DRAFT && !$object->billed && $object->total_ttc >= 0),
3568 3568
 					'perm' => ($user->hasRight('facture', 'creer') && !getDolGlobalInt('WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER')),
3569 3569
 					'label' => 'CreateBill',
3570
-					'url' => '/compta/facture/card.php?action=create&amp;token=' . newToken() . '&amp;origin=' . urlencode($object->element) . '&amp;originid=' . $object->id . '&amp;socid=' . $object->socid
3570
+					'url' => '/compta/facture/card.php?action=create&amp;token='.newToken().'&amp;origin='.urlencode($object->element).'&amp;originid='.$object->id.'&amp;socid='.$object->socid
3571 3571
 				);
3572 3572
 				/*
3573 3573
 				 if (isModEnabled('facture') && $object->status > Commande::STATUS_DRAFT && !$object->billed && $object->total_ttc >= 0) {
@@ -3588,38 +3588,38 @@  discard block
 block discarded – undo
3588 3588
 
3589 3589
 				// Set to shipped
3590 3590
 				if (($object->status == Commande::STATUS_VALIDATED || $object->status == Commande::STATUS_SHIPMENTONPROCESS) && $usercanclose) {
3591
-					print dolGetButtonAction('', $langs->trans('ClassifyShipped'), 'default', $_SERVER["PHP_SELF"] . '?action=shipped&amp;token=' . newToken() . '&amp;id=' . $object->id, '');
3591
+					print dolGetButtonAction('', $langs->trans('ClassifyShipped'), 'default', $_SERVER["PHP_SELF"].'?action=shipped&amp;token='.newToken().'&amp;id='.$object->id, '');
3592 3592
 				}
3593 3593
 
3594 3594
 				// Set billed or unbilled
3595 3595
 				// Note: Even if module invoice is not enabled, we should be able to use button "Classified billed"
3596 3596
 				if ($object->status > Commande::STATUS_DRAFT && !$object->billed && $object->total_ttc >= 0) {
3597 3597
 					if ($usercancreate && $object->status >= Commande::STATUS_VALIDATED && !getDolGlobalString('ORDER_DISABLE_CLASSIFY_BILLED_FROM_ORDER') && !getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT')) {
3598
-						print dolGetButtonAction('', $langs->trans('ClassifyBilled'), 'default', $_SERVER["PHP_SELF"] . '?action=classifybilled&amp;token=' . newToken() . '&amp;id=' . $object->id, '');
3598
+						print dolGetButtonAction('', $langs->trans('ClassifyBilled'), 'default', $_SERVER["PHP_SELF"].'?action=classifybilled&amp;token='.newToken().'&amp;id='.$object->id, '');
3599 3599
 					}
3600 3600
 				}
3601 3601
 				if ($object->status > Commande::STATUS_DRAFT && $object->billed) {
3602 3602
 					if ($usercancreate && $object->status >= Commande::STATUS_VALIDATED && !getDolGlobalString('ORDER_DISABLE_CLASSIFY_BILLED_FROM_ORDER') && !getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT')) {
3603
-						print dolGetButtonAction('', $langs->trans('ClassifyUnBilled'), 'delete', $_SERVER["PHP_SELF"] . '?action=classifyunbilled&amp;token=' . newToken() . '&amp;id=' . $object->id, '');
3603
+						print dolGetButtonAction('', $langs->trans('ClassifyUnBilled'), 'delete', $_SERVER["PHP_SELF"].'?action=classifyunbilled&amp;token='.newToken().'&amp;id='.$object->id, '');
3604 3604
 					}
3605 3605
 				}
3606 3606
 
3607 3607
 				// Clone
3608 3608
 				if ($usercancreate) {
3609
-					print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER["PHP_SELF"] . '?action=clone&token=' . newToken() . '&id=' . $object->id . '&socid=' . $object->socid, '');
3609
+					print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER["PHP_SELF"].'?action=clone&token='.newToken().'&id='.$object->id.'&socid='.$object->socid, '');
3610 3610
 				}
3611 3611
 
3612 3612
 				// Cancel order
3613 3613
 				if ($object->status == Commande::STATUS_VALIDATED && !empty($usercancancel)) {
3614
-					print '<a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=cancel&token=' . newToken() . '">' . $langs->trans("CancelOrder") . '</a>';
3614
+					print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=cancel&token='.newToken().'">'.$langs->trans("CancelOrder").'</a>';
3615 3615
 				}
3616 3616
 
3617 3617
 				// Delete order
3618 3618
 				if ($usercandelete) {
3619 3619
 					if ($numshipping == 0) {
3620
-						print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"] . '?action=delete&token=' . newToken() . '&id=' . $object->id, '');
3620
+						print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id, '');
3621 3621
 					} else {
3622
-						print dolGetButtonAction($langs->trans('ShippingExist'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF'] . '#', '', false);
3622
+						print dolGetButtonAction($langs->trans('ShippingExist'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
3623 3623
 					}
3624 3624
 				}
3625 3625
 			}
@@ -3636,8 +3636,8 @@  discard block
 block discarded – undo
3636 3636
 			print '<a name="builddoc"></a>'; // ancre
3637 3637
 			// Documents
3638 3638
 			$objref = dol_sanitizeFileName($object->ref);
3639
-			$relativepath = $objref . '/' . $objref . '.pdf';
3640
-			$filedir = $conf->commande->multidir_output[$object->entity ?? $conf->entity] . '/' . $objref;
3639
+			$relativepath = $objref.'/'.$objref.'.pdf';
3640
+			$filedir = $conf->commande->multidir_output[$object->entity ?? $conf->entity].'/'.$objref;
3641 3641
 			$urlsource = dolBuildUrl($_SERVER["PHP_SELF"], ["id" => $object->id]);
3642 3642
 			$genallowed = $usercanread;
3643 3643
 			$delallowed = $usercancreate;
@@ -3666,7 +3666,7 @@  discard block
 block discarded – undo
3666 3666
 
3667 3667
 			// Show online payment link
3668 3668
 			// The list can be complete by the hook 'doValidatePayment' executed inside getValidOnlinePaymentMethods()
3669
-			include_once DOL_DOCUMENT_ROOT . '/core/lib/payments.lib.php';
3669
+			include_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
3670 3670
 			$validpaymentmethod = getValidOnlinePaymentMethods('');
3671 3671
 			$useonlinepayment = count($validpaymentmethod);
3672 3672
 
@@ -3675,8 +3675,8 @@  discard block
 block discarded – undo
3675 3675
 			}
3676 3676
 			if ($object->status != Commande::STATUS_DRAFT && $useonlinepayment) {
3677 3677
 				print '<br><!-- Link to pay -->';
3678
-				require_once DOL_DOCUMENT_ROOT . '/core/lib/payments.lib.php';
3679
-				print showOnlinePaymentUrl('order', $object->ref) . '<br>';
3678
+				require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
3679
+				print showOnlinePaymentUrl('order', $object->ref).'<br>';
3680 3680
 			}
3681 3681
 
3682 3682
 			print '</div><div class="fichehalfright">';
@@ -3684,11 +3684,11 @@  discard block
 block discarded – undo
3684 3684
 			$MAXEVENT = 10;
3685 3685
 
3686 3686
 			//button to go to messaging from the events box
3687
-			$morehtmlcenter = dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', dolBuildUrl(DOL_URL_ROOT . '/commande/messaging.php', ['id' => $object->id]));
3688
-			$morehtmlcenter .= dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', dolBuildUrl(DOL_URL_ROOT . '/commande/agenda.php', ['id' => $object->id]));
3687
+			$morehtmlcenter = dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', dolBuildUrl(DOL_URL_ROOT.'/commande/messaging.php', ['id' => $object->id]));
3688
+			$morehtmlcenter .= dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', dolBuildUrl(DOL_URL_ROOT.'/commande/agenda.php', ['id' => $object->id]));
3689 3689
 
3690 3690
 			// List of actions on element
3691
-			include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
3691
+			include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
3692 3692
 			$formactions = new FormActions($db);
3693 3693
 			$somethingshown = $formactions->showactions($object, 'order', $socid, 1, '', $MAXEVENT, '', $morehtmlcenter); // Show all action for thirdparty
3694 3694
 
@@ -3699,9 +3699,9 @@  discard block
 block discarded – undo
3699 3699
 		$modelmail = 'order_send';
3700 3700
 		$defaulttopic = 'SendOrderRef';
3701 3701
 		$diroutput = getMultidirOutput($object);
3702
-		$trackid = 'ord' . $object->id;
3702
+		$trackid = 'ord'.$object->id;
3703 3703
 
3704
-		include DOL_DOCUMENT_ROOT . '/core/tpl/card_presend.tpl.php';
3704
+		include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
3705 3705
 	}
3706 3706
 }
3707 3707
 
Please login to merge, or discard this patch.
htdocs/core/lib/order.lib.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 	$head = array();
47 47
 
48 48
 	if (isModEnabled('order') && $user->hasRight('commande', 'lire')) {
49
-		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/commande/card.php', ['id' => $object->id]);
49
+		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/commande/card.php', ['id' => $object->id]);
50 50
 		$head[$h][1] = $langs->trans("CustomerOrder");
51 51
 		$head[$h][2] = 'order';
52 52
 		$h++;
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
 	if (!getDolGlobalString('MAIN_DISABLE_CONTACTS_TAB')) {
56 56
 		$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
57
-		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/commande/contact.php', ['id' => $object->id]);
57
+		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/commande/contact.php', ['id' => $object->id]);
58 58
 		$head[$h][1] = $langs->trans('ContactsAddresses');
59 59
 		if ($nbContact > 0) {
60 60
 			$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbContact.'</span>';
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 		|| (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY') && $user->hasRight('expedition', 'delivery', 'lire'))) {
68 68
 		$nbShipments = $object->getNbOfShipments();
69 69
 		$nbReceiption = 0;
70
-		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/expedition/shipment.php', ['id' => $object->id]);
70
+		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/expedition/shipment.php', ['id' => $object->id]);
71 71
 		$text = '';
72 72
 		if (getDolGlobalInt('MAIN_SUBMODULE_EXPEDITION')) {
73 73
 			$text .= $langs->trans("Shipments");
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 		if (!empty($object->note_public)) {
110 110
 			$nbNote++;
111 111
 		}
112
-		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/commande/note.php', ['id' => $object->id]);
112
+		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/commande/note.php', ['id' => $object->id]);
113 113
 		$head[$h][1] = $langs->trans('Notes');
114 114
 		if ($nbNote > 0) {
115 115
 			$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 	$upload_dir = $conf->commande->multidir_output[$object->entity ?? $conf->entity]."/".dol_sanitizeFileName($object->ref);
124 124
 	$nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
125 125
 	$nbLinks = Link::count($db, $object->element, $object->id);
126
-	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/commande/document.php', ['id' => $object->id]);
126
+	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/commande/document.php', ['id' => $object->id]);
127 127
 	$head[$h][1] = $langs->trans('Documents');
128 128
 	if (($nbFiles + $nbLinks) > 0) {
129 129
 		$head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>';
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 	$h++;
133 133
 
134 134
 
135
-	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/commande/agenda.php', ['id' => $object->id]);
135
+	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/commande/agenda.php', ['id' => $object->id]);
136 136
 	$head[$h][1] = $langs->trans("Events");
137 137
 	if (isModEnabled('agenda') && ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allactions', 'read'))) {
138 138
 		$nbEvent = 0;
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 			} else {
155 155
 				dol_syslog('Failed to count actioncomm '.$db->lasterror(), LOG_ERR);
156 156
 			}
157
-			dol_setcache($cachekey, $nbEvent, 120);		// If setting cache fails, this is not a problem, so we do not test result.
157
+			dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result.
158 158
 		}
159 159
 
160 160
 		$head[$h][1] .= '/';
@@ -189,14 +189,14 @@  discard block
 block discarded – undo
189 189
 	$h = 0;
190 190
 	$head = array();
191 191
 
192
-	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/admin/order.php');
192
+	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/admin/order.php');
193 193
 	$head[$h][1] = $langs->trans("Miscellaneous");
194 194
 	$head[$h][2] = 'general';
195 195
 	$h++;
196 196
 
197 197
 	complete_head_from_modules($conf, $langs, null, $head, $h, 'order_admin');
198 198
 
199
-	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/admin/order_extrafields.php');
199
+	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/admin/order_extrafields.php');
200 200
 	$head[$h][1] = $langs->trans("ExtraFields");
201 201
 	$nbExtrafields = $extrafields->attributes['commande']['count'];
202 202
 	if ($nbExtrafields > 0) {
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 	$head[$h][2] = 'attributes';
206 206
 	$h++;
207 207
 
208
-	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/admin/orderdet_extrafields.php');
208
+	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/admin/orderdet_extrafields.php');
209 209
 	$head[$h][1] = $langs->trans("ExtraFieldsLines");
210 210
 	$nbExtrafields = $extrafields->attributes['commandedet']['count'];
211 211
 	if ($nbExtrafields > 0) {
Please login to merge, or discard this patch.