Completed
Branch develop (ce2631)
by
unknown
22:08
created
htdocs/compta/facture/card.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 }
82 82
 
83 83
 // General $Variables
84
-$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('facid'));    // For backward compatibility
84
+$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('facid')); // For backward compatibility
85 85
 $ref = GETPOST('ref', 'alpha');
86 86
 $socid = GETPOSTINT('socid');
87 87
 $action = GETPOST('action', 'aZ09');
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 					setEventMessages('', $warningMsgLineList, 'warnings');
247 247
 				}
248 248
 
249
-				header("Location: " . $_SERVER['PHP_SELF'] . '?facid=' . $result);
249
+				header("Location: ".$_SERVER['PHP_SELF'].'?facid='.$result);
250 250
 				exit();
251 251
 			} else {
252 252
 				$langs->load("errors");
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
 		// Validation
338 338
 		$object->fetch($id);
339 339
 
340
-		if ((preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) &&	// empty should not happened, but when it occurs, the test save life
340
+		if ((preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) && // empty should not happened, but when it occurs, the test save life
341 341
 			getDolGlobalString('FAC_FORCE_DATE_VALIDATION')								// If option enabled, we force invoice date
342 342
 		) {
343 343
 			$object->date = dol_now();
@@ -1049,7 +1049,7 @@  discard block
 block discarded – undo
1049 1049
 			$error++;
1050 1050
 		}
1051 1051
 
1052
-		$dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver');	// If we enter the 02 january, we need to save the 02 january for server
1052
+		$dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server
1053 1053
 		$date_pointoftax = dol_mktime(0, 0, 0, GETPOSTINT('date_pointoftaxmonth'), GETPOSTINT('date_pointoftaxday'), GETPOSTINT('date_pointoftaxyear'), 'tzserver');
1054 1054
 
1055 1055
 		// Replacement invoice
@@ -1081,7 +1081,7 @@  discard block
 block discarded – undo
1081 1081
 				$object->note_private		= trim(GETPOST('note_private', 'restricthtml'));
1082 1082
 				$object->ref_client			= GETPOST('ref_client', 'alphanohtml');
1083 1083
 				$object->ref_customer		= GETPOST('ref_client', 'alphanohtml');
1084
-				$object->model_pdf          = GETPOST('model', 'alphanohtml');
1084
+				$object->model_pdf = GETPOST('model', 'alphanohtml');
1085 1085
 				$object->fk_project			= GETPOSTINT('projectid');
1086 1086
 				$object->cond_reglement_id	= GETPOSTINT('cond_reglement_id');
1087 1087
 				$object->mode_reglement_id	= GETPOSTINT('mode_reglement_id');
@@ -1142,9 +1142,9 @@  discard block
 block discarded – undo
1142 1142
 				$object->note_private		= trim(GETPOST('note_private', 'restricthtml'));
1143 1143
 				$object->ref_client			= GETPOST('ref_client', 'alphanohtml');
1144 1144
 				$object->ref_customer		= GETPOST('ref_client', 'alphanohtml');
1145
-				$object->model_pdf          = GETPOST('model');
1145
+				$object->model_pdf = GETPOST('model');
1146 1146
 				$object->fk_project			= GETPOSTINT('projectid');
1147
-				$object->cond_reglement_id	= 0;		// No payment term for a credit note
1147
+				$object->cond_reglement_id	= 0; // No payment term for a credit note
1148 1148
 				$object->mode_reglement_id	= GETPOSTINT('mode_reglement_id');
1149 1149
 				$object->fk_account         = GETPOSTINT('fk_account');
1150 1150
 				//$object->remise_absolue		= price2num(GETPOST('remise_absolue'), 'MU');
@@ -1466,7 +1466,7 @@  discard block
 block discarded – undo
1466 1466
 				$object->note_public		= trim(GETPOST('note_public', 'restricthtml'));
1467 1467
 				$object->note_private       = trim(GETPOST('note_private', 'restricthtml'));
1468 1468
 				$object->ref_client			= GETPOST('ref_client');
1469
-				$object->ref_customer		= GETPOST('ref_client');
1469
+				$object->ref_customer = GETPOST('ref_client');
1470 1470
 				$object->model_pdf          = GETPOST('model');
1471 1471
 				$object->fk_project			= GETPOSTINT('projectid');
1472 1472
 				$object->cond_reglement_id	= (GETPOSTINT('type') == 3 ? 1 : GETPOST('cond_reglement_id'));
@@ -1986,7 +1986,7 @@  discard block
 block discarded – undo
1986 1986
 						$line->fk_prev_id = $line->id;
1987 1987
 						$line->fetch_optionals();
1988 1988
 						if (getDolGlobalInt('INVOICE_USE_SITUATION') == 2) {
1989
-							$line->situation_percent = $line->get_allprev_progress($object->id);; // get good progress including credit note
1989
+							$line->situation_percent = $line->get_allprev_progress($object->id); ; // get good progress including credit note
1990 1990
 						} else {
1991 1991
 							$line->situation_percent = $line->get_prev_progress($object->id); // get good progress including credit note
1992 1992
 						}
@@ -2085,7 +2085,7 @@  discard block
 block discarded – undo
2085 2085
 		} else {
2086 2086
 			$db->rollback();
2087 2087
 			$action = 'create';
2088
-			$_GET["origin"] = $_POST["origin"];		// Keep GET and POST here ?
2088
+			$_GET["origin"] = $_POST["origin"]; // Keep GET and POST here ?
2089 2089
 			$_GET["originid"] = $_POST["originid"]; // Keep GET and POST here ?
2090 2090
 			setEventMessages($object->error, $object->errors, 'errors');
2091 2091
 		}
@@ -2112,7 +2112,7 @@  discard block
 block discarded – undo
2112 2112
 		$remise_percent = (GETPOST('remiseforalllines') ? GETPOST('remiseforalllines') : 0);
2113 2113
 		$remise_percent = str_replace('*', '', $remise_percent);
2114 2114
 		foreach ($object->lines as $line) {
2115
-			$tvatx= $line->tva_tx;
2115
+			$tvatx = $line->tva_tx;
2116 2116
 			if (!empty($line->vat_src_code)) {
2117 2117
 				$tvatx .= ' ('.$line->vat_src_code.')';
2118 2118
 			}
@@ -2632,7 +2632,7 @@  discard block
 block discarded – undo
2632 2632
 		// Define special_code for special lines
2633 2633
 		$special_code = GETPOSTINT('special_code');
2634 2634
 		if ($special_code == 3) {
2635
-			$special_code = 0;	// Options should not exists on invoices
2635
+			$special_code = 0; // Options should not exists on invoices
2636 2636
 		}
2637 2637
 
2638 2638
 		$line = new FactureLigne($db);
@@ -3267,8 +3267,8 @@  discard block
 block discarded – undo
3267 3267
 				//$remise_absolue 	= (!empty($expesrc->remise_absolue) ? $expesrc->remise_absolue : (!empty($soc->remise_absolue) ? $soc->remise_absolue : 0));
3268 3268
 
3269 3269
 				if (isModEnabled('multicurrency')) {
3270
-					$currency_code 	= (!empty($expesrc->multicurrency_code) ? $expesrc->multicurrency_code : (!empty($soc->multicurrency_code) ? $soc->multicurrency_code : $objectsrc->multicurrency_code));
3271
-					$currency_tx 	= (!empty($expesrc->multicurrency_tx) ? $expesrc->multicurrency_tx : (!empty($soc->multicurrency_tx) ? $soc->multicurrency_tx : $objectsrc->multicurrency_tx));
3270
+					$currency_code = (!empty($expesrc->multicurrency_code) ? $expesrc->multicurrency_code : (!empty($soc->multicurrency_code) ? $soc->multicurrency_code : $objectsrc->multicurrency_code));
3271
+					$currency_tx = (!empty($expesrc->multicurrency_tx) ? $expesrc->multicurrency_tx : (!empty($soc->multicurrency_tx) ? $soc->multicurrency_tx : $objectsrc->multicurrency_tx));
3272 3272
 				}
3273 3273
 
3274 3274
 				//Replicate extrafields
@@ -3364,7 +3364,7 @@  discard block
 block discarded – undo
3364 3364
 	print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="POST" id="formtocreate" name="formtocreate">';
3365 3365
 	print '<input type="hidden" name="token" value="'.newToken().'">';
3366 3366
 	print '<input type="hidden" name="action" id="formtocreateaction" value="add">';
3367
-	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
3367
+	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
3368 3368
 	if ($soc->id > 0) {
3369 3369
 		print '<input type="hidden" name="socid" value="'.$soc->id.'">'."\n";
3370 3370
 	}
@@ -4413,7 +4413,7 @@  discard block
 block discarded – undo
4413 4413
 		$nbMandated = 0;
4414 4414
 		foreach ($object->lines as $line) {
4415 4415
 			$res = $line->fetch_product();
4416
-			if ($res  > 0) {
4416
+			if ($res > 0) {
4417 4417
 				if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) {
4418 4418
 					$nbMandated++;
4419 4419
 					break;
@@ -4616,7 +4616,7 @@  discard block
 block discarded – undo
4616 4616
 	}
4617 4617
 	// Ref customer
4618 4618
 	$morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_customer, $object, $usercancreate, 'string', '', 0, 1);
4619
-	$morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_customer, $object, $usercancreate, 'string'.(getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1);
4619
+	$morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_customer, $object, $usercancreate, 'string'.(getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1);
4620 4620
 	// Thirdparty
4621 4621
 	$morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1, 'customer');
4622 4622
 	if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $object->thirdparty->id > 0) {
@@ -5047,45 +5047,45 @@  discard block
 block discarded – undo
5047 5047
 		}
5048 5048
 		print '<tr>';
5049 5049
 		// Amount HT
5050
-		print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>';
5051
-		print '<td class="nowrap amountcard right">' . price($sign * $object->total_ht, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
5050
+		print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>';
5051
+		print '<td class="nowrap amountcard right">'.price($sign * $object->total_ht, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
5052 5052
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
5053 5053
 			// Multicurrency Amount HT
5054
-			print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
5054
+			print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
5055 5055
 		}
5056 5056
 		print '</tr>';
5057 5057
 
5058 5058
 		print '<tr>';
5059 5059
 		// Amount VAT
5060
-		print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>';
5061
-		print '<td class="nowrap amountcard right">' . price($sign * $object->total_tva, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
5060
+		print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>';
5061
+		print '<td class="nowrap amountcard right">'.price($sign * $object->total_tva, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
5062 5062
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
5063 5063
 			// Multicurrency Amount VAT
5064
-			print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
5064
+			print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
5065 5065
 		}
5066 5066
 		print '</tr>';
5067 5067
 
5068 5068
 		// Amount Local Taxes
5069 5069
 		if (($mysoc->localtax1_assuj == "1" && $mysoc->useLocalTax(1)) || $object->total_localtax1 != 0) {
5070 5070
 			print '<tr>';
5071
-			print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
5072
-			print '<td class="nowrap amountcard right">' . price($sign * $object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
5071
+			print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>';
5072
+			print '<td class="nowrap amountcard right">'.price($sign * $object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
5073 5073
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
5074 5074
 				$object->multicurrency_total_localtax1 = (float) price2num($object->total_localtax1 * $object->multicurrency_tx, 'MT');
5075 5075
 
5076
-				print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
5076
+				print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
5077 5077
 			}
5078 5078
 			print '</tr>';
5079 5079
 		}
5080 5080
 
5081 5081
 		if (($mysoc->localtax2_assuj == "1" && $mysoc->useLocalTax(2)) || $object->total_localtax2 != 0) {
5082 5082
 			print '<tr>';
5083
-			print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>';
5084
-			print '<td class="nowrap amountcard right">' . price($sign * $object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
5083
+			print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>';
5084
+			print '<td class="nowrap amountcard right">'.price($sign * $object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
5085 5085
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
5086 5086
 				$object->multicurrency_total_localtax2 = (float) price2num($object->total_localtax2 * $object->multicurrency_tx, 'MT');
5087 5087
 
5088
-				print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
5088
+				print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
5089 5089
 			}
5090 5090
 			print '</tr>';
5091 5091
 		}
@@ -5145,11 +5145,11 @@  discard block
 block discarded – undo
5145 5145
 
5146 5146
 		print '<tr>';
5147 5147
 		// Amount TTC
5148
-		print '<td>' . $langs->trans('AmountTTC') . '</td>';
5149
-		print '<td class="nowrap amountcard right">' . price($sign * $object->total_ttc, 0, $langs, 0, -1, -1, $conf->currency) . '</td>';
5148
+		print '<td>'.$langs->trans('AmountTTC').'</td>';
5149
+		print '<td class="nowrap amountcard right">'.price($sign * $object->total_ttc, 0, $langs, 0, -1, -1, $conf->currency).'</td>';
5150 5150
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
5151 5151
 			// Multicurrency Amount TTC
5152
-			print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_ttc, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
5152
+			print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_ttc, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
5153 5153
 		}
5154 5154
 		print '</tr>';
5155 5155
 
@@ -5808,7 +5808,7 @@  discard block
 block discarded – undo
5808 5808
 					$langs->load("contracts");
5809 5809
 
5810 5810
 					if ($usercancreatecontract) {
5811
-						print '<a class="butAction" href="' . DOL_URL_ROOT . '/contrat/card.php?action=create&amp;origin=' . $object->element . '&amp;originid=' . $object->id . '&amp;socid=' . $object->socid . '">' . $langs->trans('AddContract') . '</a>';
5811
+						print '<a class="butAction" href="'.DOL_URL_ROOT.'/contrat/card.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid.'">'.$langs->trans('AddContract').'</a>';
5812 5812
 					}
5813 5813
 				}
5814 5814
 			}
@@ -6032,7 +6032,7 @@  discard block
 block discarded – undo
6032 6032
 			if ($usercandelete || ($usercancreate && $isErasable == 1)) {	// isErasable = 1 means draft with temporary ref (draft can always be deleted with no need of permissions)
6033 6033
 				$enableDelete = false;
6034 6034
 				$deleteHref = '#';
6035
-				if ($isErasable > 0 && ! $objectidnext) {
6035
+				if ($isErasable > 0 && !$objectidnext) {
6036 6036
 					$deleteHref = $_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=delete&token='.newToken();
6037 6037
 					$enableDelete = true;
6038 6038
 				}
Please login to merge, or discard this patch.
htdocs/accountancy/journal/sellsjournal.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -140,13 +140,13 @@  discard block
 block discarded – undo
140 140
 $sql .= " FROM ".MAIN_DB_PREFIX."facturedet as fd";
141 141
 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = fd.fk_product";
142 142
 if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) {
143
-	$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity);
143
+	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity);
144 144
 }
145 145
 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON aa.rowid = fd.fk_code_ventilation";
146 146
 $sql .= " JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = fd.fk_facture";
147 147
 $sql .= " JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc";
148 148
 if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) {
149
-	$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity);
149
+	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = ".((int) $conf->entity);
150 150
 }
151 151
 $parameters = array();
152 152
 $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters); // Note that $action and $object may have been modified by hook
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 
222 222
 		//$compta_revenuestamp = getDolGlobalString('ACCOUNTING_REVENUESTAMP_SOLD_ACCOUNT', 'NotDefined');
223 223
 
224
-		$tax_id = $obj->tva_tx . ($obj->vat_src_code ? ' (' . $obj->vat_src_code . ')' : '');
224
+		$tax_id = $obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : '');
225 225
 		if (array_key_exists($tax_id, $vatdata_cache)) {
226 226
 			$vatdata = $vatdata_cache[$tax_id];
227 227
 		} else {
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 
299 299
 		// Move a part of the retained warrenty into the account of warranty
300 300
 		if (getDolGlobalString('INVOICE_USE_RETAINED_WARRANTY') && $obj->retained_warranty > 0) {
301
-			$retained_warranty = (float) price2num($total_ttc * $obj->retained_warranty / 100, 'MT');	// Calculate the amount of warrenty for this line (using the percent value)
301
+			$retained_warranty = (float) price2num($total_ttc * $obj->retained_warranty / 100, 'MT'); // Calculate the amount of warrenty for this line (using the percent value)
302 302
 			$tabwarranty[$obj->rowid][$compta_soc] += $retained_warranty;
303 303
 			$total_ttc -= $retained_warranty;
304 304
 		}
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
 		$totalcredit = 0;
438 438
 		$totaldebit = 0;
439 439
 
440
-		$db->begin();		// We accept transaction into loop so if we hang, we can continue transfer from last error
440
+		$db->begin(); // We accept transaction into loop so if we hang, we can continue transfer from last error
441 441
 
442 442
 		$companystatic->id = $tabcompany[$key]['id'];
443 443
 		$companystatic->name = $tabcompany[$key]['name'];
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
 					$bookkeeping->numero_compte = getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_RETAINED_WARRANTY');
497 497
 					$bookkeeping->label_compte = $accountingaccountcustomerwarranty->label;
498 498
 
499
-					$bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("RetainedWarranty");
499
+					$bookkeeping->label_operation = dol_trunc($companystatic->name, 16).' - '.$invoicestatic->ref.' - '.$langs->trans("RetainedWarranty");
500 500
 					$bookkeeping->montant = $mt;
501 501
 					$bookkeeping->sens = ($mt >= 0) ? 'D' : 'C';
502 502
 					$bookkeeping->debit = ($mt >= 0) ? $mt : 0;
@@ -574,7 +574,7 @@  discard block
 block discarded – undo
574 574
 					}
575 575
 				} else {
576 576
 					if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && getDolGlobalInt('ACCOUNTING_ENABLE_AUTOLETTERING')) {
577
-						require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php';
577
+						require_once DOL_DOCUMENT_ROOT.'/accountancy/class/lettering.class.php';
578 578
 						$lettering_static = new Lettering($db);
579 579
 
580 580
 						$nb_lettering = $lettering_static->bookkeepingLettering(array($bookkeeping->id));
@@ -669,7 +669,7 @@  discard block
 block discarded – undo
669 669
 
670 670
 				foreach ($arrayofvat[$key] as $k => $mt) {
671 671
 					if ($mt) {
672
-						$accountingaccount->fetch(null, $k, true);	// TODO Use a cache for label
672
+						$accountingaccount->fetch(null, $k, true); // TODO Use a cache for label
673 673
 						$label_account = $accountingaccount->label;
674 674
 
675 675
 						$bookkeeping = new BookKeeping($db);
@@ -730,7 +730,7 @@  discard block
 block discarded – undo
730 730
 			if (isset($tabrevenuestamp[$key]) && is_array($tabrevenuestamp[$key])) {
731 731
 				foreach ($tabrevenuestamp[$key] as $k => $mt) {
732 732
 					if ($mt) {
733
-						$accountingaccount->fetch(null, $k, true);    // TODO Use a cache for label
733
+						$accountingaccount->fetch(null, $k, true); // TODO Use a cache for label
734 734
 						$label_account = $accountingaccount->label;
735 735
 
736 736
 						$bookkeeping = new BookKeeping($db);
@@ -749,7 +749,7 @@  discard block
 block discarded – undo
749 749
 						$bookkeeping->numero_compte = $k;
750 750
 						$bookkeeping->label_compte = $label_account;
751 751
 
752
-						$bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("RevenueStamp");
752
+						$bookkeeping->label_operation = dol_trunc($companystatic->name, 16).' - '.$invoicestatic->ref.' - '.$langs->trans("RevenueStamp");
753 753
 						$bookkeeping->montant = $mt;
754 754
 						$bookkeeping->sens = ($mt < 0) ? 'D' : 'C';
755 755
 						$bookkeeping->debit = ($mt < 0) ? -$mt : 0;
@@ -851,7 +851,7 @@  discard block
 block discarded – undo
851 851
 	foreach ($tabfac as $key => $val) {
852 852
 		$companystatic->id = $tabcompany[$key]['id'];
853 853
 		$companystatic->name = $tabcompany[$key]['name'];
854
-		$companystatic->code_compta = $tabcompany[$key]['code_compta'];				// deprecated
854
+		$companystatic->code_compta = $tabcompany[$key]['code_compta']; // deprecated
855 855
 		$companystatic->code_compta_client = $tabcompany[$key]['code_compta'];
856 856
 		$companystatic->code_client = $tabcompany[$key]['code_client'];
857 857
 		$companystatic->client = 3;
@@ -996,7 +996,7 @@  discard block
 block discarded – undo
996 996
 
997 997
 if (empty($action) || $action == 'view') {
998 998
 	$title = $langs->trans("GenerationOfAccountingEntries").' - '.$accountingjournalstatic->getNomUrl(0, 2, 1, '', 1);
999
-	$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#G&eacute;n&eacute;ration_des_&eacute;critures_en_comptabilit&eacute;';
999
+	$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#G&eacute;n&eacute;ration_des_&eacute;critures_en_comptabilit&eacute;';
1000 1000
 	llxHeader('', dol_string_nohtmltag($title), $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-generation page-sellsjournal');
1001 1001
 
1002 1002
 	$nom = $title;
@@ -1039,7 +1039,7 @@  discard block
 block discarded – undo
1039 1039
 	}
1040 1040
 
1041 1041
 	// Button to write into Ledger
1042
-	$acctCustomerNotConfigured = in_array(getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER'), ['','-1']);
1042
+	$acctCustomerNotConfigured = in_array(getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER'), ['', '-1']);
1043 1043
 	if ($acctCustomerNotConfigured) {
1044 1044
 		print '<br><div class="warning">'.img_warning().' '.$langs->trans("SomeMandatoryStepsOfSetupWereNotDone");
1045 1045
 		$desc = ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '{link}');
@@ -1173,13 +1173,13 @@  discard block
 block discarded – undo
1173 1173
 			foreach ($tabwarranty[$key] as $k => $mt) {
1174 1174
 				print '<tr class="oddeven">';
1175 1175
 				print "<!-- Thirdparty warranty -->";
1176
-				print "<td>" . $date . "</td>";
1177
-				print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
1176
+				print "<td>".$date."</td>";
1177
+				print "<td>".$invoicestatic->getNomUrl(1)."</td>";
1178 1178
 				// Account
1179 1179
 				print "<td>";
1180 1180
 				$accountoshow = length_accountg(getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_RETAINED_WARRANTY'));
1181 1181
 				if (($accountoshow == "") || $accountoshow == 'NotDefined') {
1182
-					print '<span class="error">' . $langs->trans("MainAccountForRetainedWarrantyNotDefined") . '</span>';
1182
+					print '<span class="error">'.$langs->trans("MainAccountForRetainedWarrantyNotDefined").'</span>';
1183 1183
 				} else {
1184 1184
 					print $accountoshow;
1185 1185
 				}
@@ -1188,14 +1188,14 @@  discard block
 block discarded – undo
1188 1188
 				print "<td>";
1189 1189
 				$accountoshow = length_accounta($k);
1190 1190
 				if (($accountoshow == "") || $accountoshow == 'NotDefined') {
1191
-					print '<span class="error">' . $langs->trans("ThirdpartyAccountNotDefined") . '</span>';
1191
+					print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
1192 1192
 				} else {
1193 1193
 					print $accountoshow;
1194 1194
 				}
1195 1195
 				print '</td>';
1196
-				print "<td>" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("RetainedWarranty") . "</td>";
1197
-				print '<td class="right nowraponall amount">' . ($mt >= 0 ? price($mt) : '') . "</td>";
1198
-				print '<td class="right nowraponall amount">' . ($mt < 0 ? price(-$mt) : '') . "</td>";
1196
+				print "<td>".$companystatic->getNomUrl(0, 'customer', 16).' - '.$invoicestatic->ref.' - '.$langs->trans("RetainedWarranty")."</td>";
1197
+				print '<td class="right nowraponall amount">'.($mt >= 0 ? price($mt) : '')."</td>";
1198
+				print '<td class="right nowraponall amount">'.($mt < 0 ? price(-$mt) : '')."</td>";
1199 1199
 				print "</tr>";
1200 1200
 			}
1201 1201
 		}
@@ -1262,7 +1262,7 @@  discard block
 block discarded – undo
1262 1262
 					print length_accounta($tabcompany[$key]['code_compta']);
1263 1263
 				}
1264 1264
 			} elseif (($accountoshow == "") || $accountoshow == 'NotDefined') {
1265
-				print '<span class="error">' . $langs->trans("ThirdpartyAccountNotDefined") . '</span>';
1265
+				print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
1266 1266
 			}
1267 1267
 			print '</td>';
1268 1268
 			$companystatic->id = $tabcompany[$key]['id'];
@@ -1326,13 +1326,13 @@  discard block
 block discarded – undo
1326 1326
 			foreach ($tabrevenuestamp[$key] as $k => $mt) {
1327 1327
 				print '<tr class="oddeven">';
1328 1328
 				print "<!-- Thirdparty revenuestamp -->";
1329
-				print "<td>" . $date . "</td>";
1330
-				print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
1329
+				print "<td>".$date."</td>";
1330
+				print "<td>".$invoicestatic->getNomUrl(1)."</td>";
1331 1331
 				// Account
1332 1332
 				print "<td>";
1333 1333
 				$accountoshow = length_accountg($k);
1334 1334
 				if (($accountoshow == "") || $accountoshow == 'NotDefined') {
1335
-					print '<span class="error">' . $langs->trans("MainAccountForRevenueStampSaleNotDefined") . '</span>';
1335
+					print '<span class="error">'.$langs->trans("MainAccountForRevenueStampSaleNotDefined").'</span>';
1336 1336
 				} else {
1337 1337
 					print $accountoshow;
1338 1338
 				}
@@ -1340,9 +1340,9 @@  discard block
 block discarded – undo
1340 1340
 				// Subledger account
1341 1341
 				print "<td>";
1342 1342
 				print '</td>';
1343
-				print "<td>" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("RevenueStamp") . "</td>";
1344
-				print '<td class="right nowraponall amount">' . ($mt < 0 ? price(-$mt) : '') . "</td>";
1345
-				print '<td class="right nowraponall amount">' . ($mt >= 0 ? price($mt) : '') . "</td>";
1343
+				print "<td>".$companystatic->getNomUrl(0, 'customer', 16).' - '.$invoicestatic->ref.' - '.$langs->trans("RevenueStamp")."</td>";
1344
+				print '<td class="right nowraponall amount">'.($mt < 0 ? price(-$mt) : '')."</td>";
1345
+				print '<td class="right nowraponall amount">'.($mt >= 0 ? price($mt) : '')."</td>";
1346 1346
 				print "</tr>";
1347 1347
 			}
1348 1348
 		}
Please login to merge, or discard this patch.
htdocs/admin/system/database-tables.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
  *	\brief      Page with information on database tables. Add also some maintenance action to convert tables.
25 25
  */
26 26
 
27
-if (! defined('CSRFCHECK_WITH_TOKEN')) {
28
-	define('CSRFCHECK_WITH_TOKEN', '1');		// Force use of CSRF protection with tokens even for GET
27
+if (!defined('CSRFCHECK_WITH_TOKEN')) {
28
+	define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET
29 29
 }
30 30
 
31 31
 // Load Dolibarr environment
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 			//print $shortsqlfilename.' ';
120 120
 			$shortsqlfilename = preg_replace('/\-[a-z]+\./', '.', $value['name']);
121 121
 			$arrayoffiles[$value['name']] = $shortsqlfilename;
122
-			if ($value['name'] == $shortsqlfilename && ! preg_match('/\.key\.sql$/', $value['name'])) {
122
+			if ($value['name'] == $shortsqlfilename && !preg_match('/\.key\.sql$/', $value['name'])) {
123 123
 				// This is a sql file automatically created
124 124
 				$arrayoftablesautocreated[$value['name']] = $shortsqlfilename;
125 125
 			}
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 
138 138
 				print '<tr class="oddeven">';
139 139
 
140
-				print '<td>'.($i+1).'</td>';
140
+				print '<td>'.($i + 1).'</td>';
141 141
 				print '<td class="tdoverflowmax300" title="'.dol_escape_htmltag($obj->Name).'"><a href="dbtable.php?table='.urlencode($obj->Name).'">'.$obj->Name.'</a>';
142 142
 				$tablename = preg_replace('/^'.MAIN_DB_PREFIX.'/', 'llx_', $obj->Name);
143 143
 
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 			while ($i < $num) {
218 218
 				$row = $db->fetch_row($resql);
219 219
 				print '<tr class="oddeven">';
220
-				print '<td>'.($i+1).'</td>';
220
+				print '<td>'.($i + 1).'</td>';
221 221
 				print '<td>'.$row[0].'</td>';
222 222
 				print '<td class="right">'.$row[1].'</td>';
223 223
 				print '<td class="right">'.$row[2].'</td>';
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 				}
257 257
 
258 258
 				print '<tr class="oddeven">';
259
-				print '<td>'.($i+1).'</td>';
259
+				print '<td>'.($i + 1).'</td>';
260 260
 				print '<td>'.$row[0].'</td>';
261 261
 				print '<td>'.$count.'</td>';
262 262
 				print '</tr>';
Please login to merge, or discard this patch.
htdocs/admin/ihm.php 1 patch
Spacing   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 	dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity);
82 82
 	require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
83 83
 
84
-	$logofile = $conf->mycompany->dir_output.'/logos/' . getDolGlobalString('MAIN_LOGIN_BACKGROUND');
84
+	$logofile = $conf->mycompany->dir_output.'/logos/'.getDolGlobalString('MAIN_LOGIN_BACKGROUND');
85 85
 	dol_delete_file($logofile);
86 86
 	dolibarr_del_const($db, "MAIN_LOGIN_BACKGROUND", $conf->entity);
87 87
 	$mysoc->logo = '';
@@ -225,14 +225,14 @@  discard block
 block discarded – undo
225 225
 			dolibarr_set_const($db, "THEME_ELDY_USE_CHECKED", $val, 'chaine', 0, '', $conf->entity);
226 226
 		}
227 227
 
228
-		$val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_BTNACTION'), array()))));
228
+		$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_BTNACTION'), array()))));
229 229
 		if ($val == '') {
230 230
 			dolibarr_del_const($db, 'THEME_ELDY_BTNACTION', $conf->entity);
231 231
 		} else {
232 232
 			dolibarr_set_const($db, 'THEME_ELDY_BTNACTION', $val, 'chaine', 0, '', $conf->entity);
233 233
 		}
234 234
 
235
-		$val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTBTNACTION'), array()))));
235
+		$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTBTNACTION'), array()))));
236 236
 		if ($val == '') {
237 237
 			dolibarr_del_const($db, 'THEME_ELDY_TEXTBTNACTION', $conf->entity);
238 238
 		} else {
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 		//dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", GETPOST("MAIN_HELP_DISABLELINK", 'aZ09'), 'chaine', 0, '', 0); // Param for all entities
274 274
 
275 275
 		$varforimage = 'imagebackground';
276
-		$dirforimage = $conf->mycompany->dir_output . '/logos/';
276
+		$dirforimage = $conf->mycompany->dir_output.'/logos/';
277 277
 		if ($_FILES[$varforimage]["tmp_name"]) {
278 278
 			$reg = array();
279 279
 			if (preg_match('/([^\\/:]+)$/i', $_FILES[$varforimage]["name"], $reg)) {
@@ -281,11 +281,11 @@  discard block
 block discarded – undo
281 281
 
282 282
 				$isimage = image_format_supported($original_file);
283 283
 				if ($isimage >= 0) {
284
-					dol_syslog("Move file " . $_FILES[$varforimage]["tmp_name"] . " to " . $dirforimage . $original_file);
284
+					dol_syslog("Move file ".$_FILES[$varforimage]["tmp_name"]." to ".$dirforimage.$original_file);
285 285
 					if (!is_dir($dirforimage)) {
286 286
 						dol_mkdir($dirforimage);
287 287
 					}
288
-					$result = dol_move_uploaded_file($_FILES[$varforimage]["tmp_name"], $dirforimage . $original_file, 1, 0, $_FILES[$varforimage]['error']);
288
+					$result = dol_move_uploaded_file($_FILES[$varforimage]["tmp_name"], $dirforimage.$original_file, 1, 0, $_FILES[$varforimage]['error']);
289 289
 					if ($result > 0) {
290 290
 						dolibarr_set_const($db, "MAIN_LOGIN_BACKGROUND", $original_file, 'chaine', 0, '', $conf->entity);
291 291
 					} elseif (preg_match('/^ErrorFileIsInfectedWithAVirus/', $result)) {
@@ -391,17 +391,17 @@  discard block
 block discarded – undo
391 391
 	print '</tr>';
392 392
 
393 393
 	// Multilingual GUI
394
-	print '<tr class="oddeven"><td>' . $langs->trans("EnableMultilangInterface") . '</td><td>';
394
+	print '<tr class="oddeven"><td>'.$langs->trans("EnableMultilangInterface").'</td><td>';
395 395
 	print ajax_constantonoff("MAIN_MULTILANGS", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'language');
396 396
 	print '</td>';
397 397
 	print '</tr>';
398 398
 
399
-	print '</table>' . "\n";
399
+	print '</table>'."\n";
400 400
 	print '</div>';
401 401
 
402 402
 	print '<div class="center">';
403
-	print '<input class="button button-save reposition" type="submit" name="submit" value="' . $langs->trans("Save") . '">';
404
-	print '<input class="button button-cancel reposition" type="submit" name="cancel" value="' . $langs->trans("Cancel") . '">';
403
+	print '<input class="button button-save reposition" type="submit" name="submit" value="'.$langs->trans("Save").'">';
404
+	print '<input class="button button-cancel reposition" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
405 405
 	print '</div>';
406 406
 
407 407
 	print '<br>';
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
 
420 420
 	if (!empty($conf->use_javascript_ajax)) {
421 421
 		// Show Quick Add link
422
-		print '<tr class="oddeven"><td>' . $langs->trans("ShowQuickAddLink") . '</td><td>';
422
+		print '<tr class="oddeven"><td>'.$langs->trans("ShowQuickAddLink").'</td><td>';
423 423
 		print ajax_constantonoff("MAIN_USE_TOP_MENU_QUICKADD_DROPDOWN", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other');
424 424
 		print '</td>';
425 425
 		print '</tr>';
@@ -427,22 +427,22 @@  discard block
 block discarded – undo
427 427
 
428 428
 	// Hide wiki link on login page
429 429
 	$pictohelp = '<span class="fa fa-question-circle"></span>';
430
-	print '<tr class="oddeven"><td>' . str_replace('{picto}', $pictohelp, $langs->trans("DisableLinkToHelp", '{picto}')) . '</td><td>';
430
+	print '<tr class="oddeven"><td>'.str_replace('{picto}', $pictohelp, $langs->trans("DisableLinkToHelp", '{picto}')).'</td><td>';
431 431
 	print ajax_constantonoff("MAIN_HELP_DISABLELINK", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other');
432 432
 	//print $form->selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK) ? $conf->global->MAIN_HELP_DISABLELINK : 0, 1);
433 433
 	print '</td>';
434 434
 	print '</tr>';
435 435
 
436 436
 	// Max size of lists
437
-	print '<tr class="oddeven"><td>' . $langs->trans("DefaultMaxSizeList") . '</td><td><input class="flat width50" name="MAIN_SIZE_LISTE_LIMIT" value="' . getDolGlobalString('MAIN_SIZE_LISTE_LIMIT') . '"></td>';
437
+	print '<tr class="oddeven"><td>'.$langs->trans("DefaultMaxSizeList").'</td><td><input class="flat width50" name="MAIN_SIZE_LISTE_LIMIT" value="'.getDolGlobalString('MAIN_SIZE_LISTE_LIMIT').'"></td>';
438 438
 	print '</tr>';
439 439
 
440 440
 	// Max size of short lists on customer card
441
-	print '<tr class="oddeven"><td>' . $langs->trans("DefaultMaxSizeShortList") . '</td><td><input class="flat width50" name="MAIN_SIZE_SHORTLIST_LIMIT" value="' . getDolGlobalString('MAIN_SIZE_SHORTLIST_LIMIT') . '"></td>';
441
+	print '<tr class="oddeven"><td>'.$langs->trans("DefaultMaxSizeShortList").'</td><td><input class="flat width50" name="MAIN_SIZE_SHORTLIST_LIMIT" value="'.getDolGlobalString('MAIN_SIZE_SHORTLIST_LIMIT').'"></td>';
442 442
 	print '</tr>';
443 443
 
444 444
 	// Display checkboxes and fields menu left / right
445
-	print '<tr class="oddeven"><td>' . $langs->trans("MAIN_CHECKBOX_LEFT_COLUMN") . '</td><td>';
445
+	print '<tr class="oddeven"><td>'.$langs->trans("MAIN_CHECKBOX_LEFT_COLUMN").'</td><td>';
446 446
 	print ajax_constantonoff("MAIN_CHECKBOX_LEFT_COLUMN", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other');
447 447
 	print '</td>';
448 448
 	print '</tr>';
@@ -456,39 +456,39 @@  discard block
 block discarded – undo
456 456
 	 */
457 457
 
458 458
 	// First day for weeks
459
-	print '<tr class="oddeven"><td>' . $langs->trans("WeekStartOnDay") . '</td><td>';
459
+	print '<tr class="oddeven"><td>'.$langs->trans("WeekStartOnDay").'</td><td>';
460 460
 	print $formother->select_dayofweek((isset($conf->global->MAIN_START_WEEK) ? $conf->global->MAIN_START_WEEK : '1'), 'MAIN_START_WEEK', 0);
461 461
 	print '</td>';
462 462
 	print '</tr>';
463 463
 
464 464
 	// DefaultWorkingDays
465
-	print '<tr class="oddeven"><td>' . $langs->trans("DefaultWorkingDays") . '</td><td>';
466
-	print '<input type="text" name="MAIN_DEFAULT_WORKING_DAYS" size="5" value="' . (isset($conf->global->MAIN_DEFAULT_WORKING_DAYS) ? $conf->global->MAIN_DEFAULT_WORKING_DAYS : '1-5') . '">';
465
+	print '<tr class="oddeven"><td>'.$langs->trans("DefaultWorkingDays").'</td><td>';
466
+	print '<input type="text" name="MAIN_DEFAULT_WORKING_DAYS" size="5" value="'.(isset($conf->global->MAIN_DEFAULT_WORKING_DAYS) ? $conf->global->MAIN_DEFAULT_WORKING_DAYS : '1-5').'">';
467 467
 	print '</td>';
468 468
 	print '</tr>';
469 469
 
470 470
 	// DefaultWorkingHours
471
-	print '<tr class="oddeven"><td>' . $langs->trans("DefaultWorkingHours") . '</td><td>';
472
-	print '<input type="text" name="MAIN_DEFAULT_WORKING_HOURS" size="5" value="' . (isset($conf->global->MAIN_DEFAULT_WORKING_HOURS) ? $conf->global->MAIN_DEFAULT_WORKING_HOURS : '9-18') . '">';
471
+	print '<tr class="oddeven"><td>'.$langs->trans("DefaultWorkingHours").'</td><td>';
472
+	print '<input type="text" name="MAIN_DEFAULT_WORKING_HOURS" size="5" value="'.(isset($conf->global->MAIN_DEFAULT_WORKING_HOURS) ? $conf->global->MAIN_DEFAULT_WORKING_HOURS : '9-18').'">';
473 473
 	print '</td>';
474 474
 	print '</tr>';
475 475
 
476 476
 	// Firstname/Name
477
-	print '<tr class="oddeven"><td>' . $langs->trans("FirstnameNamePosition") . '</td><td>';
478
-	$array = array(0 => $langs->trans("Firstname") . ' ' . $langs->trans("Lastname"), 1 => $langs->trans("Lastname") . ' ' . $langs->trans("Firstname"));
477
+	print '<tr class="oddeven"><td>'.$langs->trans("FirstnameNamePosition").'</td><td>';
478
+	$array = array(0 => $langs->trans("Firstname").' '.$langs->trans("Lastname"), 1 => $langs->trans("Lastname").' '.$langs->trans("Firstname"));
479 479
 	print $form->selectarray('MAIN_FIRSTNAME_NAME_POSITION', $array, (isset($conf->global->MAIN_FIRSTNAME_NAME_POSITION) ? $conf->global->MAIN_FIRSTNAME_NAME_POSITION : 0));
480 480
 	print '</td>';
481 481
 	print '</tr>';
482 482
 
483 483
 	// Hide unauthorized menus
484
-	print '<tr class="oddeven"><td>' . $langs->trans("HideUnauthorizedMenu") . '</td><td>';
484
+	print '<tr class="oddeven"><td>'.$langs->trans("HideUnauthorizedMenu").'</td><td>';
485 485
 	//print $form->selectyesno('MAIN_MENU_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED) ? $conf->global->MAIN_MENU_HIDE_UNAUTHORIZED : 0, 1);
486 486
 	print ajax_constantonoff("MAIN_MENU_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other');
487 487
 	print '</td>';
488 488
 	print '</tr>';
489 489
 
490 490
 	// Hide unauthorized button
491
-	print '<tr class="oddeven"><td>' . $langs->trans("ButtonHideUnauthorized") . '</td><td>';
491
+	print '<tr class="oddeven"><td>'.$langs->trans("ButtonHideUnauthorized").'</td><td>';
492 492
 	//print $form->selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED) ? $conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED : 0, 1);
493 493
 	print ajax_constantonoff("MAIN_BUTTON_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other');
494 494
 	print '</td>';
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
 
506 506
 
507 507
 	// Show search area in top menu
508
-	print '<tr class="oddeven"><td>' . $langs->trans("ShowSearchAreaInTopMenu") . '</td><td>';
508
+	print '<tr class="oddeven"><td>'.$langs->trans("ShowSearchAreaInTopMenu").'</td><td>';
509 509
 	print ajax_constantonoff("MAIN_USE_TOP_MENU_SEARCH_DROPDOWN", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other');
510 510
 	print '</td>';
511 511
 	print '</tr>';
@@ -514,17 +514,17 @@  discard block
 block discarded – undo
514 514
 	print '<tr class="oddeven"><td>';
515 515
 	print $form->textwithpicto($langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")), $langs->trans("ShowBugTrackLinkDesc"));
516 516
 	print '</td><td>';
517
-	print '<input type="text" name="MAIN_BUGTRACK_ENABLELINK" value="' . (!getDolGlobalString('MAIN_BUGTRACK_ENABLELINK') ? '' : $conf->global->MAIN_BUGTRACK_ENABLELINK) . '">';
517
+	print '<input type="text" name="MAIN_BUGTRACK_ENABLELINK" value="'.(!getDolGlobalString('MAIN_BUGTRACK_ENABLELINK') ? '' : $conf->global->MAIN_BUGTRACK_ENABLELINK).'">';
518 518
 	print '</td>';
519 519
 	print '</tr>';
520 520
 
521 521
 	// Disable javascript and ajax
522
-	print '<tr class="oddeven"><td>' . $form->textwithpicto($langs->trans("DisableJavascript"), $langs->trans("DisableJavascriptNote")) . '</td><td>';
522
+	print '<tr class="oddeven"><td>'.$form->textwithpicto($langs->trans("DisableJavascript"), $langs->trans("DisableJavascriptNote")).'</td><td>';
523 523
 	print ajax_constantonoff("MAIN_DISABLE_JAVASCRIPT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other');
524 524
 	print '</td>';
525 525
 	print '</tr>';
526 526
 
527
-	print '</table>' . "\n";
527
+	print '</table>'."\n";
528 528
 	print '</div>';
529 529
 }
530 530
 
@@ -544,9 +544,9 @@  discard block
 block discarded – undo
544 544
 	complete_substitutions_array($substitutionarray, $langs);
545 545
 
546 546
 	print '<tr class="oddeven width25p"><td>';
547
-	$texthelp = $langs->trans("FollowingConstantsWillBeSubstituted") . '<br>';
547
+	$texthelp = $langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
548 548
 	foreach ($substitutionarray as $key => $val) {
549
-		$texthelp .= $key . '<br>';
549
+		$texthelp .= $key.'<br>';
550 550
 	}
551 551
 	print $form->textwithpicto($langs->trans("MessageOfDay"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessageofday');
552 552
 
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
 	$doleditor = new DolEditor('main_motd', (isset($conf->global->MAIN_MOTD) ? $conf->global->MAIN_MOTD : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%');
556 556
 	$doleditor->Create();
557 557
 
558
-	print '</td></tr>' . "\n";
558
+	print '</td></tr>'."\n";
559 559
 
560 560
 	/* no more need for this option. It is now a widget already controlled by end user
561 561
 	 print '<tr class="oddeven"><td>' . $langs->trans('BoxstatsDisableGlobal') . '</td><td>';
@@ -577,80 +577,80 @@  discard block
 block discarded – undo
577 577
 	print '</td><td class="titlefieldmiddle">';
578 578
 	print '</td></tr>';
579 579
 
580
-	print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableGlobal') . '</td><td>';
580
+	print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableGlobal').'</td><td>';
581 581
 	print ajax_constantonoff("MAIN_DISABLE_GLOBAL_WORKBOARD", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
582 582
 	print '</td>';
583 583
 	print '</tr>';
584 584
 
585 585
 	if (!getDolGlobalString('MAIN_DISABLE_GLOBAL_WORKBOARD')) {
586 586
 		// Block meteo
587
-		print '<tr class="oddeven"><td>' . $langs->trans('MAIN_DISABLE_METEO') . '</td><td>';
587
+		print '<tr class="oddeven"><td>'.$langs->trans('MAIN_DISABLE_METEO').'</td><td>';
588 588
 		print ajax_constantonoff("MAIN_DISABLE_METEO", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
589 589
 		print '</td>';
590 590
 		print '</tr>';
591 591
 
592 592
 		// Block agenda
593
-		print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockAgenda') . '</td><td>';
593
+		print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockAgenda').'</td><td>';
594 594
 		print ajax_constantonoff("MAIN_DISABLE_BLOCK_AGENDA", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
595 595
 		print '</td>';
596 596
 		print '</tr>';
597 597
 
598 598
 		// Block agenda
599
-		print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockProject') . '</td><td>';
599
+		print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockProject').'</td><td>';
600 600
 		print ajax_constantonoff("MAIN_DISABLE_BLOCK_PROJECT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
601 601
 		print '</td>';
602 602
 		print '</tr>';
603 603
 
604 604
 		// Block customer
605
-		print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockCustomer') . '</td><td>';
605
+		print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockCustomer').'</td><td>';
606 606
 		print ajax_constantonoff("MAIN_DISABLE_BLOCK_CUSTOMER", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
607 607
 		print '</td>';
608 608
 		print '</tr>';
609 609
 
610 610
 		// Block supplier
611
-		print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockSupplier') . '</td><td>';
611
+		print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockSupplier').'</td><td>';
612 612
 		print ajax_constantonoff("MAIN_DISABLE_BLOCK_SUPPLIER", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
613 613
 		print '</td>';
614 614
 		print '</tr>';
615 615
 
616 616
 		// Block contract
617
-		print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockContract') . '</td><td>';
617
+		print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockContract').'</td><td>';
618 618
 		print ajax_constantonoff("MAIN_DISABLE_BLOCK_CONTRACT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
619 619
 		print '</td>';
620 620
 		print '</tr>';
621 621
 
622 622
 		// Block ticket
623
-		print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockTicket') . '</td><td>';
623
+		print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockTicket').'</td><td>';
624 624
 		print ajax_constantonoff("MAIN_DISABLE_BLOCK_TICKET", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
625 625
 		print '</td>';
626 626
 		print '</tr>';
627 627
 
628 628
 		// Block bank
629
-		print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockBank') . '</td><td>';
629
+		print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockBank').'</td><td>';
630 630
 		print ajax_constantonoff("MAIN_DISABLE_BLOCK_BANK", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
631 631
 		print '</td>';
632 632
 		print '</tr>';
633 633
 
634 634
 		// Block adherent
635
-		print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockAdherent') . '</td><td>';
635
+		print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockAdherent').'</td><td>';
636 636
 		print ajax_constantonoff("MAIN_DISABLE_BLOCK_ADHERENT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
637 637
 		print '</td>';
638 638
 		print '</tr>';
639 639
 
640 640
 		// Block expense report
641
-		print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockExpenseReport') . '</td><td>';
641
+		print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockExpenseReport').'</td><td>';
642 642
 		print ajax_constantonoff("MAIN_DISABLE_BLOCK_EXPENSEREPORT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
643 643
 		print '</td>';
644 644
 		print '</tr>';
645 645
 
646 646
 		// Block holiday
647
-		print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockHoliday') . '</td><td>';
647
+		print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockHoliday').'</td><td>';
648 648
 		print ajax_constantonoff("MAIN_DISABLE_BLOCK_HOLIDAY", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
649 649
 		print '</td>';
650 650
 		print '</tr>';
651 651
 	}
652 652
 
653
-	print '</table>' . "\n";
653
+	print '</table>'."\n";
654 654
 	print '</div>';
655 655
 }
656 656
 
@@ -667,7 +667,7 @@  discard block
 block discarded – undo
667 667
 	print '</td></tr>';
668 668
 
669 669
 	// Hide helpcenter link on login page
670
-	print '<tr class="oddeven"><td>' . $langs->trans("DisableLinkToHelpCenter") . '</td><td>';
670
+	print '<tr class="oddeven"><td>'.$langs->trans("DisableLinkToHelpCenter").'</td><td>';
671 671
 	print ajax_constantonoff("MAIN_HELPCENTER_DISABLELINK", array(), $conf->entity, 0, 0, 0, 0, 0, 0, '', 'login');
672 672
 	print '</td>';
673 673
 	print '</tr>';
@@ -676,18 +676,18 @@  discard block
 block discarded – undo
676 676
 	$substitutionarray = getCommonSubstitutionArray($langs, 0, array('object', 'objectamount', 'user'));
677 677
 	complete_substitutions_array($substitutionarray, $langs);
678 678
 	print '<tr class="oddeven"><td>';
679
-	$texthelp = $langs->trans("FollowingConstantsWillBeSubstituted") . '<br>';
679
+	$texthelp = $langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
680 680
 	foreach ($substitutionarray as $key => $val) {
681
-		$texthelp .= $key . '<br>';
681
+		$texthelp .= $key.'<br>';
682 682
 	}
683 683
 	print $form->textwithpicto($langs->trans("MessageLogin"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessagelogin');
684 684
 	print '</td><td>';
685 685
 	$doleditor = new DolEditor('main_home', (isset($conf->global->MAIN_HOME) ? $conf->global->MAIN_HOME : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%');
686 686
 	$doleditor->Create();
687
-	print '</td></tr>' . "\n";
687
+	print '</td></tr>'."\n";
688 688
 
689 689
 	// Background
690
-	print '<tr class="oddeven"><td><label for="imagebackground">' . $langs->trans("BackgroundImageLogin") . ' (png,jpg)</label></td><td>';
690
+	print '<tr class="oddeven"><td><label for="imagebackground">'.$langs->trans("BackgroundImageLogin").' (png,jpg)</label></td><td>';
691 691
 	print '<div class="centpercent inline-block">';
692 692
 	$disabled = '';
693 693
 	if (getDolGlobalString('ADD_UNSPLASH_LOGIN_BACKGROUND')) {
@@ -696,25 +696,25 @@  discard block
 block discarded – undo
696 696
 	$maxfilesizearray = getMaxFileSizeArray();
697 697
 	$maxmin = $maxfilesizearray['maxmin'];
698 698
 	if ($maxmin > 0) {
699
-		print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">';	// MAX_FILE_SIZE must precede the field type=file
699
+		print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
700 700
 	}
701
-	print '<input type="file" class="flat maxwidthinputfileonsmartphone" name="imagebackground" id="imagebackground"' . $disabled . '>';
701
+	print '<input type="file" class="flat maxwidthinputfileonsmartphone" name="imagebackground" id="imagebackground"'.$disabled.'>';
702 702
 	if ($disabled) {
703
-		print '(' . $langs->trans("DisabledByOptionADD_UNSPLASH_LOGIN_BACKGROUND") . ') ';
703
+		print '('.$langs->trans("DisabledByOptionADD_UNSPLASH_LOGIN_BACKGROUND").') ';
704 704
 	}
705 705
 	if (getDolGlobalString('MAIN_LOGIN_BACKGROUND')) {
706
-		print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?action=removebackgroundlogin&token='.newToken().'&mode=login">' . img_delete($langs->trans("Delete")) . '</a>';
707
-		if (file_exists($conf->mycompany->dir_output . '/logos/' . getDolGlobalString('MAIN_LOGIN_BACKGROUND'))) {
706
+		print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=removebackgroundlogin&token='.newToken().'&mode=login">'.img_delete($langs->trans("Delete")).'</a>';
707
+		if (file_exists($conf->mycompany->dir_output.'/logos/'.getDolGlobalString('MAIN_LOGIN_BACKGROUND'))) {
708 708
 			print ' &nbsp; ';
709
-			print '<img class="paddingleft valignmiddle" width="100" src="' . DOL_URL_ROOT . '/viewimage.php?modulepart=mycompany&amp;file=' . urlencode('logos/' . getDolGlobalString('MAIN_LOGIN_BACKGROUND')) . '">';
709
+			print '<img class="paddingleft valignmiddle" width="100" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;file='.urlencode('logos/'.getDolGlobalString('MAIN_LOGIN_BACKGROUND')).'">';
710 710
 		}
711 711
 	} else {
712
-		print '<img class="paddingleft valignmiddle" width="100" src="' . DOL_URL_ROOT . '/public/theme/common/nophoto.png">';
712
+		print '<img class="paddingleft valignmiddle" width="100" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">';
713 713
 	}
714 714
 	print '</div>';
715 715
 	print '</td></tr>';
716 716
 
717
-	print '</table>' . "\n";
717
+	print '</table>'."\n";
718 718
 	print '</div>';
719 719
 }
720 720
 
@@ -738,8 +738,8 @@  discard block
 block discarded – undo
738 738
 
739 739
 
740 740
 print '<div class="center">';
741
-print '<input class="button button-save reposition buttonforacesave" type="submit" name="submit" value="' . $langs->trans("Save") . '">';
742
-print '<input class="button button-cancel reposition" type="submit" name="cancel" value="' . $langs->trans("Cancel") . '">';
741
+print '<input class="button button-save reposition buttonforacesave" type="submit" name="submit" value="'.$langs->trans("Save").'">';
742
+print '<input class="button button-cancel reposition" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
743 743
 print '</div>';
744 744
 
745 745
 print '</form>';
Please login to merge, or discard this patch.
htdocs/don/paiement/list.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'sclist';
42 42
 $mode = GETPOST('mode', 'alpha');
43 43
 
44
-$paiementid				= GETPOSTINT('paiementid');
44
+$paiementid = GETPOSTINT('paiementid');
45 45
 
46 46
 $search_ref = GETPOST("search_ref", "alpha");
47 47
 $search_date_startday = GETPOSTINT('search_date_startday');
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	'pd.amount'			=> array('label' => "Amount", 'checked' => 1, 'position' => 80),
98 98
 );
99 99
 $arrayfields = dol_sort_array($arrayfields, 'position');
100
-'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';  // dol_sort_array looses type for Phan
100
+'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan
101 101
 
102 102
 $optioncss = GETPOST('optioncss', 'alpha');
103 103
 $moreforfilter = GETPOST('moreforfilter', 'alpha');
@@ -187,10 +187,10 @@  discard block
 block discarded – undo
187 187
 	$sql .= natural_search('pd.rowid', $search_ref);
188 188
 }
189 189
 if ($search_date_start) {
190
-	$sql .= " AND pd.datep >= '" . $db->idate($search_date_start) . "'";
190
+	$sql .= " AND pd.datep >= '".$db->idate($search_date_start)."'";
191 191
 }
192 192
 if ($search_date_end) {
193
-	$sql .= " AND pd.datep <= '" . $db->idate($search_date_end) . "'";
193
+	$sql .= " AND pd.datep <= '".$db->idate($search_date_end)."'";
194 194
 }
195 195
 if ($search_account > 0) {
196 196
 	$sql .= " AND b.fk_account=".((int) $search_account);
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 // Output page
257 257
 // --------------------------------------------------------------------
258 258
 
259
-llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist');	// Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
259
+llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
260 260
 
261 261
 $param = '';
262 262
 if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
 
533 533
 	// Ref
534 534
 	if (!empty($arrayfields['pd.rowid']['checked'])) {
535
-		print '<td><a href="' . DOL_URL_ROOT . '/don/payment/card.php?id=' . $obj->payment_id . '">' . img_object($langs->trans("Payment"), "payment") . ' ' . $obj->payment_id . '</a></td>';
535
+		print '<td><a href="'.DOL_URL_ROOT.'/don/payment/card.php?id='.$obj->payment_id.'">'.img_object($langs->trans("Payment"), "payment").' '.$obj->payment_id.'</a></td>';
536 536
 		if (!$i) {
537 537
 			$totalarray['nbfield']++;
538 538
 		}
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
 
614 614
 	// Amount
615 615
 	if (!empty($arrayfields['pd.amount']['checked'])) {
616
-		print '<td class="right"><span class="amount">' . price($obj->amount) . '</span></td>';
616
+		print '<td class="right"><span class="amount">'.price($obj->amount).'</span></td>';
617 617
 		if (!$i) {
618 618
 			$totalarray['nbfield']++;
619 619
 			$totalarray['pos'][$totalarray['nbfield']] = 'amount';
Please login to merge, or discard this patch.
htdocs/reception/dispatch.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
 	print '<center>';
441 441
 
442 442
 	print '<br>';
443
-	$disabled = 0;	// This is used to disable or not the bulk selection of target warehouse. No reason to have it disabled so forced to 0.
443
+	$disabled = 0; // This is used to disable or not the bulk selection of target warehouse. No reason to have it disabled so forced to 0.
444 444
 
445 445
 	if ($object->statut == Reception::STATUS_DRAFT || ($object->statut == Reception::STATUS_VALIDATED && !getDolGlobalString('STOCK_CALCULATE_ON_RECEPTION'))) {
446 446
 		require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
 				print '<td class="right">'.$langs->trans("SupplierRef").'</td>';
545 545
 				print '<td class="right">'.$langs->trans("QtyOrdered").'</td>';
546 546
 				if ($object->status == Reception::STATUS_DRAFT) {
547
-					print '<td class="right">'.$langs->trans("QtyToReceive");	// Qty to dispatch (sum for all lines of batch detail if there is)
547
+					print '<td class="right">'.$langs->trans("QtyToReceive"); // Qty to dispatch (sum for all lines of batch detail if there is)
548 548
 				} else {
549 549
 					print '<td class="right">'.$langs->trans("QtyDispatchedShort").'</td>';
550 550
 				}
Please login to merge, or discard this patch.
htdocs/product/class/product.class.php 1 patch
Spacing   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 	 */
143 143
 	public $price;
144 144
 
145
-	public $price_formated;			// used by takepos/ajax/ajax.php
145
+	public $price_formated; // used by takepos/ajax/ajax.php
146 146
 
147 147
 	/**
148 148
 	 * Selling price with tax
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	 */
152 152
 	public $price_ttc;
153 153
 
154
-	public $price_ttc_formated;		// used by takepos/ajax/ajax.php
154
+	public $price_ttc_formated; // used by takepos/ajax/ajax.php
155 155
 
156 156
 	/**
157 157
 	 * Minimum price net
@@ -404,20 +404,20 @@  discard block
 block discarded – undo
404 404
 
405 405
 	//! Metric of products
406 406
 	public $weight;
407
-	public $weight_units;	// scale -3, 0, 3, 6
407
+	public $weight_units; // scale -3, 0, 3, 6
408 408
 	public $length;
409
-	public $length_units;	// scale -3, 0, 3, 6
409
+	public $length_units; // scale -3, 0, 3, 6
410 410
 	public $width;
411
-	public $width_units;	// scale -3, 0, 3, 6
411
+	public $width_units; // scale -3, 0, 3, 6
412 412
 	public $height;
413
-	public $height_units;	// scale -3, 0, 3, 6
413
+	public $height_units; // scale -3, 0, 3, 6
414 414
 	public $surface;
415
-	public $surface_units;	// scale -3, 0, 3, 6
415
+	public $surface_units; // scale -3, 0, 3, 6
416 416
 	public $volume;
417
-	public $volume_units;	// scale -3, 0, 3, 6
417
+	public $volume_units; // scale -3, 0, 3, 6
418 418
 
419 419
 	public $net_measure;
420
-	public $net_measure_units;	// scale -3, 0, 3, 6
420
+	public $net_measure_units; // scale -3, 0, 3, 6
421 421
 
422 422
 	public $accountancy_code_sell;
423 423
 	public $accountancy_code_sell_intra;
@@ -609,7 +609,7 @@  discard block
 block discarded – undo
609 609
 		'import_key'    => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'visible' => -2, 'notnull' => -1, 'index' => 0, 'position' => 1000),
610 610
 		//'tosell'       =>array('type'=>'integer',      'label'=>'Status',           'enabled'=>1, 'visible'=>1,  'notnull'=>1, 'default'=>'0', 'index'=>1,  'position'=>1000, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Active', -1=>'Cancel')),
611 611
 		//'tobuy'        =>array('type'=>'integer',      'label'=>'Status',           'enabled'=>1, 'visible'=>1,  'notnull'=>1, 'default'=>'0', 'index'=>1,  'position'=>1000, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Active', -1=>'Cancel')),
612
-		'mandatory_period' => array('type' => 'integer', 'label' => 'mandatoryperiod', 'enabled' => 1, 'visible' => 1,  'notnull' => 1, 'default' => '0', 'index' => 1,  'position' => 1000),
612
+		'mandatory_period' => array('type' => 'integer', 'label' => 'mandatoryperiod', 'enabled' => 1, 'visible' => 1, 'notnull' => 1, 'default' => '0', 'index' => 1, 'position' => 1000),
613 613
 	);
614 614
 
615 615
 	/**
@@ -913,9 +913,9 @@  discard block
 block discarded – undo
913 913
 
914 914
 							// update accountancy for this entity
915 915
 							if (!$error && getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) {
916
-								$this->db->query("DELETE FROM " . $this->db->prefix() . "product_perentity WHERE fk_product = " .((int) $this->id) . " AND entity = " . ((int) $conf->entity));
916
+								$this->db->query("DELETE FROM ".$this->db->prefix()."product_perentity WHERE fk_product = ".((int) $this->id)." AND entity = ".((int) $conf->entity));
917 917
 
918
-								$sql = "INSERT INTO " . $this->db->prefix() . "product_perentity (";
918
+								$sql = "INSERT INTO ".$this->db->prefix()."product_perentity (";
919 919
 								$sql .= " fk_product";
920 920
 								$sql .= ", entity";
921 921
 								$sql .= ", accountancy_code_buy";
@@ -926,13 +926,13 @@  discard block
 block discarded – undo
926 926
 								$sql .= ", accountancy_code_sell_export";
927 927
 								$sql .= ") VALUES (";
928 928
 								$sql .= $this->id;
929
-								$sql .= ", " . $conf->entity;
930
-								$sql .= ", '" . $this->db->escape($this->accountancy_code_buy) . "'";
931
-								$sql .= ", '" . $this->db->escape($this->accountancy_code_buy_intra) . "'";
932
-								$sql .= ", '" . $this->db->escape($this->accountancy_code_buy_export) . "'";
933
-								$sql .= ", '" . $this->db->escape($this->accountancy_code_sell) . "'";
934
-								$sql .= ", '" . $this->db->escape($this->accountancy_code_sell_intra) . "'";
935
-								$sql .= ", '" . $this->db->escape($this->accountancy_code_sell_export) . "'";
929
+								$sql .= ", ".$conf->entity;
930
+								$sql .= ", '".$this->db->escape($this->accountancy_code_buy)."'";
931
+								$sql .= ", '".$this->db->escape($this->accountancy_code_buy_intra)."'";
932
+								$sql .= ", '".$this->db->escape($this->accountancy_code_buy_export)."'";
933
+								$sql .= ", '".$this->db->escape($this->accountancy_code_sell)."'";
934
+								$sql .= ", '".$this->db->escape($this->accountancy_code_sell_intra)."'";
935
+								$sql .= ", '".$this->db->escape($this->accountancy_code_sell_export)."'";
936 936
 								$sql .= ")";
937 937
 								$result = $this->db->query($sql);
938 938
 								if (!$result) {
@@ -1312,12 +1312,12 @@  discard block
 block discarded – undo
1312 1312
 			$sql .= ", note_public = ".(isset($this->note_public) ? "'".$this->db->escape($this->note_public)."'" : 'null');
1313 1313
 			$sql .= ", duration = '".$this->db->escape($this->duration_value.$this->duration_unit)."'";
1314 1314
 			if (!getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) {
1315
-				$sql .= ", accountancy_code_buy = '" . $this->db->escape($this->accountancy_code_buy) . "'";
1316
-				$sql .= ", accountancy_code_buy_intra = '" . $this->db->escape($this->accountancy_code_buy_intra) . "'";
1317
-				$sql .= ", accountancy_code_buy_export = '" . $this->db->escape($this->accountancy_code_buy_export) . "'";
1318
-				$sql .= ", accountancy_code_sell= '" . $this->db->escape($this->accountancy_code_sell) . "'";
1319
-				$sql .= ", accountancy_code_sell_intra= '" . $this->db->escape($this->accountancy_code_sell_intra) . "'";
1320
-				$sql .= ", accountancy_code_sell_export= '" . $this->db->escape($this->accountancy_code_sell_export) . "'";
1315
+				$sql .= ", accountancy_code_buy = '".$this->db->escape($this->accountancy_code_buy)."'";
1316
+				$sql .= ", accountancy_code_buy_intra = '".$this->db->escape($this->accountancy_code_buy_intra)."'";
1317
+				$sql .= ", accountancy_code_buy_export = '".$this->db->escape($this->accountancy_code_buy_export)."'";
1318
+				$sql .= ", accountancy_code_sell= '".$this->db->escape($this->accountancy_code_sell)."'";
1319
+				$sql .= ", accountancy_code_sell_intra= '".$this->db->escape($this->accountancy_code_sell_intra)."'";
1320
+				$sql .= ", accountancy_code_sell_export= '".$this->db->escape($this->accountancy_code_sell_export)."'";
1321 1321
 			}
1322 1322
 			$sql .= ", desiredstock = ".((isset($this->desiredstock) && is_numeric($this->desiredstock)) ? (float) $this->desiredstock : "null");
1323 1323
 			$sql .= ", cost_price = ".($this->cost_price != '' ? $this->db->escape($this->cost_price) : 'null');
@@ -1348,9 +1348,9 @@  discard block
 block discarded – undo
1348 1348
 
1349 1349
 				// update accountancy for this entity
1350 1350
 				if (!$error && getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) {
1351
-					$this->db->query("DELETE FROM " . $this->db->prefix() . "product_perentity WHERE fk_product = " . ((int) $this->id) . " AND entity = " . ((int) $conf->entity));
1351
+					$this->db->query("DELETE FROM ".$this->db->prefix()."product_perentity WHERE fk_product = ".((int) $this->id)." AND entity = ".((int) $conf->entity));
1352 1352
 
1353
-					$sql = "INSERT INTO " . $this->db->prefix() . "product_perentity (";
1353
+					$sql = "INSERT INTO ".$this->db->prefix()."product_perentity (";
1354 1354
 					$sql .= " fk_product";
1355 1355
 					$sql .= ", entity";
1356 1356
 					$sql .= ", accountancy_code_buy";
@@ -1361,13 +1361,13 @@  discard block
 block discarded – undo
1361 1361
 					$sql .= ", accountancy_code_sell_export";
1362 1362
 					$sql .= ") VALUES (";
1363 1363
 					$sql .= $this->id;
1364
-					$sql .= ", " . $conf->entity;
1365
-					$sql .= ", '" . $this->db->escape($this->accountancy_code_buy) . "'";
1366
-					$sql .= ", '" . $this->db->escape($this->accountancy_code_buy_intra) . "'";
1367
-					$sql .= ", '" . $this->db->escape($this->accountancy_code_buy_export) . "'";
1368
-					$sql .= ", '" . $this->db->escape($this->accountancy_code_sell) . "'";
1369
-					$sql .= ", '" . $this->db->escape($this->accountancy_code_sell_intra) . "'";
1370
-					$sql .= ", '" . $this->db->escape($this->accountancy_code_sell_export) . "'";
1364
+					$sql .= ", ".$conf->entity;
1365
+					$sql .= ", '".$this->db->escape($this->accountancy_code_buy)."'";
1366
+					$sql .= ", '".$this->db->escape($this->accountancy_code_buy_intra)."'";
1367
+					$sql .= ", '".$this->db->escape($this->accountancy_code_buy_export)."'";
1368
+					$sql .= ", '".$this->db->escape($this->accountancy_code_sell)."'";
1369
+					$sql .= ", '".$this->db->escape($this->accountancy_code_sell_intra)."'";
1370
+					$sql .= ", '".$this->db->escape($this->accountancy_code_sell_export)."'";
1371 1371
 					$sql .= ")";
1372 1372
 					$result = $this->db->query($sql);
1373 1373
 					if (!$result) {
@@ -1738,7 +1738,7 @@  discard block
 block discarded – undo
1738 1738
 				}
1739 1739
 			} elseif (isset($this->multilangs[$key])) {
1740 1740
 				if (empty($this->multilangs["$key"]["label"])) {
1741
-					$this->errors[] = $key . ' : ' . $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label"));
1741
+					$this->errors[] = $key.' : '.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label"));
1742 1742
 					return -1;
1743 1743
 				}
1744 1744
 
@@ -1933,7 +1933,7 @@  discard block
 block discarded – undo
1933 1933
 	 */
1934 1934
 	private function getArrayForPriceCompare($level = 0)
1935 1935
 	{
1936
-		$testExit = array('multiprices','multiprices_ttc','multiprices_base_type','multiprices_min','multiprices_min_ttc','multiprices_tva_tx','multiprices_recuperableonly');
1936
+		$testExit = array('multiprices', 'multiprices_ttc', 'multiprices_base_type', 'multiprices_min', 'multiprices_min_ttc', 'multiprices_tva_tx', 'multiprices_recuperableonly');
1937 1937
 
1938 1938
 		foreach ($testExit as $field) {
1939 1939
 			if (!isset($this->$field)) {
@@ -2577,12 +2577,12 @@  discard block
 block discarded – undo
2577 2577
 
2578 2578
 		//For MultiCompany
2579 2579
 		//PMP per entity & Stocks Sharings stock_reel includes only stocks shared with this entity
2580
-		$separatedEntityPMP = false;	// Set to true to get the AWP from table llx_product_perentity instead of field 'pmp' into llx_product.
2581
-		$separatedStock = false;		// Set to true will count stock from subtable llx_product_stock. It is slower than using denormalized field 'stock', but it is required when using multientity and shared warehouses.
2580
+		$separatedEntityPMP = false; // Set to true to get the AWP from table llx_product_perentity instead of field 'pmp' into llx_product.
2581
+		$separatedStock = false; // Set to true will count stock from subtable llx_product_stock. It is slower than using denormalized field 'stock', but it is required when using multientity and shared warehouses.
2582 2582
 		$visibleWarehousesEntities = $conf->entity;
2583 2583
 		if (getDolGlobalString('MULTICOMPANY_PRODUCT_SHARING_ENABLED')) {
2584 2584
 			if (getDolGlobalString('MULTICOMPANY_PMP_PER_ENTITY_ENABLED')) {
2585
-				$checkPMPPerEntity = $this->db->query("SELECT pmp FROM " . $this->db->prefix() . "product_perentity WHERE fk_product = ".((int) $id)." AND entity = ".(int) $conf->entity);
2585
+				$checkPMPPerEntity = $this->db->query("SELECT pmp FROM ".$this->db->prefix()."product_perentity WHERE fk_product = ".((int) $id)." AND entity = ".(int) $conf->entity);
2586 2586
 				if ($this->db->num_rows($checkPMPPerEntity) > 0) {
2587 2587
 					$separatedEntityPMP = true;
2588 2588
 				}
@@ -2590,7 +2590,7 @@  discard block
 block discarded – undo
2590 2590
 			global $mc;
2591 2591
 			$separatedStock = true;
2592 2592
 			if (isset($mc->sharings['stock']) && !empty($mc->sharings['stock'])) {
2593
-				$visibleWarehousesEntities .= "," . implode(",", $mc->sharings['stock']);
2593
+				$visibleWarehousesEntities .= ",".implode(",", $mc->sharings['stock']);
2594 2594
 			}
2595 2595
 		}
2596 2596
 		if ($separatedEntityPMP) {
@@ -2608,10 +2608,10 @@  discard block
 block discarded – undo
2608 2608
 		}
2609 2609
 		$sql .= " FROM ".$this->db->prefix()."product as p";
2610 2610
 		if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED') || $separatedEntityPMP) {
2611
-			$sql .= " LEFT JOIN " . $this->db->prefix() . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity);
2611
+			$sql .= " LEFT JOIN ".$this->db->prefix()."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity);
2612 2612
 		}
2613 2613
 		if ($separatedStock) {
2614
-			$sql .= " LEFT JOIN " . $this->db->prefix() . "product_stock as sp ON sp.fk_product = p.rowid AND sp.fk_entrepot IN (SELECT rowid FROM ".$this->db->prefix()."entrepot WHERE entity IN (".$this->db->sanitize($visibleWarehousesEntities)."))";
2614
+			$sql .= " LEFT JOIN ".$this->db->prefix()."product_stock as sp ON sp.fk_product = p.rowid AND sp.fk_entrepot IN (SELECT rowid FROM ".$this->db->prefix()."entrepot WHERE entity IN (".$this->db->sanitize($visibleWarehousesEntities)."))";
2615 2615
 		}
2616 2616
 
2617 2617
 		if ($id) {
@@ -2771,15 +2771,15 @@  discard block
 block discarded – undo
2771 2771
 						$sql .= " WHERE entity IN (".getEntity('productprice').")";
2772 2772
 						$sql .= " AND price_level=".((int) $i);
2773 2773
 						$sql .= " AND fk_product = ".((int) $this->id);
2774
-						$sql .= " ORDER BY date_price DESC, rowid DESC";	// Get the most recent line
2775
-						$sql .= " LIMIT 1";									// Only the first one
2774
+						$sql .= " ORDER BY date_price DESC, rowid DESC"; // Get the most recent line
2775
+						$sql .= " LIMIT 1"; // Only the first one
2776 2776
 						$resql = $this->db->query($sql);
2777 2777
 						if ($resql) {
2778 2778
 							$result = $this->db->fetch_array($resql);
2779 2779
 
2780 2780
 							$this->multiprices[$i] = $result ? $result["price"] : null;
2781 2781
 							$this->multiprices_ttc[$i] = $result ? $result["price_ttc"] : null;
2782
-							$this->multiprices_min[$i] =  $result ? $result["price_min"] : null;
2782
+							$this->multiprices_min[$i] = $result ? $result["price_min"] : null;
2783 2783
 							$this->multiprices_min_ttc[$i] = $result ? $result["price_min_ttc"] : null;
2784 2784
 							$this->multiprices_base_type[$i] = $result ? $result["price_base_type"] : null;
2785 2785
 							// Next two fields are used only if PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL is on
@@ -3004,7 +3004,7 @@  discard block
 block discarded – undo
3004 3004
 				$obj = $this->db->fetch_object($result);
3005 3005
 				$this->stats_mo['customers_'.$role] = $obj->nb_customers ? $obj->nb_customers : 0;
3006 3006
 				$this->stats_mo['nb_'.$role] = $obj->nb ? $obj->nb : 0;
3007
-				$this->stats_mo['qty_'.$role] = $obj->qty ? price2num($obj->qty, 'MS') : 0;		// qty may be a float due to the SUM()
3007
+				$this->stats_mo['qty_'.$role] = $obj->qty ? price2num($obj->qty, 'MS') : 0; // qty may be a float due to the SUM()
3008 3008
 			} else {
3009 3009
 				$this->error = $this->db->error();
3010 3010
 				$error++;
@@ -4510,7 +4510,7 @@  discard block
 block discarded – undo
4510 4510
 				//Addition of a product with the highest rank +1
4511 4511
 				$sql = "INSERT INTO ".$this->db->prefix()."product_association(fk_product_pere,fk_product_fils,qty,incdec,rang)";
4512 4512
 				$sql .= " VALUES (".((int) $id_pere).", ".((int) $id_fils).", ".price2num($qty, 'MS').", ".price2num($incdec, 'MS').", ".((int) $rank).")";
4513
-				if (! $this->db->query($sql)) {
4513
+				if (!$this->db->query($sql)) {
4514 4514
 					dol_print_error($this->db);
4515 4515
 					return -1;
4516 4516
 				} else {
@@ -4631,7 +4631,7 @@  discard block
 block discarded – undo
4631 4631
 				$sql = "UPDATE ".$this->db->prefix()."product_association";
4632 4632
 				$sql .= " SET rang = ".((int) $cpt);
4633 4633
 				$sql .= " WHERE rowid = ".((int) $objrank->rowid);
4634
-				if (! $this->db->query($sql)) {
4634
+				if (!$this->db->query($sql)) {
4635 4635
 					dol_print_error($this->db);
4636 4636
 					return -1;
4637 4637
 				}
@@ -5067,7 +5067,7 @@  discard block
 block discarded – undo
5067 5067
 		if (isset($this->sousprods) && is_array($this->sousprods)) {
5068 5068
 			foreach ($this->sousprods as $prod_name => $desc_product) {
5069 5069
 				if (is_array($desc_product)) {
5070
-					$this->fetch_prod_arbo($desc_product, "", $multiply, 1, $this->id, $ignore_stock_load);	// This set $this->res
5070
+					$this->fetch_prod_arbo($desc_product, "", $multiply, 1, $this->id, $ignore_stock_load); // This set $this->res
5071 5071
 				}
5072 5072
 			}
5073 5073
 		}
@@ -5224,7 +5224,7 @@  discard block
 block discarded – undo
5224 5224
 		$sql .= " AND pa.fk_product_fils <> ".((int) $id); // This should not happens, it is to avoid infinite loop if it happens
5225 5225
 		$sql .= " ORDER BY pa.rang";
5226 5226
 
5227
-		dol_syslog(get_class($this).'::getChildsArbo id='.$id.' level='.$level. ' parents='.(is_array($parents) ? implode(',', $parents) : $parents), LOG_DEBUG);
5227
+		dol_syslog(get_class($this).'::getChildsArbo id='.$id.' level='.$level.' parents='.(is_array($parents) ? implode(',', $parents) : $parents), LOG_DEBUG);
5228 5228
 
5229 5229
 		if ($level == 1) {
5230 5230
 			$alreadyfound = array($id => 1); // We init array of found object to start of tree, so if we found it later (should not happened), we stop immediately
@@ -5315,7 +5315,7 @@  discard block
 block discarded – undo
5315 5315
 		if (!empty($this->entity)) {
5316 5316
 			$tmpphoto = $this->show_photos('product', $conf->product->multidir_output[$this->entity], 1, 1, 0, 0, 0, 80, 0, 0, 0, 0, 1);
5317 5317
 			if ($this->nbphoto > 0) {
5318
-				$datas['photo'] = '<div class="photointooltip floatright">'."\n" . $tmpphoto . '</div>';
5318
+				$datas['photo'] = '<div class="photointooltip floatright">'."\n".$tmpphoto.'</div>';
5319 5319
 			}
5320 5320
 		}
5321 5321
 
@@ -5325,7 +5325,7 @@  discard block
 block discarded – undo
5325 5325
 			$datas['picto'] = img_picto('', 'service').' <u class="paddingrightonly">'.$langs->trans("Service").'</u>';
5326 5326
 		}
5327 5327
 		if (isset($this->status) && isset($this->status_buy)) {
5328
-			$datas['status'] = ' '.$this->getLibStatut(5, 0) . ' '.$this->getLibStatut(5, 1);
5328
+			$datas['status'] = ' '.$this->getLibStatut(5, 0).' '.$this->getLibStatut(5, 1);
5329 5329
 		}
5330 5330
 
5331 5331
 		if (!empty($this->ref)) {
@@ -5373,7 +5373,7 @@  discard block
 block discarded – undo
5373 5373
 				$labelsurfacevolume .= ($labelsurfacevolume ? " - " : "")."<b>".$langs->trans("Volume").'</b>: '.$this->volume.' '.measuringUnitString(0, 'volume', $this->volume_units);
5374 5374
 			}
5375 5375
 			if ($labelsurfacevolume) {
5376
-				$datas['surface'] = "<br>" . $labelsurfacevolume;
5376
+				$datas['surface'] = "<br>".$labelsurfacevolume;
5377 5377
 			}
5378 5378
 		}
5379 5379
 		if ($this->type == Product::TYPE_SERVICE && !empty($this->duration_value)) {
@@ -5415,9 +5415,9 @@  discard block
 block discarded – undo
5415 5415
 		}
5416 5416
 		// show categories for this record only in ajax to not overload lists
5417 5417
 		if (isModEnabled('category') && !$nofetch) {
5418
-			require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
5418
+			require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
5419 5419
 			$form = new Form($this->db);
5420
-			$datas['categories'] = '<br>' . $form->showCategories($this->id, Categorie::TYPE_PRODUCT, 1);
5420
+			$datas['categories'] = '<br>'.$form->showCategories($this->id, Categorie::TYPE_PRODUCT, 1);
5421 5421
 		}
5422 5422
 
5423 5423
 		return $datas;
@@ -5938,7 +5938,7 @@  discard block
 block discarded – undo
5938 5938
 		if (isModEnabled("supplier_order")) {
5939 5939
 			$filterStatus = getDolGlobalString('SUPPLIER_ORDER_STATUS_FOR_VIRTUAL_STOCK', '3,4');
5940 5940
 			if (isset($includedraftpoforvirtual)) {
5941
-				$filterStatus = '0,1,2,'.$filterStatus;	// 1,2 may have already been inside $filterStatus but it is better to have twice than missing $filterStatus does not include them
5941
+				$filterStatus = '0,1,2,'.$filterStatus; // 1,2 may have already been inside $filterStatus but it is better to have twice than missing $filterStatus does not include them
5942 5942
 			}
5943 5943
 			$result = $this->load_stats_commande_fournisseur(0, $filterStatus, 1, $dateofvirtualstock);
5944 5944
 			if ($result < 0) {
@@ -6370,7 +6370,7 @@  discard block
 block discarded – undo
6370 6370
 		if (getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM')) {
6371 6371
 			$dirsociete = array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']);
6372 6372
 			foreach ($dirsociete as $dirroot) {
6373
-				$res = dol_include_once($dirroot . getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM').'.php');
6373
+				$res = dol_include_once($dirroot.getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM').'.php');
6374 6374
 				if ($res) {
6375 6375
 					break;
6376 6376
 				}
@@ -6698,7 +6698,7 @@  discard block
 block discarded – undo
6698 6698
 	 */
6699 6699
 	public function getKanbanView($option = '', $arraydata = null)
6700 6700
 	{
6701
-		global $langs,$conf;
6701
+		global $langs, $conf;
6702 6702
 
6703 6703
 		$selected = (empty($arraydata['selected']) ? 0 : $arraydata['selected']);
6704 6704
 
Please login to merge, or discard this patch.
htdocs/webhook/ajax/webhook.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,10 +106,10 @@
 block discarded – undo
106 106
 
107 107
 				$json->object = $obj;
108 108
 			} else {
109
-				$objnotfound ++;
109
+				$objnotfound++;
110 110
 			}
111 111
 		} else {
112
-			$objnotfound ++;
112
+			$objnotfound++;
113 113
 		}
114 114
 
115 115
 		if ($objnotfound) {
Please login to merge, or discard this patch.
htdocs/index.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
35 35
 
36 36
 // If not defined, we select menu "home"
37
-$_GET['mainmenu'] = GETPOST('mainmenu', 'aZ09') ? GETPOST('mainmenu', 'aZ09') : 'home';	// Keep this ?
37
+$_GET['mainmenu'] = GETPOST('mainmenu', 'aZ09') ? GETPOST('mainmenu', 'aZ09') : 'home'; // Keep this ?
38 38
 $action = GETPOST('action', 'aZ09');
39 39
 
40 40
 $hookmanager->initHooks(array('index'));
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 // Title
88 88
 $title = $langs->trans("HomeArea").' - Dolibarr '.DOL_VERSION;
89 89
 if (getDolGlobalString('MAIN_APPLICATION_TITLE')) {
90
-	$title = $langs->trans("HomeArea").' - ' . getDolGlobalString('MAIN_APPLICATION_TITLE');
90
+	$title = $langs->trans("HomeArea").' - '.getDolGlobalString('MAIN_APPLICATION_TITLE');
91 91
 }
92 92
 
93 93
 llxHeader('', $title);
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
  */
119 119
 
120 120
 // Specific warning to propose to upgrade invoice situation to progressive mode
121
-if (getDolGlobalInt('INVOICE_USE_SITUATION') == 1 ) {
121
+if (getDolGlobalInt('INVOICE_USE_SITUATION') == 1) {
122 122
 	print info_admin($langs->trans("WarningExperimentalFeatureInvoiceSituationNeedToUpgradeToProgressiveMode"));
123 123
 	print "<br>";
124 124
 }
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 	}
213 213
 
214 214
 	// Number of supplier proposals open (expired)
215
-	if (isModEnabled('supplier_proposal')  && !getDolGlobalString('MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight('supplier_proposal', 'lire')) {
215
+	if (isModEnabled('supplier_proposal') && !getDolGlobalString('MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight('supplier_proposal', 'lire')) {
216 216
 		$langs->load("supplier_proposal");
217 217
 		include_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php';
218 218
 		$board = new SupplierProposal($db);
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 	}
223 223
 
224 224
 	// Number of sales orders
225
-	if (isModEnabled('order')  && !getDolGlobalString('MAIN_DISABLE_BLOCK_CUSTOMER') && $user->hasRight('commande', 'lire')) {
225
+	if (isModEnabled('order') && !getDolGlobalString('MAIN_DISABLE_BLOCK_CUSTOMER') && $user->hasRight('commande', 'lire')) {
226 226
 		include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
227 227
 		$board = new Commande($db);
228 228
 		// Number of customer orders to be shipped (validated and in progress)
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 	}
237 237
 
238 238
 	// Number of suppliers orders
239
-	if (isModEnabled('supplier_order')  && !getDolGlobalString('MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight('fournisseur', 'commande', 'lire')) {
239
+	if (isModEnabled('supplier_order') && !getDolGlobalString('MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight('fournisseur', 'commande', 'lire')) {
240 240
 		include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
241 241
 		$board = new CommandeFournisseur($db);
242 242
 		$dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened");
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 	}
245 245
 
246 246
 	// Number of contract / services enabled (delayed)
247
-	if (isModEnabled('contract')  && !getDolGlobalString('MAIN_DISABLE_BLOCK_CONTRACT') && $user->hasRight('contrat', 'lire')) {
247
+	if (isModEnabled('contract') && !getDolGlobalString('MAIN_DISABLE_BLOCK_CONTRACT') && $user->hasRight('contrat', 'lire')) {
248 248
 		include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
249 249
 		$board = new Contrat($db);
250 250
 		$dashboardlines[$board->element.'_inactive'] = $board->load_board($user, "inactive");
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 	}
254 254
 
255 255
 	// Number of tickets open
256
-	if (isModEnabled('ticket')  && !getDolGlobalString('MAIN_DISABLE_BLOCK_TICKET') && $user->hasRight('ticket', 'read')) {
256
+	if (isModEnabled('ticket') && !getDolGlobalString('MAIN_DISABLE_BLOCK_TICKET') && $user->hasRight('ticket', 'read')) {
257 257
 		include_once DOL_DOCUMENT_ROOT.'/ticket/class/ticket.class.php';
258 258
 		$board = new Ticket($db);
259 259
 		$dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened");
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
 	}
277 277
 
278 278
 	// Number of transactions to conciliate
279
-	if (isModEnabled('bank')  && !getDolGlobalString('MAIN_DISABLE_BLOCK_BANK') && $user->hasRight('banque', 'lire') && !$user->socid) {
279
+	if (isModEnabled('bank') && !getDolGlobalString('MAIN_DISABLE_BLOCK_BANK') && $user->hasRight('banque', 'lire') && !$user->socid) {
280 280
 		include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
281 281
 		$board = new Account($db);
282 282
 		$nb = $board->countAccountToReconcile(); // Get nb of account to reconciliate
@@ -287,26 +287,26 @@  discard block
 block discarded – undo
287 287
 
288 288
 
289 289
 	// Number of cheque to send
290
-	if (isModEnabled('bank')  && !getDolGlobalString('MAIN_DISABLE_BLOCK_BANK') && $user->hasRight('banque', 'lire') && !$user->socid) {
290
+	if (isModEnabled('bank') && !getDolGlobalString('MAIN_DISABLE_BLOCK_BANK') && $user->hasRight('banque', 'lire') && !$user->socid) {
291 291
 		if (!getDolGlobalString('BANK_DISABLE_CHECK_DEPOSIT')) {
292
-			include_once DOL_DOCUMENT_ROOT . '/compta/paiement/cheque/class/remisecheque.class.php';
292
+			include_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
293 293
 			$board = new RemiseCheque($db);
294 294
 			$dashboardlines[$board->element] = $board->load_board($user);
295 295
 		}
296 296
 		if (isModEnabled('prelevement')) {
297 297
 			include_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
298 298
 			$board = new BonPrelevement($db);
299
-			$dashboardlines[$board->element . '_direct_debit'] = $board->load_board($user, 'direct_debit');
299
+			$dashboardlines[$board->element.'_direct_debit'] = $board->load_board($user, 'direct_debit');
300 300
 		}
301 301
 		if (isModEnabled('paymentbybanktransfer')) {
302 302
 			include_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
303 303
 			$board = new BonPrelevement($db);
304
-			$dashboardlines[$board->element . '_credit_transfer'] = $board->load_board($user, 'credit_transfer');
304
+			$dashboardlines[$board->element.'_credit_transfer'] = $board->load_board($user, 'credit_transfer');
305 305
 		}
306 306
 	}
307 307
 
308 308
 	// Number of foundation members
309
-	if (isModEnabled('member')  && !getDolGlobalString('MAIN_DISABLE_BLOCK_ADHERENT') && $user->hasRight('adherent', 'lire') && !$user->socid) {
309
+	if (isModEnabled('member') && !getDolGlobalString('MAIN_DISABLE_BLOCK_ADHERENT') && $user->hasRight('adherent', 'lire') && !$user->socid) {
310 310
 		include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
311 311
 		$board = new Adherent($db);
312 312
 		$dashboardlines[$board->element.'_shift'] = $board->load_board($user, 'shift');
@@ -314,21 +314,21 @@  discard block
 block discarded – undo
314 314
 	}
315 315
 
316 316
 	// Number of expense reports to approve
317
-	if (isModEnabled('expensereport')  && !getDolGlobalString('MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight('expensereport', 'approve')) {
317
+	if (isModEnabled('expensereport') && !getDolGlobalString('MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight('expensereport', 'approve')) {
318 318
 		include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
319 319
 		$board = new ExpenseReport($db);
320 320
 		$dashboardlines[$board->element.'_toapprove'] = $board->load_board($user, 'toapprove');
321 321
 	}
322 322
 
323 323
 	// Number of expense reports to pay
324
-	if (isModEnabled('expensereport')  && !getDolGlobalString('MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight('expensereport', 'to_paid')) {
324
+	if (isModEnabled('expensereport') && !getDolGlobalString('MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight('expensereport', 'to_paid')) {
325 325
 		include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
326 326
 		$board = new ExpenseReport($db);
327 327
 		$dashboardlines[$board->element.'_topay'] = $board->load_board($user, 'topay');
328 328
 	}
329 329
 
330 330
 	// Number of holidays to approve
331
-	if (isModEnabled('holiday')  && !getDolGlobalString('MAIN_DISABLE_BLOCK_HOLIDAY') && $user->hasRight('holiday', 'approve')) {
331
+	if (isModEnabled('holiday') && !getDolGlobalString('MAIN_DISABLE_BLOCK_HOLIDAY') && $user->hasRight('holiday', 'approve')) {
332 332
 		include_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
333 333
 		$board = new Holiday($db);
334 334
 		$dashboardlines[$board->element] = $board->load_board($user);
Please login to merge, or discard this patch.