Completed
Branch develop (68d67a)
by
unknown
16:20
created
htdocs/commande/document.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
 
74 74
 $object = new Commande($db);
75 75
 
76
-$usercancreate  =  $user->hasRight("commande", "creer");
76
+$usercancreate = $user->hasRight("commande", "creer");
77 77
 $permissiontoadd = $usercancreate;
78 78
 
79 79
 // Security check
Please login to merge, or discard this patch.
htdocs/commande/card.php 2 patches
Braces   +9 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2104,7 +2104,9 @@  discard block
 block discarded – undo
2104 2104
 					}
2105 2105
 				}
2106 2106
 			}
2107
-			if ($nbMandated > 0 ) $text .= '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>';
2107
+			if ($nbMandated > 0 ) {
2108
+				$text .= '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>';
2109
+			}
2108 2110
 
2109 2111
 			if (getDolGlobalInt('SALE_ORDER_SUGGEST_DOWN_PAYMENT_INVOICE_CREATION')) {
2110 2112
 				// This is a hidden option:
@@ -2751,9 +2753,12 @@  discard block
 block discarded – undo
2751 2753
 				$parameters = array();
2752 2754
 				// Note that $action and $object may be modified by hook
2753 2755
 				$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action);
2754
-				if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
2755
-				if (empty($reshook))
2756
-					$object->formAddObjectLine(1, $mysoc, $soc);
2756
+				if ($reshook < 0) {
2757
+					setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
2758
+				}
2759
+				if (empty($reshook)) {
2760
+									$object->formAddObjectLine(1, $mysoc, $soc);
2761
+				}
2757 2762
 			}
2758 2763
 		}
2759 2764
 		print '</table>';
Please login to merge, or discard this patch.
Spacing   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -79,18 +79,18 @@  discard block
 block discarded – undo
79 79
 
80 80
 
81 81
 $id        = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('orderid', 'int'));
82
-$ref       =  GETPOST('ref', 'alpha');
83
-$socid     =  GETPOST('socid', 'int');
84
-$action    =  GETPOST('action', 'aZ09');
85
-$cancel    =  GETPOST('cancel', 'alpha');
86
-$confirm   =  GETPOST('confirm', 'alpha');
82
+$ref       = GETPOST('ref', 'alpha');
83
+$socid     = GETPOST('socid', 'int');
84
+$action    = GETPOST('action', 'aZ09');
85
+$cancel    = GETPOST('cancel', 'alpha');
86
+$confirm   = GETPOST('confirm', 'alpha');
87 87
 $backtopage = GETPOST('backtopage', 'alpha');
88 88
 
89
-$lineid    =  GETPOST('lineid', 'int');
90
-$contactid =  GETPOST('contactid', 'int');
91
-$projectid =  GETPOST('projectid', 'int');
92
-$origin    =  GETPOST('origin', 'alpha');
93
-$originid  = (GETPOST('originid', 'int') ? GETPOST('originid', 'int') : GETPOST('origin_id', 'int'));    // For backward compatibility
89
+$lineid    = GETPOST('lineid', 'int');
90
+$contactid = GETPOST('contactid', 'int');
91
+$projectid = GETPOST('projectid', 'int');
92
+$origin    = GETPOST('origin', 'alpha');
93
+$originid  = (GETPOST('originid', 'int') ? GETPOST('originid', 'int') : GETPOST('origin_id', 'int')); // For backward compatibility
94 94
 $rank      = (GETPOST('rank', 'int') > 0) ? GETPOST('rank', 'int') : -1;
95 95
 
96 96
 // PDF
@@ -115,26 +115,26 @@  discard block
 block discarded – undo
115 115
 $extrafields->fetch_name_optionals_label($object->table_element);
116 116
 
117 117
 // Load object
118
-include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php';     // Must be include, not include_once
118
+include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
119 119
 
120 120
 // Permissions / Rights
121
-$usercanread    =  $user->hasRight("commande", "lire");
122
-$usercancreate  =  $user->hasRight("commande", "creer");
123
-$usercandelete  =  $user->hasRight("commande", "supprimer");
121
+$usercanread    = $user->hasRight("commande", "lire");
122
+$usercancreate  = $user->hasRight("commande", "creer");
123
+$usercandelete  = $user->hasRight("commande", "supprimer");
124 124
 
125 125
 // Advanced permissions
126
-$usercanclose       =  ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($usercancreate)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('commande', 'order_advance', 'close')));
127
-$usercanvalidate    =  ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('commande', 'order_advance', 'validate')));
128
-$usercancancel      =  ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('commande', 'order_advance', 'annuler')));
129
-$usercansend        =   (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->hasRight('commande', 'order_advance', 'send'));
130
-$usercangeneretedoc =   (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->hasRight('commande', 'order_advance', 'generetedoc'));
126
+$usercanclose       = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($usercancreate)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('commande', 'order_advance', 'close')));
127
+$usercanvalidate    = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('commande', 'order_advance', 'validate')));
128
+$usercancancel      = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('commande', 'order_advance', 'annuler')));
129
+$usercansend        = (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->hasRight('commande', 'order_advance', 'send'));
130
+$usercangeneretedoc = (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->hasRight('commande', 'order_advance', 'generetedoc'));
131 131
 
132 132
 $usermustrespectpricemin    = ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS));
133 133
 $usercancreatepurchaseorder = ($user->hasRight('fournisseur', 'commande', 'creer') || $user->hasRight('supplier_order', 'creer'));
134 134
 
135
-$permissionnote    = $usercancreate;     //  Used by the include of actions_setnotes.inc.php
136
-$permissiondellink = $usercancreate;     //  Used by the include of actions_dellink.inc.php
137
-$permissiontoadd   = $usercancreate;     //  Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
135
+$permissionnote    = $usercancreate; //  Used by the include of actions_setnotes.inc.php
136
+$permissiondellink = $usercancreate; //  Used by the include of actions_dellink.inc.php
137
+$permissiontoadd   = $usercancreate; //  Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
138 138
 
139 139
 
140 140
 $error = 0;
@@ -177,11 +177,11 @@  discard block
 block discarded – undo
177 177
 		$action = '';
178 178
 	}
179 179
 
180
-	include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php';    // Must be include, not include_once
180
+	include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once
181 181
 
182
-	include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';     // Must be include, not include_once
182
+	include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once
183 183
 
184
-	include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php';  // Must be include, not include_once
184
+	include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once
185 185
 
186 186
 	// Action clone object
187 187
 	if ($action == 'confirm_clone' && $confirm == 'yes' && $usercancreate) {
@@ -666,7 +666,7 @@  discard block
 block discarded – undo
666 666
 		$pu_ht = '';
667 667
 		$pu_ttc = '';
668 668
 		$pu_ht_devise = '';
669
-		$pu_ttc_devise  = '';
669
+		$pu_ttc_devise = '';
670 670
 
671 671
 		if (GETPOST('price_ht') !== '') {
672 672
 			$price_ht = price2num(GETPOST('price_ht'), 'MU', 2);
@@ -808,8 +808,8 @@  discard block
 block discarded – undo
808 808
 						if (count($prodcustprice->lines) > 0) {
809 809
 							$pu_ht = price($prodcustprice->lines[0]->price);
810 810
 							$pu_ttc = price($prodcustprice->lines[0]->price_ttc);
811
-							$price_min =  price($prodcustprice->lines[0]->price_min);
812
-							$price_min_ttc =  price($prodcustprice->lines[0]->price_min_ttc);
811
+							$price_min = price($prodcustprice->lines[0]->price_min);
812
+							$price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc);
813 813
 							$price_base_type = $prodcustprice->lines[0]->price_base_type;
814 814
 							$tva_tx = $prodcustprice->lines[0]->tva_tx;
815 815
 							if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) {
@@ -908,8 +908,8 @@  discard block
 block discarded – undo
908 908
 				}
909 909
 
910 910
 				//If text set in desc is the same as product descpription (as now it's preloaded) whe add it only one time
911
-				if ($product_desc==$desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) {
912
-					$product_desc='';
911
+				if ($product_desc == $desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) {
912
+					$product_desc = '';
913 913
 				}
914 914
 
915 915
 				if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) {
@@ -1305,7 +1305,7 @@  discard block
 block discarded – undo
1305 1305
 					GETPOST('generate_deposit', 'alpha') == 'on' && !empty($deposit_percent_from_payment_terms)
1306 1306
 					&& isModEnabled('facture') && !empty($user->rights->facture->creer)
1307 1307
 				) {
1308
-					require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
1308
+					require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
1309 1309
 
1310 1310
 					$date = dol_mktime(0, 0, 0, GETPOST('datefmonth', 'int'), GETPOST('datefday', 'int'), GETPOST('datefyear', 'int'));
1311 1311
 					$forceFields = array();
@@ -1318,7 +1318,7 @@  discard block
 block discarded – undo
1318 1318
 
1319 1319
 					if ($deposit) {
1320 1320
 						setEventMessage('DepositGenerated');
1321
-						$locationTarget = DOL_URL_ROOT . '/compta/facture/card.php?id=' . $deposit->id;
1321
+						$locationTarget = DOL_URL_ROOT.'/compta/facture/card.php?id='.$deposit->id;
1322 1322
 					} else {
1323 1323
 						$error++;
1324 1324
 						setEventMessages($object->error, $object->errors, 'errors');
@@ -1326,7 +1326,7 @@  discard block
 block discarded – undo
1326 1326
 				}
1327 1327
 
1328 1328
 				// Define output language
1329
-				if (! $error) {
1329
+				if (!$error) {
1330 1330
 					$db->commit();
1331 1331
 
1332 1332
 					if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
@@ -1354,7 +1354,7 @@  discard block
 block discarded – undo
1354 1354
 					}
1355 1355
 
1356 1356
 					if ($locationTarget) {
1357
-						header('Location: ' . $locationTarget);
1357
+						header('Location: '.$locationTarget);
1358 1358
 						exit;
1359 1359
 					}
1360 1360
 				} else {
@@ -1547,7 +1547,7 @@  discard block
 block discarded – undo
1547 1547
 	include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
1548 1548
 
1549 1549
 	// Actions to build doc
1550
-	$upload_dir = !empty($conf->commande->multidir_output[$object->entity])?$conf->commande->multidir_output[$object->entity]:$conf->commande->dir_output;
1550
+	$upload_dir = !empty($conf->commande->multidir_output[$object->entity]) ? $conf->commande->multidir_output[$object->entity] : $conf->commande->dir_output;
1551 1551
 	$permissiontoadd = $usercancreate;
1552 1552
 	include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
1553 1553
 
@@ -1780,7 +1780,7 @@  discard block
 block discarded – undo
1780 1780
 	print '<form name="crea_commande" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
1781 1781
 	print '<input type="hidden" name="token" value="'.newToken().'">';
1782 1782
 	print '<input type="hidden" name="action" value="add">';
1783
-	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
1783
+	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
1784 1784
 	print '<input type="hidden" name="remise_percent" value="'.$soc->remise_percent.'">';
1785 1785
 	print '<input type="hidden" name="origin" value="'.$origin.'">';
1786 1786
 	print '<input type="hidden" name="originid" value="'.$originid.'">';
@@ -1842,7 +1842,7 @@  discard block
 block discarded – undo
1842 1842
 		// Contacts (ask contact only if thirdparty already defined).
1843 1843
 		print "<tr><td>".$langs->trans("DefaultContact").'</td><td>';
1844 1844
 		print img_picto('', 'contact', 'class="pictofixedwidth"');
1845
-		print $form->selectcontacts($soc->id, $contactid, 'contactid', 1, !empty($srccontactslist)?$srccontactslist:"", '', 1, 'maxwidth200 widthcentpercentminusx');
1845
+		print $form->selectcontacts($soc->id, $contactid, 'contactid', 1, !empty($srccontactslist) ? $srccontactslist : "", '', 1, 'maxwidth200 widthcentpercentminusx');
1846 1846
 		print '</td></tr>';
1847 1847
 
1848 1848
 		// Ligne info remises tiers
@@ -1911,14 +1911,14 @@  discard block
 block discarded – undo
1911 1911
 		require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
1912 1912
 		$formproduct = new FormProduct($db);
1913 1913
 		print '<tr><td>'.$langs->trans('Warehouse').'</td><td>';
1914
-		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');
1914
+		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');
1915 1915
 		print '</td></tr>';
1916 1916
 	}
1917 1917
 
1918 1918
 	// Source / Channel - What trigger creation
1919 1919
 	print '<tr><td>'.$langs->trans('Channel').'</td><td>';
1920 1920
 	print img_picto('', 'question', 'class="pictofixedwidth"');
1921
-	$form->selectInputReason((GETPOSTISSET('demand_reason_id')?GETPOST('demand_reason_id'):$demand_reason_id), 'demand_reason_id', '', 1, 'maxwidth200 widthcentpercentminusx');
1921
+	$form->selectInputReason((GETPOSTISSET('demand_reason_id') ?GETPOST('demand_reason_id') : $demand_reason_id), 'demand_reason_id', '', 1, 'maxwidth200 widthcentpercentminusx');
1922 1922
 	print '</td></tr>';
1923 1923
 
1924 1924
 	// TODO How record was recorded OrderMode (llx_c_input_method)
@@ -1928,7 +1928,7 @@  discard block
 block discarded – undo
1928 1928
 		$langs->load("projects");
1929 1929
 		print '<tr>';
1930 1930
 		print '<td>'.$langs->trans("Project").'</td><td>';
1931
-		print img_picto('', 'project', 'class="pictofixedwidth"').$formproject->select_projects(($soc->id > 0 ? $soc->id : -1), (GETPOSTISSET('projectid')?GETPOST('projectid'):$projectid), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500 widthcentpercentminusxx');
1931
+		print img_picto('', 'project', 'class="pictofixedwidth"').$formproject->select_projects(($soc->id > 0 ? $soc->id : -1), (GETPOSTISSET('projectid') ?GETPOST('projectid') : $projectid), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500 widthcentpercentminusxx');
1932 1932
 		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>';
1933 1933
 		print '</td>';
1934 1934
 		print '</tr>';
@@ -1953,7 +1953,7 @@  discard block
 block discarded – undo
1953 1953
 	// Other attributes
1954 1954
 	$parameters = array();
1955 1955
 	if (!empty($origin) && !empty($originid) && is_object($objectsrc)) {
1956
-		$parameters['objectsrc'] =  $objectsrc;
1956
+		$parameters['objectsrc'] = $objectsrc;
1957 1957
 	}
1958 1958
 	$parameters['socid'] = $socid;
1959 1959
 
@@ -1988,7 +1988,7 @@  discard block
 block discarded – undo
1988 1988
 		print '<tr>';
1989 1989
 		print '<td>'.$form->editfieldkey("Currency", 'multicurrency_code', '', $object, 0).'</td>';
1990 1990
 		print '<td class="maxwidthonsmartphone">';
1991
-		print img_picto('', 'currency', 'class="pictofixedwidth"').$form->selectMultiCurrency((GETPOSTISSET('multicurrency_code')?GETPOST('multicurrency_code'):$currency_code), 'multicurrency_code', 0, '', false, 'maxwidth200 widthcentpercentminusx');
1991
+		print img_picto('', 'currency', 'class="pictofixedwidth"').$form->selectMultiCurrency((GETPOSTISSET('multicurrency_code') ?GETPOST('multicurrency_code') : $currency_code), 'multicurrency_code', 0, '', false, 'maxwidth200 widthcentpercentminusx');
1992 1992
 		print '</td></tr>';
1993 1993
 	}
1994 1994
 
@@ -2169,14 +2169,14 @@  discard block
 block discarded – undo
2169 2169
 			$nbMandated = 0;
2170 2170
 			foreach ($object->lines as $line) {
2171 2171
 				$res = $line->fetch_product();
2172
-				if ($res  > 0  ) {
2173
-					if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end) )) {
2172
+				if ($res > 0) {
2173
+					if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) {
2174 2174
 						$nbMandated++;
2175 2175
 						break;
2176 2176
 					}
2177 2177
 				}
2178 2178
 			}
2179
-			if ($nbMandated > 0 ) $text .= '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>';
2179
+			if ($nbMandated > 0) $text .= '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>';
2180 2180
 
2181 2181
 			if (getDolGlobalInt('SALE_ORDER_SUGGEST_DOWN_PAYMENT_INVOICE_CREATION')) {
2182 2182
 				// This is a hidden option:
@@ -2186,7 +2186,7 @@  discard block
 block discarded – undo
2186 2186
 				$deposit_percent_from_payment_terms = getDictionaryValue('c_payment_term', 'deposit_percent', $object->cond_reglement_id);
2187 2187
 
2188 2188
 				if (!empty($deposit_percent_from_payment_terms) && isModEnabled('facture') && !empty($user->rights->facture->creer)) {
2189
-					require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
2189
+					require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
2190 2190
 
2191 2191
 					$object->fetchObjectLinked();
2192 2192
 
@@ -2716,55 +2716,55 @@  discard block
 block discarded – undo
2716 2716
 
2717 2717
 		$alert = '';
2718 2718
 		if (!empty($conf->global->ORDER_MANAGE_MIN_AMOUNT) && $object->total_ht < $object->thirdparty->order_min_amount) {
2719
-			$alert = ' ' . img_warning($langs->trans('OrderMinAmount') . ': ' . price($object->thirdparty->order_min_amount));
2719
+			$alert = ' '.img_warning($langs->trans('OrderMinAmount').': '.price($object->thirdparty->order_min_amount));
2720 2720
 		}
2721 2721
 
2722 2722
 		print '<tr>';
2723
-		print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>';
2724
-		print '<td class="nowrap amountcard right">' . price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
2723
+		print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>';
2724
+		print '<td class="nowrap amountcard right">'.price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency).'</td>';
2725 2725
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2726 2726
 			// Multicurrency Amount HT
2727
-			print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
2727
+			print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
2728 2728
 		}
2729 2729
 		print '</tr>';
2730 2730
 
2731 2731
 		print '<tr>';
2732
-		print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>';
2733
-		print '<td class="nowrap amountcard right">' . price($object->total_tva, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
2732
+		print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>';
2733
+		print '<td class="nowrap amountcard right">'.price($object->total_tva, '', $langs, 0, -1, -1, $conf->currency).'</td>';
2734 2734
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2735 2735
 			// Multicurrency Amount VAT
2736
-			print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
2736
+			print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
2737 2737
 		}
2738 2738
 		print '</tr>';
2739 2739
 
2740 2740
 		// Amount Local Taxes
2741 2741
 		if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) {
2742 2742
 			print '<tr>';
2743
-			print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
2744
-			print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
2743
+			print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>';
2744
+			print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency).'</td>';
2745 2745
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2746
-				print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
2746
+				print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
2747 2747
 			}
2748 2748
 			print '</tr>';
2749 2749
 
2750 2750
 			// Amount Local Taxes
2751 2751
 			if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) {
2752 2752
 				print '<tr>';
2753
-				print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>';
2754
-				print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
2753
+				print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>';
2754
+				print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency).'</td>';
2755 2755
 				if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2756
-					print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
2756
+					print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
2757 2757
 				}
2758 2758
 				print '</tr>';
2759 2759
 			}
2760 2760
 		}
2761 2761
 
2762 2762
 		print '<tr>';
2763
-		print '<td>' . $langs->trans('AmountTTC') . '</td>';
2764
-		print '<td class="valuefield nowrap right amountcard">' . price($object->total_ttc, 1, '', 1, -1, -1, $conf->currency) . '</td>';
2763
+		print '<td>'.$langs->trans('AmountTTC').'</td>';
2764
+		print '<td class="valuefield nowrap right amountcard">'.price($object->total_ttc, 1, '', 1, -1, -1, $conf->currency).'</td>';
2765 2765
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2766 2766
 			// Multicurrency Amount TTC
2767
-			print '<td class="valuefield nowrap right amountcard">' . price($object->multicurrency_total_ttc, 1, '', 1, -1, -1, $object->multicurrency_code) . '</td>';
2767
+			print '<td class="valuefield nowrap right amountcard">'.price($object->multicurrency_total_ttc, 1, '', 1, -1, -1, $object->multicurrency_code).'</td>';
2768 2768
 		}
2769 2769
 		print '</tr>'."\n";
2770 2770
 
@@ -2874,7 +2874,7 @@  discard block
 block discarded – undo
2874 2874
 						if ($usercansend) {
2875 2875
 							print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', '');
2876 2876
 						} else {
2877
-							print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
2877
+							print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
2878 2878
 						}
2879 2879
 					}
2880 2880
 				}
@@ -2913,7 +2913,7 @@  discard block
 block discarded – undo
2913 2913
 						if ($user->hasRight('ficheinter', 'creer')) {
2914 2914
 							print dolGetButtonAction('', $langs->trans('AddIntervention'), 'default', DOL_URL_ROOT.'/fichinter/card.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid, '');
2915 2915
 						} else {
2916
-							print dolGetButtonAction($langs->trans('NotAllowed'), $langs->trans('AddIntervention'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
2916
+							print dolGetButtonAction($langs->trans('NotAllowed'), $langs->trans('AddIntervention'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
2917 2917
 						}
2918 2918
 					}
2919 2919
 				}
@@ -2937,11 +2937,11 @@  discard block
 block discarded – undo
2937 2937
 							if ($user->hasRight('expedition', 'creer')) {
2938 2938
 								print dolGetButtonAction('', $langs->trans('CreateShipment'), 'default', DOL_URL_ROOT.'/expedition/shipment.php?id='.$object->id, '');
2939 2939
 							} else {
2940
-								print dolGetButtonAction($langs->trans('NotAllowed'), $langs->trans('CreateShipment'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
2940
+								print dolGetButtonAction($langs->trans('NotAllowed'), $langs->trans('CreateShipment'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
2941 2941
 							}
2942 2942
 						} else {
2943 2943
 							$langs->load("errors");
2944
-							print dolGetButtonAction($langs->trans('ErrorModuleSetupNotComplete'), $langs->trans('CreateShipment'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
2944
+							print dolGetButtonAction($langs->trans('ErrorModuleSetupNotComplete'), $langs->trans('CreateShipment'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
2945 2945
 						}
2946 2946
 					}
2947 2947
 				}
@@ -2980,7 +2980,7 @@  discard block
 block discarded – undo
2980 2980
 					if ($numshipping == 0) {
2981 2981
 						print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id, '');
2982 2982
 					} else {
2983
-						print dolGetButtonAction($langs->trans('ShippingExist'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
2983
+						print dolGetButtonAction($langs->trans('ShippingExist'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
2984 2984
 					}
2985 2985
 				}
2986 2986
 			}
Please login to merge, or discard this patch.
htdocs/commande/contact.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 }
48 48
 $result = restrictedArea($user, 'commande', $id, '');
49 49
 
50
-$usercancreate  =  $user->hasRight("commande", "creer");
50
+$usercancreate = $user->hasRight("commande", "creer");
51 51
 
52 52
 $object = new Commande($db);
53 53
 
Please login to merge, or discard this patch.
htdocs/adherents/subscription/card.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -269,7 +269,7 @@
 block discarded – undo
269 269
 
270 270
 	// Confirmation to delete subscription
271 271
 	if ($action == 'delete') {
272
-		$formquestion=array();
272
+		$formquestion = array();
273 273
 		//$formquestion['text']='<b>'.$langs->trans("ThisWillAlsoDeleteBankRecord").'</b>';
274 274
 		$text = $langs->trans("ConfirmDeleteSubscription");
275 275
 		if (isModEnabled("banque") && !empty($conf->global->ADHERENT_BANK_USE)) {
Please login to merge, or discard this patch.
htdocs/asset/tpl/accountancy_codes_view.tpl.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 }
51 51
 
52 52
 if (empty($reshook)) {
53
-	if (isModEnabled('accounting')) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
53
+	if (isModEnabled('accounting')) require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
54 54
 
55 55
 	foreach ($assetaccountancycodes->accountancy_codes_fields as $mode_key => $mode_info) {
56 56
 		//if (empty($object->enabled_modes[$mode_key])) continue;
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 		print '<div class="underbanner clearboth"></div>';
61 61
 		print '<table class="border centpercent tableforfield">';
62 62
 		foreach ($mode_info['fields'] as $field_key => $field_info) {
63
-			print '<tr><td class="titlefieldcreate">' . $langs->trans($field_info['label']) . '</td><td colspan="3">';
63
+			print '<tr><td class="titlefieldcreate">'.$langs->trans($field_info['label']).'</td><td colspan="3">';
64 64
 			if (!empty($assetaccountancycodes->accountancy_codes[$mode_key][$field_key])) {
65 65
 				$accountancy_code = $assetaccountancycodes->accountancy_codes[$mode_key][$field_key];
66 66
 				if (isModEnabled('accounting')) {
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,9 @@
 block discarded – undo
50 50
 }
51 51
 
52 52
 if (empty($reshook)) {
53
-	if (isModEnabled('accounting')) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
53
+	if (isModEnabled('accounting')) {
54
+		require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
55
+	}
54 56
 
55 57
 	foreach ($assetaccountancycodes->accountancy_codes_fields as $mode_key => $mode_info) {
56 58
 		//if (empty($object->enabled_modes[$mode_key])) continue;
Please login to merge, or discard this patch.
htdocs/asset/tpl/accountancy_codes_edit.tpl.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 }
36 36
 
37 37
 if (isModEnabled('accounting') && !is_object($formaccounting)) {
38
-	require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
38
+	require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
39 39
 	$formaccounting = new FormAccounting($db);
40 40
 }
41 41
 
@@ -63,13 +63,13 @@  discard block
 block discarded – undo
63 63
 		print '<div class="underbanner clearboth"></div>';
64 64
 		print '<table class="border centpercent tableforfield">';
65 65
 		foreach ($mode_info['fields'] as $field_key => $field_info) {
66
-			$html_name = $mode_key . '_' . $field_key;
67
-			print '<tr><td class="titlefieldcreate">' . $langs->trans($field_info['label']) . '</td><td colspan="3">';
66
+			$html_name = $mode_key.'_'.$field_key;
67
+			print '<tr><td class="titlefieldcreate">'.$langs->trans($field_info['label']).'</td><td colspan="3">';
68 68
 			$accountancy_code = GETPOSTISSET($html_name) ? GETPOST($html_name, 'aZ09') : (!empty($assetaccountancycodes->accountancy_codes[$mode_key][$field_key]) ? $assetaccountancycodes->accountancy_codes[$mode_key][$field_key] : '');
69 69
 			if (isModEnabled('accounting')) {
70 70
 				print $formaccounting->select_account($accountancy_code, $html_name, 1, null, 1, 1, 'minwidth150 maxwidth300', 1);
71 71
 			} else {
72
-				print '<input name="' . $html_name . '" class="maxwidth200" value="' . dol_escape_htmltag($accountancy_code) . '">';
72
+				print '<input name="'.$html_name.'" class="maxwidth200" value="'.dol_escape_htmltag($accountancy_code).'">';
73 73
 			}
74 74
 			print '</td></tr>';
75 75
 		}
Please login to merge, or discard this patch.
htdocs/ticket/agenda.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,9 @@
 block discarded – undo
61 61
 
62 62
 // Security check
63 63
 $id = GETPOST("id", 'int');
64
-if ($user->socid > 0) $socid = $user->socid;
64
+if ($user->socid > 0) {
65
+	$socid = $user->socid;
66
+}
65 67
 $result = restrictedArea($user, 'ticket', $object->id, '');
66 68
 
67 69
 // restrict access for externals users
Please login to merge, or discard this patch.
htdocs/theme/eldy/btn.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 if (!empty($conf->global->THEME_DARKMODEENABLED)) {
19 19
 	print "/* For dark mode */\n";
20 20
 	if ($conf->global->THEME_DARKMODEENABLED != 2) {
21
-		print "@media (prefers-color-scheme: dark) {";	// To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes
21
+		print "@media (prefers-color-scheme: dark) {"; // To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes
22 22
 	} else {
23 23
 		print "@media not print {";
24 24
 	}
Please login to merge, or discard this patch.
htdocs/theme/md/style.css.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 $colortext           = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXT) ? $colortext : $conf->global->THEME_ELDY_TEXT) : (empty($user->conf->THEME_ELDY_TEXT) ? $colortext : $user->conf->THEME_ELDY_TEXT);
186 186
 $colortextlink       = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTLINK) ? $colortext : $conf->global->THEME_ELDY_TEXTLINK) : (empty($user->conf->THEME_ELDY_TEXTLINK) ? $colortextlink : $user->conf->THEME_ELDY_TEXTLINK);
187 187
 $butactionbg       	 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_BTNACTION) ? $butactionbg : $conf->global->THEME_ELDY_BTNACTION) : (empty($user->conf->THEME_ELDY_BTNACTION) ? $butactionbg : $user->conf->THEME_ELDY_BTNACTION);
188
-$textbutaction     = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTBTNACTION) ? $textbutaction : $conf->global->THEME_ELDY_TEXTBTNACTION) : (empty($user->conf->THEME_ELDY_TEXTBTNACTION) ? $textbutaction : $user->conf->THEME_ELDY_TEXTBTNACTION);
188
+$textbutaction = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTBTNACTION) ? $textbutaction : $conf->global->THEME_ELDY_TEXTBTNACTION) : (empty($user->conf->THEME_ELDY_TEXTBTNACTION) ? $textbutaction : $user->conf->THEME_ELDY_TEXTBTNACTION);
189 189
 $fontsize            = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_FONT_SIZE1) ? $fontsize : $conf->global->THEME_ELDY_FONT_SIZE1) : (empty($user->conf->THEME_ELDY_FONT_SIZE1) ? $fontsize : $user->conf->THEME_ELDY_FONT_SIZE1);
190 190
 $fontsizesmaller     = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_FONT_SIZE2) ? $fontsize : $conf->global->THEME_ELDY_FONT_SIZE2) : (empty($user->conf->THEME_ELDY_FONT_SIZE2) ? $fontsize : $user->conf->THEME_ELDY_FONT_SIZE2);
191 191
 
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
 if (!empty($conf->global->THEME_DARKMODEENABLED)) {
361 361
 	print "/* For dark mode */\n";
362 362
 	if ($conf->global->THEME_DARKMODEENABLED != 2) {
363
-		print "@media (prefers-color-scheme: dark) {";	// To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes
363
+		print "@media (prefers-color-scheme: dark) {"; // To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes
364 364
 	} else {
365 365
 		print "@media not print {";
366 366
 	}
Please login to merge, or discard this patch.