Completed
Branch develop (c4712c)
by
unknown
22:15
created
htdocs/takepos/receipt.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 	$reshook = $hookmanager->executeHooks('TakeposReceipt', $parameters, $object);
141 141
 	if (!empty($hookmanager->resPrint)) {
142 142
 		print $hookmanager->resPrint;
143
-		return;	// Receipt page can be called by the takepos/send.php page that use ob_start/end so we must use return and not exit to stop page
143
+		return; // Receipt page can be called by the takepos/send.php page that use ob_start/end so we must use return and not exit to stop page
144 144
 	}
145 145
 }
146 146
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 <?php
219 219
 // Invoice Ref
220 220
 if (getDolGlobalString('TAKEPOS_RECEIPT_NAME')) {
221
-	print getDolGlobalString('TAKEPOS_RECEIPT_NAME') . " ";
221
+	print getDolGlobalString('TAKEPOS_RECEIPT_NAME')." ";
222 222
 } else {
223 223
 	print $langs->trans("InvoiceRef")." ";
224 224
 }
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 $isADuplicata = $object->pos_print_counter;
263 263
 
264 264
 if ($isADuplicata) {
265
-	print '<b>*** DUPLICATA***</b>';	// Hard coded string
265
+	print '<b>*** DUPLICATA***</b>'; // Hard coded string
266 266
 }
267 267
 ?>
268 268
 </p>
@@ -291,13 +291,13 @@  discard block
 block discarded – undo
291 291
 	if ($action == 'without_details') {
292 292
 		$qty = GETPOSTINT('qty') > 0 ? GETPOSTINT('qty') : 1;
293 293
 		print '<tr>';
294
-		print '<td>' . GETPOST('label', 'alphanohtml') . '</td>';
295
-		print '<td class="right">' . $qty . '</td>';
296
-		print '<td class="right">' . price(price2num($object->total_ttc / $qty, 'MU'), 1) . '</td>';
294
+		print '<td>'.GETPOST('label', 'alphanohtml').'</td>';
295
+		print '<td class="right">'.$qty.'</td>';
296
+		print '<td class="right">'.price(price2num($object->total_ttc / $qty, 'MU'), 1).'</td>';
297 297
 		if (getDolGlobalString('TAKEPOS_SHOW_HT_RECEIPT')) {
298
-			print '<td class="right">' . price($object->total_ht, 1) . '</td>';
298
+			print '<td class="right">'.price($object->total_ht, 1).'</td>';
299 299
 		}
300
-		print '<td class="right">' . price($object->total_ttc, 1) . '</td>';
300
+		print '<td class="right">'.price($object->total_ttc, 1).'</td>';
301 301
 		print '</tr>';
302 302
 	} else {
303 303
 		foreach ($object->lines as $line) {
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
 				if ((!isModEnabled('multicurrency') || $object->multicurrency_tx == 1) && $row->code == "LIQ" && $row->pos_change > 0) {
462 462
 					echo '<tr>';
463 463
 					echo '<td class="right">';
464
-					echo $langs->trans("Change");	// ChangeBack ?
464
+					echo $langs->trans("Change"); // ChangeBack ?
465 465
 					echo '</td>';
466 466
 					echo '<td class="right">';
467 467
 					echo price($row->pos_change, 1, '', 1, - 1, - 1, $currency);
Please login to merge, or discard this patch.
htdocs/public/company/new.php 1 patch
Spacing   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -52,16 +52,16 @@  discard block
 block discarded – undo
52 52
 
53 53
 // Load Dolibarr environment
54 54
 require '../../main.inc.php';
55
-require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
56
-require_once DOL_DOCUMENT_ROOT . '/core/lib/payments.lib.php';
57
-require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php';
58
-require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent_type.class.php';
59
-require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php';
60
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php';
61
-require_once DOL_DOCUMENT_ROOT . '/core/class/cunits.class.php';
62
-require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
63
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formadmin.class.php';
64
-require_once DOL_DOCUMENT_ROOT . '/core/lib/public.lib.php';
55
+require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
56
+require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
57
+require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
58
+require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
59
+require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
60
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
61
+require_once DOL_DOCUMENT_ROOT.'/core/class/cunits.class.php';
62
+require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
63
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
64
+require_once DOL_DOCUMENT_ROOT.'/core/lib/public.lib.php';
65 65
 
66 66
 /**
67 67
  * @var Conf $conf
@@ -149,8 +149,8 @@  discard block
 block discarded – undo
149 149
 	printCommonFooter('public');
150 150
 
151 151
 	if (!empty($conf->use_javascript_ajax)) {
152
-		print "\n" . '<!-- Includes JS Footer of Dolibarr -->' . "\n";
153
-		print '<script src="' . DOL_URL_ROOT . '/core/js/lib_foot.js.php?lang=' . $langs->defaultlang . '"></script>' . "\n";
152
+		print "\n".'<!-- Includes JS Footer of Dolibarr -->'."\n";
153
+		print '<script src="'.DOL_URL_ROOT.'/core/js/lib_foot.js.php?lang='.$langs->defaultlang.'"></script>'."\n";
154 154
 	}
155 155
 
156 156
 	print "</body>\n";
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 		$ok = (array_key_exists($sessionkey, $_SESSION) && (strtolower($_SESSION[$sessionkey]) == strtolower(GETPOST('code'))));
189 189
 		if (!$ok) {
190 190
 			$error++;
191
-			$errmsg .= $langs->trans("ErrorBadValueForCode") . "<br>\n";
191
+			$errmsg .= $langs->trans("ErrorBadValueForCode")."<br>\n";
192 192
 			$action = '';
193 193
 		}
194 194
 	}
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 		$societe->phone = GETPOST('phone', 'alpha');
204 204
 		$societe->fax = GETPOST('fax', 'alpha');
205 205
 		$societe->email = trim(GETPOST('email', 'email'));
206
-		$societe->client = 2 ; // our client is a prospect
206
+		$societe->client = 2; // our client is a prospect
207 207
 		$societe->code_client = '-1';
208 208
 		$societe->name_alias = GETPOST('name_alias', 'alphanohtml');
209 209
 		$societe->note_private = GETPOST('note_private', 'alphanohtml');
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 		if (!$error) {
230 230
 			$result = $societe->create($user);
231 231
 			if ($result > 0) {
232
-				require_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php';
232
+				require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
233 233
 				$object = $societe;
234 234
 
235 235
 				if (!empty($backtopage)) {
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 					$urlback = getDolGlobalString('MEMBER_URL_REDIRECT_SUBSCRIPTION');
239 239
 					// TODO Make replacement of __AMOUNT__, etc...
240 240
 				} else {
241
-					$urlback = $_SERVER["PHP_SELF"] . "?action=added&token=" . newToken();
241
+					$urlback = $_SERVER["PHP_SELF"]."?action=added&token=".newToken();
242 242
 				}
243 243
 			} else {
244 244
 				$error++;
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 	if (!$error) {
251 251
 		$db->commit();
252 252
 
253
-		header("Location: " . $urlback);
253
+		header("Location: ".$urlback);
254 254
 		exit;
255 255
 	} else {
256 256
 		$db->rollback();
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 llxHeaderVierge($langs->trans("ContactUs"));
291 291
 
292 292
 print '<br>';
293
-print load_fiche_titre(img_picto('', 'member_nocolor', 'class="pictofixedwidth"') . ' &nbsp; ' . $langs->trans("ContactUs"), '', '', 0, '', 'center');
293
+print load_fiche_titre(img_picto('', 'member_nocolor', 'class="pictofixedwidth"').' &nbsp; '.$langs->trans("ContactUs"), '', '', 0, '', 'center');
294 294
 
295 295
 
296 296
 print '<div align="center">';
@@ -298,9 +298,9 @@  discard block
 block discarded – undo
298 298
 
299 299
 print '<div class="center subscriptionformhelptext opacitymedium justify">';
300 300
 if (getDolGlobalString('COMPANY_NEWFORM_TEXT')) {
301
-	print $langs->trans(getDolGlobalString('COMPANY_NEWFORM_TEXT')) . "<br>\n";
301
+	print $langs->trans(getDolGlobalString('COMPANY_NEWFORM_TEXT'))."<br>\n";
302 302
 } else {
303
-	print $langs->trans("ContactUsDesc", getDolGlobalString("MAIN_INFO_SOCIETE_MAIL")) . "<br>\n";
303
+	print $langs->trans("ContactUsDesc", getDolGlobalString("MAIN_INFO_SOCIETE_MAIL"))."<br>\n";
304 304
 }
305 305
 print '</div>';
306 306
 
@@ -308,13 +308,13 @@  discard block
 block discarded – undo
308 308
 dol_htmloutput_events();
309 309
 
310 310
 // Print form
311
-print '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST" name="newprospect">' . "\n";
312
-print '<input type="hidden" name="token" value="' . newToken() . '" / >';
313
-print '<input type="hidden" name="entity" value="' . $entity . '" />';
311
+print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" name="newprospect">'."\n";
312
+print '<input type="hidden" name="token" value="'.newToken().'" / >';
313
+print '<input type="hidden" name="entity" value="'.$entity.'" />';
314 314
 print '<input type="hidden" name="action" value="add" />';
315 315
 print '<br>';
316 316
 
317
-$messagemandatory = '<span class="">' . $langs->trans("FieldsWithAreMandatory", '*') . '</span>';
317
+$messagemandatory = '<span class="">'.$langs->trans("FieldsWithAreMandatory", '*').'</span>';
318 318
 //print '<br><span class="opacitymedium">'.$langs->trans("FieldsWithAreMandatory", '*').'</span><br>';
319 319
 //print $langs->trans("FieldsWithIsForPublic",'**').'<br>';
320 320
 
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
 </script>';
351 351
 
352 352
 
353
-print '<table class="border" summary="form to subscribe" id="tablesubscribe">' . "\n";
353
+print '<table class="border" summary="form to subscribe" id="tablesubscribe">'."\n";
354 354
 //Third party name
355 355
 /*
356 356
 if ($object->particulier || $private) {
@@ -360,30 +360,30 @@  discard block
 block discarded – undo
360 360
 }
361 361
 */
362 362
 print '<tr class="tr-field-thirdparty-name"><td class="titlefieldcreate">'; // text appreas left
363
-print '<input type="hidden" name="ThirdPartyName" value="' . $langs->trans('ThirdPartyName') . '">';
364
-print '<span id="TypeName" class="fieldrequired"  title="' .dol_escape_htmltag($langs->trans("FieldsWithAreMandatory", '*')) . '" >' . $form->editfieldkey('Company', 'name', '', $object, 0) . '<span class="star"> *</span></span>';
363
+print '<input type="hidden" name="ThirdPartyName" value="'.$langs->trans('ThirdPartyName').'">';
364
+print '<span id="TypeName" class="fieldrequired"  title="'.dol_escape_htmltag($langs->trans("FieldsWithAreMandatory", '*')).'" >'.$form->editfieldkey('Company', 'name', '', $object, 0).'<span class="star"> *</span></span>';
365 365
 print '</td><td>'; // inline input
366
-print '<input type="text" class="minwidth300" maxlength="128" name="name" id="name" value="' . dol_escape_htmltag($object->name) . '" autofocus="autofocus">';
366
+print '<input type="text" class="minwidth300" maxlength="128" name="name" id="name" value="'.dol_escape_htmltag($object->name).'" autofocus="autofocus">';
367 367
 //
368 368
 
369 369
 // Name and lastname
370
-print '<tr><td class="classfortooltip" title="' . dol_escape_htmltag($messagemandatory) . '">' . $langs->trans("Firstname") . ' <span class="star">*</span></td><td><input type="text" name="firstname" class="minwidth150" value="' . dol_escape_htmltag(GETPOST('firstname')) . '"></td></tr>' . "\n";
370
+print '<tr><td class="classfortooltip" title="'.dol_escape_htmltag($messagemandatory).'">'.$langs->trans("Firstname").' <span class="star">*</span></td><td><input type="text" name="firstname" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('firstname')).'"></td></tr>'."\n";
371 371
 
372
-print '<tr><td class="classfortooltip" title="' . dol_escape_htmltag($messagemandatory) . '">' . $langs->trans("Lastname") . ' <span class="star">*</span></td><td><input type="text" name="lastname" class="minwidth150" value="' . dol_escape_htmltag(GETPOST('lastname')) . '"></td></tr>' . "\n";
372
+print '<tr><td class="classfortooltip" title="'.dol_escape_htmltag($messagemandatory).'">'.$langs->trans("Lastname").' <span class="star">*</span></td><td><input type="text" name="lastname" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('lastname')).'"></td></tr>'."\n";
373 373
 
374 374
 // Address
375 375
 print '<tr><td class="tdtop">';
376 376
 print $form->editfieldkey('Address', 'address', '', $object, 0);
377 377
 print '</td>';
378 378
 print '<td>';
379
-print '<textarea name="address" id="address" class="quatrevingtpercent" rows="' . ROWS_2 . '" wrap="soft">';
379
+print '<textarea name="address" id="address" class="quatrevingtpercent" rows="'.ROWS_2.'" wrap="soft">';
380 380
 print dol_escape_htmltag($object->address, 0, 1);
381 381
 print '</textarea>';
382 382
 print $form->widgetForTranslation("address", $object, $permissiontoadd, 'textarea', 'alphanohtml', 'quatrevingtpercent');
383 383
 print '</td></tr>';
384 384
 
385 385
 // Country
386
-print '<tr><td>' . $form->editfieldkey('Country', 'selectcountry_id', '', $object, 0) . '</td><td class="maxwidthonsmartphone">';
386
+print '<tr><td>'.$form->editfieldkey('Country', 'selectcountry_id', '', $object, 0).'</td><td class="maxwidthonsmartphone">';
387 387
 print img_picto('', 'country', 'class="pictofixedwidth"');
388 388
 print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id') : $object->country_id), 'country_id', '', 0, 'minwidth300 maxwidth500 widthcentpercentminusx');
389 389
 if ($user->admin) {
@@ -392,40 +392,40 @@  discard block
 block discarded – undo
392 392
 print '</td></tr>';
393 393
 
394 394
 // Phone / Fax
395
-print '<tr><td>' . $form->editfieldkey('Phone', 'phone', '', $object, 0) . '</td>';
396
-print '<td>' . img_picto('', 'object_phoning', 'class="pictofixedwidth"') . ' <input type="text" name="phone" id="phone" class="maxwidth200 widthcentpercentminusx" value="' . (GETPOSTISSET('phone') ? GETPOST('phone', 'alpha') : $object->phone) . '"></td>';
395
+print '<tr><td>'.$form->editfieldkey('Phone', 'phone', '', $object, 0).'</td>';
396
+print '<td>'.img_picto('', 'object_phoning', 'class="pictofixedwidth"').' <input type="text" name="phone" id="phone" class="maxwidth200 widthcentpercentminusx" value="'.(GETPOSTISSET('phone') ? GETPOST('phone', 'alpha') : $object->phone).'"></td>';
397 397
 print '</tr>';
398 398
 
399 399
 print '<tr>';
400
-print '<td>' . $form->editfieldkey('Fax', 'fax', '', $object, 0) . '</td>';
401
-print '<td>' . img_picto('', 'object_phoning_fax', 'class="pictofixedwidth"') . ' <input type="text" name="fax" id="fax" class="maxwidth200 widthcentpercentminusx" value="' . (GETPOSTISSET('fax') ? GETPOST('fax', 'alpha') : $object->fax) . '"></td>';
400
+print '<td>'.$form->editfieldkey('Fax', 'fax', '', $object, 0).'</td>';
401
+print '<td>'.img_picto('', 'object_phoning_fax', 'class="pictofixedwidth"').' <input type="text" name="fax" id="fax" class="maxwidth200 widthcentpercentminusx" value="'.(GETPOSTISSET('fax') ? GETPOST('fax', 'alpha') : $object->fax).'"></td>';
402 402
 print '</tr>';
403 403
 
404 404
 // Email / Web
405
-print '<tr><td>' . $form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '', !getDolGlobalString('SOCIETE_EMAIL_MANDATORY') ? '' : $conf->global->SOCIETE_EMAIL_MANDATORY) . '</td>';
406
-print '<td>' . img_picto('', 'object_email', 'class="pictofixedwidth"') . ' <input type="text" class="maxwidth200 widthcentpercentminusx" name="email" id="email" value="' . $object->email . '"></td>';
405
+print '<tr><td>'.$form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '', !getDolGlobalString('SOCIETE_EMAIL_MANDATORY') ? '' : $conf->global->SOCIETE_EMAIL_MANDATORY).'</td>';
406
+print '<td>'.img_picto('', 'object_email', 'class="pictofixedwidth"').' <input type="text" class="maxwidth200 widthcentpercentminusx" name="email" id="email" value="'.$object->email.'"></td>';
407 407
 if (isModEnabled('mailing') && getDolGlobalString('THIRDPARTY_SUGGEST_ALSO_ADDRESS_CREATION')) {
408 408
 	if ($conf->browser->layout == 'phone') {
409 409
 		print '</tr><tr>';
410 410
 	}
411
-	print '<td class="individualline noemail">' . $form->editfieldkey($langs->trans('No_Email') . ' (' . $langs->trans('Contact') . ')', 'contact_no_email', '', $object, 0) . '</td>';
412
-	print '<td class="individualline" ' . (($conf->browser->layout == 'phone') /* || !isModEnabled('mailing') */ ? ' colspan="3"' : '') . '>' . $form->selectyesno('contact_no_email', (GETPOSTISSET("contact_no_email") ? GETPOST("contact_no_email", 'alpha') : (empty($object->no_email) ? 0 : 1)), 1, false, 1) . '</td>';
411
+	print '<td class="individualline noemail">'.$form->editfieldkey($langs->trans('No_Email').' ('.$langs->trans('Contact').')', 'contact_no_email', '', $object, 0).'</td>';
412
+	print '<td class="individualline" '.(($conf->browser->layout == 'phone') /* || !isModEnabled('mailing') */ ? ' colspan="3"' : '').'>'.$form->selectyesno('contact_no_email', (GETPOSTISSET("contact_no_email") ? GETPOST("contact_no_email", 'alpha') : (empty($object->no_email) ? 0 : 1)), 1, false, 1).'</td>';
413 413
 }
414 414
 print '</tr>';
415 415
 
416
-print '<tr><td>' . $form->editfieldkey('Web', 'url', '', $object, 0) . '</td>';
417
-print '<td>' . img_picto('', 'globe', 'class="pictofixedwidth"') . ' <input type="text" class="maxwidth500 widthcentpercentminusx" name="url" id="url" value="' . $object->url . '"></td></tr>';
416
+print '<tr><td>'.$form->editfieldkey('Web', 'url', '', $object, 0).'</td>';
417
+print '<td>'.img_picto('', 'globe', 'class="pictofixedwidth"').' <input type="text" class="maxwidth500 widthcentpercentminusx" name="url" id="url" value="'.$object->url.'"></td></tr>';
418 418
 
419 419
 
420 420
 // Comments
421 421
 print '<tr>';
422
-print '<td class="tdtop">' . $langs->trans("Comments") . '</td>';
423
-print '<td class="tdtop"><textarea name="note_private" id="note_private" wrap="soft" class="quatrevingtpercent" rows="' . ROWS_3 . '">' . dol_escape_htmltag(GETPOST('note_private', 'restricthtml'), 0, 1) . '</textarea></td>';
424
-print '</tr>' . "\n";
422
+print '<td class="tdtop">'.$langs->trans("Comments").'</td>';
423
+print '<td class="tdtop"><textarea name="note_private" id="note_private" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOST('note_private', 'restricthtml'), 0, 1).'</textarea></td>';
424
+print '</tr>'."\n";
425 425
 
426 426
 
427 427
 // Other attributes
428
-$parameters['tpl_context'] = 'public';	// define template context to public
428
+$parameters['tpl_context'] = 'public'; // define template context to public
429 429
 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
430 430
 
431 431
 
@@ -433,14 +433,14 @@  discard block
 block discarded – undo
433 433
 
434 434
 // Display Captcha code if is enabled
435 435
 if (getDolGlobalString('MAIN_SECURITY_ENABLECAPTCHA_THIRDPARTY')) {
436
-	require_once DOL_DOCUMENT_ROOT . '/core/lib/security2.lib.php';
437
-	print '<tr><td class="titlefield"><label for="email"><span class="fieldrequired">' . $langs->trans("SecurityCode") . '</span></label></td><td>';
436
+	require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
437
+	print '<tr><td class="titlefield"><label for="email"><span class="fieldrequired">'.$langs->trans("SecurityCode").'</span></label></td><td>';
438 438
 	print '<span class="span-icon-security inline-block">';
439
-	print '<input id="securitycode" placeholder="' . $langs->trans("SecurityCode") . '" class="flat input-icon-security width150" type="text" maxlength="5" name="code" tabindex="3" />';
439
+	print '<input id="securitycode" placeholder="'.$langs->trans("SecurityCode").'" class="flat input-icon-security width150" type="text" maxlength="5" name="code" tabindex="3" />';
440 440
 	print '</span>';
441 441
 	print '<span class="nowrap inline-block">';
442
-	print '<img class="inline-block valignmiddle" src="' . DOL_URL_ROOT . '/core/antispamimage.php" border="0" width="80" height="32" id="img_securitycode" />';
443
-	print '<a class="inline-block valignmiddle" href="' . $_SERVER['PHP_SELF'] . '" tabindex="4" data-role="button">' . img_picto($langs->trans("Refresh"), 'refresh', 'id="captcha_refresh_img"') . '</a>';
442
+	print '<img class="inline-block valignmiddle" src="'.DOL_URL_ROOT.'/core/antispamimage.php" border="0" width="80" height="32" id="img_securitycode" />';
443
+	print '<a class="inline-block valignmiddle" href="'.$_SERVER['PHP_SELF'].'" tabindex="4" data-role="button">'.img_picto($langs->trans("Refresh"), 'refresh', 'id="captcha_refresh_img"').'</a>';
444 444
 	print '</span>';
445 445
 	print '</td></tr>';
446 446
 }
@@ -451,9 +451,9 @@  discard block
 block discarded – undo
451 451
 
452 452
 // Save / Submit
453 453
 print '<div class="center">';
454
-print '<input type="submit" value="' . $langs->trans("Send") . '" id="submitsave" class="button">';
454
+print '<input type="submit" value="'.$langs->trans("Send").'" id="submitsave" class="button">';
455 455
 if (!empty($backtopage)) {
456
-	print ' &nbsp; &nbsp; <input type="submit" value="' . $langs->trans("Cancel") . '" id="submitcancel" class="button button-cancel">';
456
+	print ' &nbsp; &nbsp; <input type="submit" value="'.$langs->trans("Cancel").'" id="submitcancel" class="button button-cancel">';
457 457
 }
458 458
 print '</div>';
459 459
 
Please login to merge, or discard this patch.
htdocs/expensereport/class/expensereport.class.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -255,12 +255,12 @@  discard block
 block discarded – undo
255 255
 	 * @var float|int
256 256
 	 * @deprecated See $total_localtax1
257 257
 	 */
258
-	public $localtax1;	// for backward compatibility (real field should be total_localtax1 defined into CommonObject)
258
+	public $localtax1; // for backward compatibility (real field should be total_localtax1 defined into CommonObject)
259 259
 	/**
260 260
 	 * @var float|int
261 261
 	 * @deprecated See $total_localtax2
262 262
 	 */
263
-	public $localtax2;	// for backward compatibility (real field should be total_localtax2 defined into CommonObject)
263
+	public $localtax2; // for backward compatibility (real field should be total_localtax2 defined into CommonObject)
264 264
 
265 265
 	/**
266 266
 	 * Draft status
@@ -351,8 +351,8 @@  discard block
 block discarded – undo
351 351
 		$this->total_tva = 0;
352 352
 		$this->total_localtax1 = 0;
353 353
 		$this->total_localtax2 = 0;
354
-		$this->localtax1 = 0;	// For backward compatibility
355
-		$this->localtax2 = 0;	// For backward compatibility
354
+		$this->localtax1 = 0; // For backward compatibility
355
+		$this->localtax2 = 0; // For backward compatibility
356 356
 		$this->modepaymentid = 0;
357 357
 
358 358
 		// List of language codes for status
@@ -714,8 +714,8 @@  discard block
 block discarded – undo
714 714
 				$this->total_ht     = $obj->total_ht;
715 715
 				$this->total_tva    = $obj->total_tva;
716 716
 				$this->total_ttc    = $obj->total_ttc;
717
-				$this->localtax1    = $obj->total_localtax1;		// For backward compatibility
718
-				$this->localtax2    = $obj->total_localtax2;		// For backward compatibility
717
+				$this->localtax1    = $obj->total_localtax1; // For backward compatibility
718
+				$this->localtax2    = $obj->total_localtax2; // For backward compatibility
719 719
 				$this->total_localtax1 = $obj->total_localtax1;
720 720
 				$this->total_localtax2 = $obj->total_localtax2;
721 721
 
@@ -978,7 +978,7 @@  discard block
 block discarded – undo
978 978
 
979 979
 		$this->note_private = 'Private note';
980 980
 		$this->note_public = 'SPECIMEN';
981
-		$nbp = min(1000, GETPOSTINT('nblines') ? GETPOSTINT('nblines') : 5);	// We can force the nb of lines to test from command line (but not more than 1000)
981
+		$nbp = min(1000, GETPOSTINT('nblines') ? GETPOSTINT('nblines') : 5); // We can force the nb of lines to test from command line (but not more than 1000)
982 982
 		$xnbp = 0;
983 983
 		while ($xnbp < $nbp) {
984 984
 			$line = new ExpenseReportLine($this->db);
@@ -1188,7 +1188,7 @@  discard block
 block discarded – undo
1188 1188
 
1189 1189
 				$deplig->rule_warning_message = $objp->rule_warning_message;
1190 1190
 
1191
-				$deplig->rang               = $objp->rang;
1191
+				$deplig->rang = $objp->rang;
1192 1192
 
1193 1193
 				$this->lines[$i] = $deplig;
1194 1194
 
@@ -1736,7 +1736,7 @@  discard block
 block discarded – undo
1736 1736
 		if (getDolGlobalString('EXPENSEREPORT_ADDON')) {
1737 1737
 			$mybool = false;
1738 1738
 
1739
-			$file = getDolGlobalString('EXPENSEREPORT_ADDON') . ".php";
1739
+			$file = getDolGlobalString('EXPENSEREPORT_ADDON').".php";
1740 1740
 			$classname = getDolGlobalString('EXPENSEREPORT_ADDON');
1741 1741
 
1742 1742
 			// Include file with class
@@ -1893,7 +1893,7 @@  discard block
 block discarded – undo
1893 1893
 		$result .= $linkend;
1894 1894
 
1895 1895
 		global $action;
1896
-		$hookmanager->initHooks(array($this->element . 'dao'));
1896
+		$hookmanager->initHooks(array($this->element.'dao'));
1897 1897
 		$parameters = array('id' => $this->id, 'getnomurl' => &$result);
1898 1898
 		$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
1899 1899
 		if ($reshook > 0) {
@@ -1986,8 +1986,8 @@  discard block
 block discarded – undo
1986 1986
 			$this->line = new ExpenseReportLine($this->db);
1987 1987
 
1988 1988
 			// We don't know seller and buyer for expense reports
1989
-			$seller = $mysoc;			// We use same than current company (expense report are often done in same country)
1990
-			$seller->tva_assuj = 1;		// Most seller uses vat
1989
+			$seller = $mysoc; // We use same than current company (expense report are often done in same country)
1990
+			$seller->tva_assuj = 1; // Most seller uses vat
1991 1991
 			$buyer = new Societe($this->db);
1992 1992
 
1993 1993
 			$localtaxes_type = getLocalTaxesFromRate($vatrate, 0, $buyer, $seller);
@@ -2069,8 +2069,8 @@  discard block
 block discarded – undo
2069 2069
 
2070 2070
 		// We don't know seller and buyer for expense reports
2071 2071
 		if (!is_object($seller)) {
2072
-			$seller = $mysoc;			// We use same than current company (expense report are often done in same country)
2073
-			$seller->tva_assuj = 1;		// Most seller uses vat
2072
+			$seller = $mysoc; // We use same than current company (expense report are often done in same country)
2073
+			$seller->tva_assuj = 1; // Most seller uses vat
2074 2074
 		}
2075 2075
 
2076 2076
 		$expensereportrule = new ExpenseReportRule($this->db);
@@ -2154,8 +2154,8 @@  discard block
 block discarded – undo
2154 2154
 
2155 2155
 		// We don't know seller and buyer for expense reports
2156 2156
 		if (!is_object($seller)) {
2157
-			$seller = $mysoc;			// We use same than current company (expense report are often done in same country)
2158
-			$seller->tva_assuj = 1;		// Most seller uses vat
2157
+			$seller = $mysoc; // We use same than current company (expense report are often done in same country)
2158
+			$seller->tva_assuj = 1; // Most seller uses vat
2159 2159
 		}
2160 2160
 
2161 2161
 		$expenseik = new ExpenseReportIk($this->db);
@@ -2249,10 +2249,10 @@  discard block
 block discarded – undo
2249 2249
 			$type = 0; // TODO What if type is service ?
2250 2250
 
2251 2251
 			// We don't know seller and buyer for expense reports
2252
-			$seller = $mysoc;			// We use same than current company (expense report are often done in same country)
2253
-			$seller->tva_assuj = 1;		// Most seller uses vat
2254
-			$seller->localtax1_assuj = $mysoc->localtax1_assuj;		// We don't know, we reuse the state of company
2255
-			$seller->localtax2_assuj = $mysoc->localtax1_assuj;		// We don't know, we reuse the state of company
2252
+			$seller = $mysoc; // We use same than current company (expense report are often done in same country)
2253
+			$seller->tva_assuj = 1; // Most seller uses vat
2254
+			$seller->localtax1_assuj = $mysoc->localtax1_assuj; // We don't know, we reuse the state of company
2255
+			$seller->localtax2_assuj = $mysoc->localtax1_assuj; // We don't know, we reuse the state of company
2256 2256
 			$buyer = new Societe($this->db);
2257 2257
 
2258 2258
 			$localtaxes_type = getLocalTaxesFromRate($vatrate, 0, $buyer, $seller);
@@ -2412,7 +2412,7 @@  discard block
 block discarded – undo
2412 2412
 
2413 2413
 		if ($row === false) {
2414 2414
 			$this->error = $this->db->lasterror();
2415
-			dol_syslog(__CLASS__."::". __METHOD__."  Error ".$this->error, LOG_ERR);
2415
+			dol_syslog(__CLASS__."::".__METHOD__."  Error ".$this->error, LOG_ERR);
2416 2416
 			return -1;
2417 2417
 		}
2418 2418
 
@@ -2835,7 +2835,7 @@  discard block
 block discarded – undo
2835 2835
 		$return .= img_picto('', $this->picto);
2836 2836
 		$return .= '</span>';
2837 2837
 		$return .= '<div class="info-box-content">';
2838
-		$return .= '<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">' . $this->getNomUrl(1) . '</span>';
2838
+		$return .= '<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.$this->getNomUrl(1).'</span>';
2839 2839
 		if ($selected >= 0) {
2840 2840
 			$return .= '<input id="cb'.$this->id.'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>';
2841 2841
 		}
Please login to merge, or discard this patch.
htdocs/admin/openid_connect.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 if ($action != '') {
117 117
 	if (!$error) {
118 118
 		setEventMessage($langs->trans("SetupSaved"));
119
-		header("Location: " . $_SERVER["PHP_SELF"]);
119
+		header("Location: ".$_SERVER["PHP_SELF"]);
120 120
 		exit;
121 121
 	} else {
122 122
 		setEventMessages('', $errors, 'errors');
@@ -187,84 +187,84 @@  discard block
 block discarded – undo
187 187
 	print "</tr>\n";
188 188
 
189 189
 	// MAIN_AUTHENTICATION_OIDC_LOGIN_CLAIM
190
-	print '<tr class="oddeven">' . "\n";
190
+	print '<tr class="oddeven">'."\n";
191 191
 	print '<td>'.$langs->trans("MainAuthenticationOidcLoginClaimName").'</td>'."\n";
192 192
 	print '<td>'.$langs->trans("MainAuthenticationOidcLoginClaimDesc").'</td>'."\n";
193
-	print '<td align="right">' . "\n";
193
+	print '<td align="right">'."\n";
194 194
 	print '<input name="MAIN_AUTHENTICATION_OIDC_LOGIN_CLAIM" id="MAIN_AUTHENTICATION_OIDC_LOGIN_CLAIM" class="minwidth400" value="'.dol_escape_htmltag((GETPOSTISSET('MAIN_AUTHENTICATION_OIDC_LOGIN_CLAIM') ? GETPOST('MAIN_AUTHENTICATION_OIDC_LOGIN_CLAIM', 'nohtml') : (getDolGlobalString('MAIN_AUTHENTICATION_OIDC_LOGIN_CLAIM') ? getDolGlobalString("MAIN_AUTHENTICATION_OIDC_LOGIN_CLAIM") : ''))).'"></td></tr>';
195
-	print '</td></tr>' . "\n";
195
+	print '</td></tr>'."\n";
196 196
 
197 197
 	// MAIN_AUTHENTICATION_OIDC_CLIENT_ID
198
-	print '<tr class="oddeven">' . "\n";
198
+	print '<tr class="oddeven">'."\n";
199 199
 	print '<td>'.$langs->trans("MainAuthenticationOidcClientIdName").'</td>'."\n";
200 200
 	print '<td>'.$langs->trans("MainAuthenticationOidcClientIdDesc").'</td>'."\n";
201
-	print '<td align="right">' . "\n";
201
+	print '<td align="right">'."\n";
202 202
 	print '<input name="MAIN_AUTHENTICATION_OIDC_CLIENT_ID" id="MAIN_AUTHENTICATION_OIDC_CLIENT_ID" class="minwidth400" value="'.dol_escape_htmltag((GETPOSTISSET('MAIN_AUTHENTICATION_OIDC_CLIENT_ID') ? GETPOST('MAIN_AUTHENTICATION_OIDC_CLIENT_ID', 'nohtml') : (getDolGlobalString('MAIN_AUTHENTICATION_OIDC_CLIENT_ID') ? getDolGlobalString("MAIN_AUTHENTICATION_OIDC_CLIENT_ID") : ''))).'"></td></tr>';
203
-	print '</td></tr>' . "\n";
203
+	print '</td></tr>'."\n";
204 204
 
205 205
 	// MAIN_AUTHENTICATION_OIDC_CLIENT_SECRET
206
-	print '<tr class="oddeven">' . "\n";
206
+	print '<tr class="oddeven">'."\n";
207 207
 	print '<td>'.$langs->trans("MainAuthenticationOidcClientSecretName").'</td>'."\n";
208 208
 	print '<td>'.$langs->trans("MainAuthenticationOidcClientSecretDesc").'</td>'."\n";
209
-	print '<td align="right">' . "\n";
209
+	print '<td align="right">'."\n";
210 210
 	print '<input type="password" name="MAIN_AUTHENTICATION_OIDC_CLIENT_SECRET" id="MAIN_AUTHENTICATION_OIDC_CLIENT_SECRET" class="minwidth400" value="'.dol_escape_htmltag((GETPOSTISSET('MAIN_AUTHENTICATION_OIDC_CLIENT_SECRET') ? GETPOST('MAIN_AUTHENTICATION_OIDC_CLIENT_SECRET', 'nohtml') : (getDolGlobalString('MAIN_AUTHENTICATION_OIDC_CLIENT_SECRET') ? getDolGlobalString("MAIN_AUTHENTICATION_OIDC_CLIENT_SECRET") : ''))).'"></td></tr>';
211
-	print '</td></tr>' . "\n";
211
+	print '</td></tr>'."\n";
212 212
 
213 213
 	// MAIN_AUTHENTICATION_OIDC_SCOPES
214
-	print '<tr class="oddeven">' . "\n";
214
+	print '<tr class="oddeven">'."\n";
215 215
 	print '<td>'.$langs->trans("MainAuthenticationOidcScopesName").'</td>'."\n";
216 216
 	print '<td>'.$langs->trans("MainAuthenticationOidcScopesDesc").'</td>'."\n";
217
-	print '<td align="right">' . "\n";
217
+	print '<td align="right">'."\n";
218 218
 	print '<input name="MAIN_AUTHENTICATION_OIDC_SCOPES" id="MAIN_AUTHENTICATION_OIDC_SCOPES" class="minwidth400" value="'.dol_escape_htmltag((GETPOSTISSET('MAIN_AUTHENTICATION_OIDC_SCOPES') ? GETPOST('MAIN_AUTHENTICATION_OIDC_SCOPES', 'nohtml') : (getDolGlobalString('MAIN_AUTHENTICATION_OIDC_SCOPES') ? getDolGlobalString("MAIN_AUTHENTICATION_OIDC_SCOPES") : ''))).'"></td></tr>';
219
-	print '</td></tr>' . "\n";
219
+	print '</td></tr>'."\n";
220 220
 
221 221
 	// MAIN_AUTHENTICATION_OIDC_AUTHORIZE_URL
222
-	print '<tr class="oddeven">' . "\n";
222
+	print '<tr class="oddeven">'."\n";
223 223
 	print '<td>'.$langs->trans("MainAuthenticationOidcAuthorizeUrlName").'</td>'."\n";
224 224
 	print '<td>'.$langs->trans("MainAuthenticationOidcAuthorizeUrlDesc").'</td>'."\n";
225
-	print '<td align="right">' . "\n";
225
+	print '<td align="right">'."\n";
226 226
 	print '<input name="MAIN_AUTHENTICATION_OIDC_AUTHORIZE_URL" id="MAIN_AUTHENTICATION_OIDC_AUTHORIZE_URL" class="minwidth400" value="'.dol_escape_htmltag((GETPOSTISSET('MAIN_AUTHENTICATION_OIDC_AUTHORIZE_URL') ? GETPOST('MAIN_AUTHENTICATION_OIDC_AUTHORIZE_URL', 'nohtml') : (getDolGlobalString('MAIN_AUTHENTICATION_OIDC_AUTHORIZE_URL') ? getDolGlobalString("MAIN_AUTHENTICATION_OIDC_AUTHORIZE_URL") : ''))).'"></td></tr>';
227
-	print '</td></tr>' . "\n";
227
+	print '</td></tr>'."\n";
228 228
 
229 229
 	// MAIN_AUTHENTICATION_OIDC_TOKEN_URL
230
-	print '<tr class="oddeven">' . "\n";
230
+	print '<tr class="oddeven">'."\n";
231 231
 	print '<td>'.$langs->trans("MainAuthenticationOidcTokenUrlName").'</td>'."\n";
232 232
 	print '<td>'.$langs->trans("MainAuthenticationOidcTokenUrlDesc").'</td>'."\n";
233
-	print '<td align="right">' . "\n";
233
+	print '<td align="right">'."\n";
234 234
 	print '<input name="MAIN_AUTHENTICATION_OIDC_TOKEN_URL" id="MAIN_AUTHENTICATION_OIDC_TOKEN_URL" class="minwidth400" value="'.dol_escape_htmltag((GETPOSTISSET('MAIN_AUTHENTICATION_OIDC_TOKEN_URL') ? GETPOST('MAIN_AUTHENTICATION_OIDC_TOKEN_URL', 'nohtml') : (getDolGlobalString('MAIN_AUTHENTICATION_OIDC_TOKEN_URL') ? getDolGlobalString("MAIN_AUTHENTICATION_OIDC_TOKEN_URL") : ''))).'"></td></tr>';
235
-	print '</td></tr>' . "\n";
235
+	print '</td></tr>'."\n";
236 236
 
237 237
 	// MAIN_AUTHENTICATION_OIDC_USERINFO_URL
238
-	print '<tr class="oddeven">' . "\n";
238
+	print '<tr class="oddeven">'."\n";
239 239
 	print '<td>'.$langs->trans("MainAuthenticationOidcUserinfoUrlName").'</td>'."\n";
240 240
 	print '<td>'.$langs->trans("MainAuthenticationOidcUserinfoUrlDesc").'</td>'."\n";
241
-	print '<td align="right">' . "\n";
241
+	print '<td align="right">'."\n";
242 242
 	print '<input name="MAIN_AUTHENTICATION_OIDC_USERINFO_URL" id="MAIN_AUTHENTICATION_OIDC_USERINFO_URL" class="minwidth400" value="'.dol_escape_htmltag((GETPOSTISSET('MAIN_AUTHENTICATION_OIDC_USERINFO_URL') ? GETPOST('MAIN_AUTHENTICATION_OIDC_USERINFO_URL', 'nohtml') : (getDolGlobalString('MAIN_AUTHENTICATION_OIDC_USERINFO_URL') ? getDolGlobalString("MAIN_AUTHENTICATION_OIDC_USERINFO_URL") : ''))).'"></td></tr>';
243
-	print '</td></tr>' . "\n";
243
+	print '</td></tr>'."\n";
244 244
 
245 245
 	// MAIN_AUTHENTICATION_OIDC_LOGOUT_URL
246
-	print '<tr class="oddeven">' . "\n";
246
+	print '<tr class="oddeven">'."\n";
247 247
 	print '<td>'.$langs->trans("MainAuthenticationOidcLogoutUrlName").'</td>'."\n";
248 248
 	print '<td>'.$langs->trans("MainAuthenticationOidcLogoutUrlDesc").'</td>'."\n";
249
-	print '<td align="right">' . "\n";
249
+	print '<td align="right">'."\n";
250 250
 	print '<input name="MAIN_AUTHENTICATION_OIDC_LOGOUT_URL" id="MAIN_AUTHENTICATION_OIDC_LOGOUT_URL" class="minwidth400" value="'.dol_escape_htmltag((GETPOSTISSET('MAIN_AUTHENTICATION_OIDC_LOGOUT_URL') ? GETPOST('MAIN_AUTHENTICATION_OIDC_LOGOUT_URL', 'nohtml') : (getDolGlobalString('MAIN_AUTHENTICATION_OIDC_LOGOUT_URL') ? getDolGlobalString("MAIN_AUTHENTICATION_OIDC_LOGOUT_URL") : ''))).'"></td></tr>';
251
-	print '</td></tr>' . "\n";
251
+	print '</td></tr>'."\n";
252 252
 
253 253
 	// REDIRECT_URL
254
-	print '<tr class="oddeven">' . "\n";
254
+	print '<tr class="oddeven">'."\n";
255 255
 	print '<td>'.$langs->trans("MainAuthenticationOidcRedirectUrlName").'</td>'."\n";
256 256
 	print '<td>'.$langs->trans("MainAuthenticationOidcRedirectUrlDesc").'</td>'."\n";
257
-	print '<td align="right">' . "\n";
257
+	print '<td align="right">'."\n";
258 258
 	print '<input class="minwidth400" value="'.dol_escape_htmltag(openid_connect_get_redirect_url()).'" disabled></td></tr>';
259
-	print '</td></tr>' . "\n";
259
+	print '</td></tr>'."\n";
260 260
 
261 261
 	// LOGOUT_URL
262
-	print '<tr class="oddeven">' . "\n";
262
+	print '<tr class="oddeven">'."\n";
263 263
 	print '<td>'.$langs->trans("MainAuthenticationOidcLogoutRedirectUrlName").'</td>'."\n";
264 264
 	print '<td>'.$langs->trans("MainAuthenticationOidcLogoutRedirectUrlDesc").'</td>'."\n";
265
-	print '<td align="right">' . "\n";
266
-	print '<input class="minwidth400" value="'.dol_escape_htmltag(getDolGlobalString('MAIN_LOGOUT_GOTO_URL', DOL_MAIN_URL_ROOT . "/index.php")).'" disabled></td></tr>';
267
-	print '</td></tr>' . "\n";
265
+	print '<td align="right">'."\n";
266
+	print '<input class="minwidth400" value="'.dol_escape_htmltag(getDolGlobalString('MAIN_LOGOUT_GOTO_URL', DOL_MAIN_URL_ROOT."/index.php")).'" disabled></td></tr>';
267
+	print '</td></tr>'."\n";
268 268
 
269 269
 	print '</table>'."\n";
270 270
 	print '</div>';
Please login to merge, or discard this patch.
htdocs/user/logout.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	unset($_SESSION["dol_login"]);
52 52
 	unset($_SESSION['dol_entity']);
53 53
 	unset($_SESSION['urlfrom']);
54
-	die("Applicative disconnection should be useless when connection was made in mode ".$_SESSION["dol_authmode"]);	// TODO Really ? It at least delete the session file ?!
54
+	die("Applicative disconnection should be useless when connection was made in mode ".$_SESSION["dol_authmode"]); // TODO Really ? It at least delete the session file ?!
55 55
 }
56 56
 
57 57
 /**
@@ -111,9 +111,9 @@  discard block
 block discarded – undo
111 111
 if (getDolGlobalInt('MAIN_AUTHENTICATION_OIDC_ON', 0) > 0 && !empty($_SESSION['OPENID_CONNECT']) && getDolGlobalString("MAIN_AUTHENTICATION_OIDC_LOGOUT_URL")) {
112 112
 	// We need the full URL
113 113
 	if (strpos($url, '/') === 0) {
114
-		$url = DOL_MAIN_URL_ROOT . $url;
114
+		$url = DOL_MAIN_URL_ROOT.$url;
115 115
 	}
116
-	$url = getDolGlobalString('MAIN_AUTHENTICATION_OIDC_LOGOUT_URL') . '?client_id=' . getDolGlobalString('MAIN_AUTHENTICATION_OIDC_CLIENT_ID') . '&returnTo=' . urlencode($url);
116
+	$url = getDolGlobalString('MAIN_AUTHENTICATION_OIDC_LOGOUT_URL').'?client_id='.getDolGlobalString('MAIN_AUTHENTICATION_OIDC_CLIENT_ID').'&returnTo='.urlencode($url);
117 117
 }
118 118
 
119 119
 // Destroy session
Please login to merge, or discard this patch.
htdocs/don/list.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
57 57
 $optioncss  = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
58 58
 $mode       = GETPOST('mode', 'aZ'); // The display mode ('list', 'kanban', 'hierarchy', 'calendar', 'gantt', ...)
59
-$groupby = GETPOST('groupby', 'aZ09');	// Example: $groupby = 'p.fk_opp_status' or $groupby = 'p.fk_statut'
59
+$groupby = GETPOST('groupby', 'aZ09'); // Example: $groupby = 'p.fk_opp_status' or $groupby = 'p.fk_statut'
60 60
 
61 61
 $type = GETPOST('type', 'aZ');
62 62
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 $object = new Don($db);
95 95
 $extrafields = new ExtraFields($db);
96 96
 $diroutputmassaction = $conf->don->dir_output.'/temp/massgeneration/'.$user->id;
97
-$hookmanager->initHooks(array($contextpage)); 	// Note that conf->hooks_modules contains array of activated contexes
97
+$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes
98 98
 
99 99
 // Fetch optionals attributes and labels
100 100
 $extrafields->fetch_name_optionals_label($object->table_element);
@@ -249,8 +249,8 @@  discard block
 block discarded – undo
249 249
 
250 250
 $sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as d LEFT JOIN ".MAIN_DB_PREFIX."projet AS p";
251 251
 $sql .= " ON p.rowid = d.fk_projet";
252
-$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe AS s ON s.rowid = d.fk_soc";
253
-$sql .= " WHERE d.entity IN (". getEntity('donation') . ")";
252
+$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe AS s ON s.rowid = d.fk_soc";
253
+$sql .= " WHERE d.entity IN (".getEntity('donation').")";
254 254
 
255 255
 if ($search_status != '' && $search_status != '-4') {
256 256
 	$sql .= " AND d.fk_statut IN (".$db->sanitize($search_status).")";
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 // Output page
328 328
 // --------------------------------------------------------------------
329 329
 
330
-llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-donation page-list bodyforlist');	// Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
330
+llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-donation page-list bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
331 331
 
332 332
 // Example : Adding jquery code
333 333
 // print '<script type="text/javascript">
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
 }
484 484
 
485 485
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
486
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, $conf->main_checkbox_left_column ? 'left' : '');  // This also change content of $arrayfields with user setup
486
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, $conf->main_checkbox_left_column ? 'left' : ''); // This also change content of $arrayfields with user setup
487 487
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
488 488
 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
489 489
 
@@ -625,7 +625,7 @@  discard block
 block discarded – undo
625 625
 		if (!empty($obj->socid) && $company->id > 0) {
626 626
 			$donationstatic->societe = $company->getNomUrl(1);
627 627
 		} else {
628
-			$donationstatic->societe = (string) $obj->societe;  // Value from sql query
628
+			$donationstatic->societe = (string) $obj->societe; // Value from sql query
629 629
 		}
630 630
 
631 631
 		$object = $donationstatic;
Please login to merge, or discard this patch.
htdocs/compta/tva/quadri_detail.php 1 patch
Spacing   +95 added lines, -95 removed lines patch added patch discarded remove patch
@@ -39,18 +39,18 @@  discard block
 block discarded – undo
39 39
  * @var Translate $langs
40 40
  * @var User $user
41 41
  */
42
-require_once DOL_DOCUMENT_ROOT . '/core/lib/report.lib.php';
43
-require_once DOL_DOCUMENT_ROOT . '/core/lib/tax.lib.php';
44
-require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
45
-require_once DOL_DOCUMENT_ROOT . '/compta/tva/class/tva.class.php';
46
-require_once DOL_DOCUMENT_ROOT . '/compta/localtax/class/localtax.class.php';
47
-require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
48
-require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
49
-require_once DOL_DOCUMENT_ROOT . '/compta/paiement/class/paiement.class.php';
50
-require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
51
-require_once DOL_DOCUMENT_ROOT . '/fourn/class/paiementfourn.class.php';
52
-require_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php';
53
-require_once DOL_DOCUMENT_ROOT . '/expensereport/class/paymentexpensereport.class.php';
42
+require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php';
43
+require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php';
44
+require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
45
+require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
46
+require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php';
47
+require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
48
+require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
49
+require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
50
+require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
51
+require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
52
+require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
53
+require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.php';
54 54
 
55 55
 // Load translation files required by the page
56 56
 $langs->loadLangs(array("other", "compta", "banks", "bills", "companies", "product", "trips", "admin"));
@@ -127,11 +127,11 @@  discard block
 block discarded – undo
127 127
 $listofparams = array('date_startmonth', 'date_startyear', 'date_startday', 'date_endmonth', 'date_endyear', 'date_endday');
128 128
 foreach ($listofparams as $param) {
129 129
 	if (GETPOST($param) != '') {
130
-		$morequerystring .= ($morequerystring ? '&' : '') . $param . '=' . GETPOST($param);
130
+		$morequerystring .= ($morequerystring ? '&' : '').$param.'='.GETPOST($param);
131 131
 	}
132 132
 }
133 133
 
134
-$title = $langs->trans("VATReport") . " " . dol_print_date($date_start, '', 'tzserver') . " -> " . dol_print_date($date_end, '', 'tzserver');
134
+$title = $langs->trans("VATReport")." ".dol_print_date($date_start, '', 'tzserver')." -> ".dol_print_date($date_end, '', 'tzserver');
135 135
 llxHeader('', $title, '', '', 0, 0, '', '', $morequerystring);
136 136
 
137 137
 
@@ -139,8 +139,8 @@  discard block
 block discarded – undo
139 139
 
140 140
 //$fsearch.='<br>';
141 141
 $fsearch = '<!-- hidden fields for form -->';
142
-$fsearch .= '<input type="hidden" name="token" value="' . newToken() . '">';
143
-$fsearch .= '<input type="hidden" name="modetax" value="' . $modetax . '">';
142
+$fsearch .= '<input type="hidden" name="token" value="'.newToken().'">';
143
+$fsearch .= '<input type="hidden" name="modetax" value="'.$modetax.'">';
144 144
 //$fsearch.='  '.$langs->trans("SalesTurnoverMinimum").': ';
145 145
 //$fsearch.='  <input type="text" name="min" value="'.$min.'">';
146 146
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 if ($modetax == 2) {
158 158
 	$calcmode = $langs->trans('OptionPaymentForProductAndServices');
159 159
 }
160
-$calcmode .= ' <span class="opacitymedium">(' . $langs->trans("TaxModuleSetupToModifyRules", DOL_URL_ROOT . '/admin/taxes.php') . ')</span>';
160
+$calcmode .= ' <span class="opacitymedium">('.$langs->trans("TaxModuleSetupToModifyRules", DOL_URL_ROOT.'/admin/taxes.php').')</span>';
161 161
 // Set period
162 162
 $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzserver');
163 163
 $period .= ' - ';
@@ -173,31 +173,31 @@  discard block
 block discarded – undo
173 173
 	$description .= $langs->trans("RulesVATInProducts");
174 174
 }
175 175
 if (getDolGlobalString('TAX_MODE_SELL_SERVICE') == 'invoice') {
176
-	$description .= '<br>' . $langs->trans("RulesVATDueServices");
176
+	$description .= '<br>'.$langs->trans("RulesVATDueServices");
177 177
 }
178 178
 if (getDolGlobalString('TAX_MODE_SELL_SERVICE') == 'payment') {
179
-	$description .= '<br>' . $langs->trans("RulesVATInServices");
179
+	$description .= '<br>'.$langs->trans("RulesVATInServices");
180 180
 }
181 181
 if (getDolGlobalString('FACTURE_DEPOSITS_ARE_JUST_PAYMENTS')) {
182 182
 	if (getDolGlobalString('TAX_MODE_SELL_SERVICE') == 'invoice' && getDolGlobalString('TAX_MODE_SELL_PRODUCT') == 'invoice') {
183
-		$description .= '<br>' . $langs->trans("DepositsAreNotIncluded");
183
+		$description .= '<br>'.$langs->trans("DepositsAreNotIncluded");
184 184
 	} elseif (getDolGlobalString('TAX_MODE_SELL_SERVICE') == 'invoice') { // calculate on sale invoice for service only
185
-		$description .= '<br>' . $langs->trans("DepositsAreNotIncluded").' (for services)';
185
+		$description .= '<br>'.$langs->trans("DepositsAreNotIncluded").' (for services)';
186 186
 	} elseif (getDolGlobalString('TAX_MODE_SELL_PRODUCT') == 'invoice') { // calculate on sale invoice for service only
187
-		$description .= '<br>' . $langs->trans("DepositsAreNotIncluded").' (for products)';
187
+		$description .= '<br>'.$langs->trans("DepositsAreNotIncluded").' (for products)';
188 188
 	}
189 189
 }
190 190
 if (getDolGlobalString('FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS')) {
191 191
 	if (getDolGlobalString('TAX_MODE_BUY_SERVICE') == 'invoice' && getDolGlobalString('TAX_MODE_BUY_PRODUCT') == 'invoice') {
192
-		$description .= '<br>' . $langs->trans("SupplierDepositsAreNotIncluded");
192
+		$description .= '<br>'.$langs->trans("SupplierDepositsAreNotIncluded");
193 193
 	} elseif (getDolGlobalString('TAX_MODE_BUY_SERVICE') == 'invoice') { // calculate on supplier invoice for service only
194
-		$description .= '<br>' . $langs->trans("SupplierDepositsAreNotIncluded").' (for services)';
194
+		$description .= '<br>'.$langs->trans("SupplierDepositsAreNotIncluded").' (for services)';
195 195
 	} elseif (getDolGlobalString('TAX_MODE_BUY_PRODUCT') == 'invoice') { // calculate on supplier invoice for product only
196
-		$description .= '<br>' . $langs->trans("SupplierDepositsAreNotIncluded").' (for products)';
196
+		$description .= '<br>'.$langs->trans("SupplierDepositsAreNotIncluded").' (for products)';
197 197
 	}
198 198
 }
199 199
 if (isModEnabled('accounting')) {
200
-	$description .= '<br>' . $langs->trans("ThisIsAnEstimatedValue");
200
+	$description .= '<br>'.$langs->trans("ThisIsAnEstimatedValue");
201 201
 }
202 202
 
203 203
 // Customers invoices
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 $vatcust = $langs->trans("VATReceived");
208 208
 $namecust = $langs->trans("Name");
209 209
 if ($mysoc->tva_assuj) {
210
-	$vatcust .= ' (' . $langs->trans("VATToPay") . ')';
210
+	$vatcust .= ' ('.$langs->trans("VATToPay").')';
211 211
 }
212 212
 
213 213
 // Suppliers invoices
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 $vatsup = $langs->trans("VATPaid");
218 218
 $namesup = $namecust;
219 219
 if ($mysoc->tva_assuj) {
220
-	$vatsup .= ' (' . $langs->trans("ToGetBack") . ')';
220
+	$vatsup .= ' ('.$langs->trans("ToGetBack").')';
221 221
 }
222 222
 
223 223
 $optioncss = GETPOST('optioncss', 'alpha');
@@ -253,11 +253,11 @@  discard block
 block discarded – undo
253 253
 if (!is_array($x_coll) || !is_array($x_paye)) {
254 254
 	$langs->load("errors");
255 255
 	if ($x_coll == -1) {
256
-		print '<tr><td colspan="' . $columns . '">' . $langs->trans("ErrorNoAccountancyModuleLoaded") . '</td></tr>';
256
+		print '<tr><td colspan="'.$columns.'">'.$langs->trans("ErrorNoAccountancyModuleLoaded").'</td></tr>';
257 257
 	} elseif ($x_coll == -2) {
258
-		print '<tr><td colspan="' . $columns . '">' . $langs->trans("FeatureNotYetAvailable") . '</td></tr>';
258
+		print '<tr><td colspan="'.$columns.'">'.$langs->trans("FeatureNotYetAvailable").'</td></tr>';
259 259
 	} else {
260
-		print '<tr><td colspan="' . $columns . '">' . $langs->trans("Error") . '</td></tr>';
260
+		print '<tr><td colspan="'.$columns.'">'.$langs->trans("Error").'</td></tr>';
261 261
 	}
262 262
 } else {
263 263
 	$x_both = array();
@@ -411,21 +411,21 @@  discard block
 block discarded – undo
411 411
 
412 412
 	// Customers invoices
413 413
 	print '<tr class="liste_titre">';
414
-	print '<td class="left">' . $elementcust . '</td>';
415
-	print '<td class="left">' . $langs->trans("DateInvoice") . '</td>';
414
+	print '<td class="left">'.$elementcust.'</td>';
415
+	print '<td class="left">'.$langs->trans("DateInvoice").'</td>';
416 416
 	if (getDolGlobalString('TAX_MODE_SELL_PRODUCT') == 'payment' || getDolGlobalString('TAX_MODE_SELL_SERVICE') == 'payment') {
417
-		print '<td class="left">' . $langs->trans("DatePayment") . '</td>';
417
+		print '<td class="left">'.$langs->trans("DatePayment").'</td>';
418 418
 	} else {
419 419
 		print '<td></td>';
420 420
 	}
421
-	print '<td class="left">' . $namecust . '</td>';
422
-	print '<td class="left">' . $productcust . '</td>';
421
+	print '<td class="left">'.$namecust.'</td>';
422
+	print '<td class="left">'.$productcust.'</td>';
423 423
 	if ($modetax != 1) {
424
-		print '<td class="right">' . $amountcust . '</td>';
425
-		print '<td class="right">' . $langs->trans("Payment") . ' (' . $langs->trans("PercentOfInvoice") . ')</td>';
424
+		print '<td class="right">'.$amountcust.'</td>';
425
+		print '<td class="right">'.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')</td>';
426 426
 	}
427
-	print '<td class="right">' . $langs->trans("AmountHTVATRealReceived") . '</td>';
428
-	print '<td class="right">' . $vatcust . '</td>';
427
+	print '<td class="right">'.$langs->trans("AmountHTVATRealReceived").'</td>';
428
+	print '<td class="right">'.$vatcust.'</td>';
429 429
 	print '</tr>';
430 430
 
431 431
 	$action = "tvadetail";
@@ -446,16 +446,16 @@  discard block
 block discarded – undo
446 446
 		if (is_array($x_both[$rate]['coll']['detail'])) {
447 447
 			// VAT Rate
448 448
 			print "<tr>";
449
-			print '<td class="tax_rate" colspan="' . ($span + 1) . '">';
450
-			print $langs->trans('Rate') . ' : ' . vatrate($rate) . '%';
451
-			print ' - <a class="reposition" href="' . DOL_URL_ROOT . '/compta/tva/quadri_detail.php?invoice_type=customer';
449
+			print '<td class="tax_rate" colspan="'.($span + 1).'">';
450
+			print $langs->trans('Rate').' : '.vatrate($rate).'%';
451
+			print ' - <a class="reposition" href="'.DOL_URL_ROOT.'/compta/tva/quadri_detail.php?invoice_type=customer';
452 452
 			if ($invoice_type != 'customer' || !GETPOSTISSET('vat_rate_show') || GETPOST('vat_rate_show') != $rate) {
453
-				print '&amp;vat_rate_show=' . urlencode($rate);
453
+				print '&amp;vat_rate_show='.urlencode($rate);
454 454
 			}
455
-			print '&amp;date_startyear=' . ((int) $date_start_year) . '&amp;date_startmonth=' . ((int) $date_start_month) . '&amp;date_startday=' . ((int) $date_start_day) . '&amp;date_endyear=' . ((int) $date_end_year) . '&amp;date_endmonth=' . ((int) $date_end_month) . '&amp;date_endday=' . ((int) $date_end_day) . '">';
456
-			print img_picto('', 'chevron-down', 'class="paddingrightonly"') . $langs->trans('VATReportShowByRateDetails') . '</a>';
455
+			print '&amp;date_startyear='.((int) $date_start_year).'&amp;date_startmonth='.((int) $date_start_month).'&amp;date_startday='.((int) $date_start_day).'&amp;date_endyear='.((int) $date_end_year).'&amp;date_endmonth='.((int) $date_end_month).'&amp;date_endday='.((int) $date_end_day).'">';
456
+			print img_picto('', 'chevron-down', 'class="paddingrightonly"').$langs->trans('VATReportShowByRateDetails').'</a>';
457 457
 			print '</td>';
458
-			print '</tr>' . "\n";
458
+			print '</tr>'."\n";
459 459
 
460 460
 			foreach ($x_both[$rate]['coll']['detail'] as $index => $fields) {
461 461
 				// Define type
@@ -524,14 +524,14 @@  discard block
 block discarded – undo
524 524
 					print '<tr class="oddeven">';
525 525
 
526 526
 					// Ref
527
-					print '<td class="nowrap left">' . $fields['link'] . '</td>';
527
+					print '<td class="nowrap left">'.$fields['link'].'</td>';
528 528
 
529 529
 					// Invoice date
530
-					print '<td class="left">' . dol_print_date($fields['datef'], 'day') . '</td>';
530
+					print '<td class="left">'.dol_print_date($fields['datef'], 'day').'</td>';
531 531
 
532 532
 					// Payment date
533 533
 					if (getDolGlobalString('TAX_MODE_SELL_PRODUCT') == 'payment' || getDolGlobalString('TAX_MODE_SELL_SERVICE') == 'payment') {
534
-						print '<td class="left">' . dol_print_date($fields['datep'], 'day') . '</td>';
534
+						print '<td class="left">'.dol_print_date($fields['datep'], 'day').'</td>';
535 535
 					} else {
536 536
 						print '<td></td>';
537 537
 					}
@@ -547,10 +547,10 @@  discard block
 block discarded – undo
547 547
 					if ($fields['pid']) {
548 548
 						$product_static->id = $fields['pid'];
549 549
 						$product_static->ref = $fields['pref'];
550
-						$product_static->type = $fields['dtype'];        // We force with the type of line to have type how line is registered
550
+						$product_static->type = $fields['dtype']; // We force with the type of line to have type how line is registered
551 551
 						print $product_static->getNomUrl(1);
552 552
 						if (dol_string_nohtmltag($fields['descr'])) {
553
-							print ' - ' . dol_trunc(dol_string_nohtmltag($fields['descr']), 24);
553
+							print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']), 24);
554 554
 						}
555 555
 					} else {
556 556
 						if ($type) {
@@ -567,7 +567,7 @@  discard block
 block discarded – undo
567 567
 								$fields['descr'] = $langs->transnoentitiesnoconv($reg[1]);
568 568
 							}
569 569
 						}
570
-						print $text . ' ' . dol_trunc(dol_string_nohtmltag($fields['descr']), 24);
570
+						print $text.' '.dol_trunc(dol_string_nohtmltag($fields['descr']), 24);
571 571
 
572 572
 						// Show range
573 573
 						print_date_range($fields['ddate_start'], $fields['ddate_end']);
@@ -594,7 +594,7 @@  discard block
 block discarded – undo
594 594
 						if ($fields['payment_amount'] && $fields['ftotal_ttc']) {
595 595
 							$payment_static->id = $fields['payment_id'];
596 596
 							$payment_static->ref = $fields['payment_ref'];
597
-							print $payment_static->getNomUrl(2, '', '', 0) . ' ';
597
+							print $payment_static->getNomUrl(2, '', '', 0).' ';
598 598
 						}
599 599
 						if (($type == 0 && getDolGlobalString('TAX_MODE_SELL_PRODUCT') == 'invoice')
600 600
 							|| ($type == 1 && getDolGlobalString('TAX_MODE_SELL_SERVICE') == 'invoice')) {
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
 							}
606 606
 							print price(price2num($fields['payment_amount'], 'MT'));
607 607
 							if (isset($fields['payment_amount'])) {
608
-								print ' (' . round($ratiopaymentinvoice * 100, 2) . '%)';
608
+								print ' ('.round($ratiopaymentinvoice * 100, 2).'%)';
609 609
 							}
610 610
 						}
611 611
 						print '</td>';
@@ -634,50 +634,50 @@  discard block
 block discarded – undo
634 634
 		// Total customers for this vat rate
635 635
 		print '<tr class="liste_total">';
636 636
 		print '<td colspan="4"></td>';
637
-		print '<td class="right">' . $langs->trans("Total") . ':</td>';
637
+		print '<td class="right">'.$langs->trans("Total").':</td>';
638 638
 		if ($modetax != 1) {
639 639
 			print '<td class="nowrap right">&nbsp;</td>';
640 640
 			print '<td class="right">&nbsp;</td>';
641 641
 		}
642
-		print '<td class="right"><span class="amount">' . price(price2num($subtot_coll_total_ht, 'MT')) . '</span></td>';
643
-		print '<td class="nowrap right"><span class="amount">' . price(price2num($subtot_coll_vat, 'MT')) . '</span></td>';
642
+		print '<td class="right"><span class="amount">'.price(price2num($subtot_coll_total_ht, 'MT')).'</span></td>';
643
+		print '<td class="nowrap right"><span class="amount">'.price(price2num($subtot_coll_vat, 'MT')).'</span></td>';
644 644
 		print '</tr>';
645 645
 	}
646 646
 
647 647
 	if (count($x_coll) == 0) {   // Show a total line if nothing shown
648 648
 		print '<tr class="liste_total">';
649 649
 		print '<td colspan="4"></td>';
650
-		print '<td class="right">' . $langs->trans("Total") . ':</td>';
650
+		print '<td class="right">'.$langs->trans("Total").':</td>';
651 651
 		if ($modetax != 1) {
652 652
 			print '<td class="nowrap right">&nbsp;</td>';
653 653
 			print '<td class="right">&nbsp;</td>';
654 654
 		}
655
-		print '<td class="right">' . price(price2num(0, 'MT')) . '</td>';
656
-		print '<td class="nowrap right">' . price(price2num(0, 'MT')) . '</td>';
655
+		print '<td class="right">'.price(price2num(0, 'MT')).'</td>';
656
+		print '<td class="nowrap right">'.price(price2num(0, 'MT')).'</td>';
657 657
 		print '</tr>';
658 658
 	}
659 659
 
660 660
 	// Blank line
661
-	print '<tr><td colspan="' . ($span + 2) . '">&nbsp;</td></tr>';
661
+	print '<tr><td colspan="'.($span + 2).'">&nbsp;</td></tr>';
662 662
 
663 663
 	// Print table headers for this quadri - expenses
664 664
 	print '<tr class="liste_titre liste_titre_topborder">';
665
-	print '<td class="left">' . $elementsup . '</td>';
666
-	print '<td class="left">' . $langs->trans("DateInvoice") . '</td>';
665
+	print '<td class="left">'.$elementsup.'</td>';
666
+	print '<td class="left">'.$langs->trans("DateInvoice").'</td>';
667 667
 	if (getDolGlobalString('TAX_MODE_BUY_PRODUCT') == 'payment' || getDolGlobalString('TAX_MODE_BUY_SERVICE') == 'payment') {
668
-		print '<td class="left">' . $langs->trans("DatePayment") . '</td>';
668
+		print '<td class="left">'.$langs->trans("DatePayment").'</td>';
669 669
 	} else {
670 670
 		print '<td></td>';
671 671
 	}
672
-	print '<td class="left">' . $namesup . '</td>';
673
-	print '<td class="left">' . $productsup . '</td>';
672
+	print '<td class="left">'.$namesup.'</td>';
673
+	print '<td class="left">'.$productsup.'</td>';
674 674
 	if ($modetax != 1) {
675
-		print '<td class="right">' . $amountsup . '</td>';
676
-		print '<td class="right">' . $langs->trans("Payment") . ' (' . $langs->trans("PercentOfInvoice") . ')</td>';
675
+		print '<td class="right">'.$amountsup.'</td>';
676
+		print '<td class="right">'.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')</td>';
677 677
 	}
678
-	print '<td class="right">' . $langs->trans("AmountHTVATRealPaid") . '</td>';
679
-	print '<td class="right">' . $vatsup . '</td>';
680
-	print '</tr>' . "\n";
678
+	print '<td class="right">'.$langs->trans("AmountHTVATRealPaid").'</td>';
679
+	print '<td class="right">'.$vatsup.'</td>';
680
+	print '</tr>'."\n";
681 681
 
682 682
 	foreach (array_keys($x_paye) as $rate) {
683 683
 		$subtot_paye_total_ht = 0;
@@ -685,16 +685,16 @@  discard block
 block discarded – undo
685 685
 
686 686
 		if (is_array($x_both[$rate]['paye']['detail'])) {  // @phpstan-ignore-line
687 687
 			print "<tr>";
688
-			print '<td class="tax_rate" colspan="' . ($span + 1) . '">';
689
-			print $langs->trans('Rate') . ' : ' . vatrate($rate) . '%';
690
-			print ' - <a class="reposition" href="' . DOL_URL_ROOT . '/compta/tva/quadri_detail.php?invoice_type=supplier';
688
+			print '<td class="tax_rate" colspan="'.($span + 1).'">';
689
+			print $langs->trans('Rate').' : '.vatrate($rate).'%';
690
+			print ' - <a class="reposition" href="'.DOL_URL_ROOT.'/compta/tva/quadri_detail.php?invoice_type=supplier';
691 691
 			if ($invoice_type != 'supplier' || !GETPOSTISSET('vat_rate_show') || GETPOST('vat_rate_show') != $rate) {
692
-				print '&amp;vat_rate_show=' . urlencode($rate);
692
+				print '&amp;vat_rate_show='.urlencode($rate);
693 693
 			}
694
-			print '&amp;date_startyear=' . ((int) $date_start_year) . '&amp;date_startmonth=' . ((int) $date_start_month) . '&amp;date_startday=' . ((int) $date_start_day) . '&amp;date_endyear=' . ((int) $date_end_year) . '&amp;date_endmonth=' . ((int) $date_end_month) . '&amp;date_endday=' . ((int) $date_end_day) . '">';
695
-			print img_picto('', 'chevron-down', 'class="paddingrightonly"') . $langs->trans('VATReportShowByRateDetails') . '</a>';
694
+			print '&amp;date_startyear='.((int) $date_start_year).'&amp;date_startmonth='.((int) $date_start_month).'&amp;date_startday='.((int) $date_start_day).'&amp;date_endyear='.((int) $date_end_year).'&amp;date_endmonth='.((int) $date_end_month).'&amp;date_endday='.((int) $date_end_day).'">';
695
+			print img_picto('', 'chevron-down', 'class="paddingrightonly"').$langs->trans('VATReportShowByRateDetails').'</a>';
696 696
 			print '</td>';
697
-			print '</tr>' . "\n";
697
+			print '</tr>'."\n";
698 698
 
699 699
 			foreach ($x_both[$rate]['paye']['detail'] as $index => $fields) {
700 700
 				// Define type
@@ -760,14 +760,14 @@  discard block
 block discarded – undo
760 760
 					print '<tr class="oddeven">';
761 761
 
762 762
 					// Ref
763
-					print '<td class="nowrap left">' . $fields['link'] . '</td>';
763
+					print '<td class="nowrap left">'.$fields['link'].'</td>';
764 764
 
765 765
 					// Invoice date
766
-					print '<td class="left">' . dol_print_date($fields['datef'], 'day') . '</td>';
766
+					print '<td class="left">'.dol_print_date($fields['datef'], 'day').'</td>';
767 767
 
768 768
 					// Payment date
769 769
 					if (getDolGlobalString('TAX_MODE_BUY_PRODUCT') == 'payment' || getDolGlobalString('TAX_MODE_BUY_SERVICE') == 'payment') {
770
-						print '<td class="left">' . dol_print_date($fields['datep'], 'day') . '</td>';
770
+						print '<td class="left">'.dol_print_date($fields['datep'], 'day').'</td>';
771 771
 					} else {
772 772
 						print '<td></td>';
773 773
 					}
@@ -783,10 +783,10 @@  discard block
 block discarded – undo
783 783
 					if ($fields['pid']) {
784 784
 						$product_static->id = $fields['pid'];
785 785
 						$product_static->ref = $fields['pref'];
786
-						$product_static->type = $fields['dtype'];        // We force with the type of line to have type how line is registered
786
+						$product_static->type = $fields['dtype']; // We force with the type of line to have type how line is registered
787 787
 						print $product_static->getNomUrl(1);
788 788
 						if (dol_string_nohtmltag($fields['descr'])) {
789
-							print ' - ' . dol_trunc(dol_string_nohtmltag($fields['descr']), 24);
789
+							print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']), 24);
790 790
 						}
791 791
 					} else {
792 792
 						if ($type) {
@@ -803,7 +803,7 @@  discard block
 block discarded – undo
803 803
 								$fields['descr'] = $langs->transnoentitiesnoconv($reg[1]);
804 804
 							}
805 805
 						}
806
-						print $text . ' ' . dol_trunc(dol_string_nohtmltag($fields['descr']), 24);
806
+						print $text.' '.dol_trunc(dol_string_nohtmltag($fields['descr']), 24);
807 807
 
808 808
 						// Show range
809 809
 						print_date_range($fields['ddate_start'], $fields['ddate_end']);
@@ -829,7 +829,7 @@  discard block
 block discarded – undo
829 829
 						if ($fields['payment_amount'] && $fields['ftotal_ttc']) {
830 830
 							$paymentfourn_static->id = $fields['payment_id'];
831 831
 							$paymentfourn_static->ref = $fields['payment_ref'];
832
-							print $paymentfourn_static->getNomUrl(2, '', '', 0) . ' ';
832
+							print $paymentfourn_static->getNomUrl(2, '', '', 0).' ';
833 833
 						}
834 834
 
835 835
 						if (($type == 0 && getDolGlobalString('TAX_MODE_BUY_PRODUCT') == 'invoice')
@@ -841,7 +841,7 @@  discard block
 block discarded – undo
841 841
 							}
842 842
 							print price(price2num($fields['payment_amount'], 'MT'));
843 843
 							if (isset($fields['payment_amount'])) {
844
-								print ' (' . round($ratiopaymentinvoice * 100, 2) . '%)';
844
+								print ' ('.round($ratiopaymentinvoice * 100, 2).'%)';
845 845
 							}
846 846
 						}
847 847
 						print '</td>';
@@ -871,26 +871,26 @@  discard block
 block discarded – undo
871 871
 		// Total suppliers for this vat rate
872 872
 		print '<tr class="liste_total">';
873 873
 		print '<td colspan="4"></td>';
874
-		print '<td class="right">' . $langs->trans("Total") . ':</td>';
874
+		print '<td class="right">'.$langs->trans("Total").':</td>';
875 875
 		if ($modetax != 1) {
876 876
 			print '<td class="nowrap right">&nbsp;</td>';
877 877
 			print '<td class="right">&nbsp;</td>';
878 878
 		}
879
-		print '<td class="right"><span class="amount">' . price(price2num($subtot_paye_total_ht, 'MT')) . '</span></td>';
880
-		print '<td class="nowrap right"><span class="amount">' . price(price2num($subtot_paye_vat, 'MT')) . '</span></td>';
879
+		print '<td class="right"><span class="amount">'.price(price2num($subtot_paye_total_ht, 'MT')).'</span></td>';
880
+		print '<td class="nowrap right"><span class="amount">'.price(price2num($subtot_paye_vat, 'MT')).'</span></td>';
881 881
 		print '</tr>';
882 882
 	}
883 883
 
884 884
 	if (count($x_paye) == 0) {  // Show a total line if nothing shown
885 885
 		print '<tr class="liste_total">';
886 886
 		print '<td colspan="4"></td>';
887
-		print '<td class="right">' . $langs->trans("Total") . ':</td>';
887
+		print '<td class="right">'.$langs->trans("Total").':</td>';
888 888
 		if ($modetax != 1) {
889 889
 			print '<td class="nowrap right">&nbsp;</td>';
890 890
 			print '<td class="right">&nbsp;</td>';
891 891
 		}
892
-		print '<td class="right"><span class="amount">' . price(price2num(0, 'MT')) . '</span></td>';
893
-		print '<td class="nowrap right"><span class="amount">' . price(price2num(0, 'MT')) . '</span></td>';
892
+		print '<td class="right"><span class="amount">'.price(price2num(0, 'MT')).'</span></td>';
893
+		print '<td class="nowrap right"><span class="amount">'.price(price2num(0, 'MT')).'</span></td>';
894 894
 		print '</tr>';
895 895
 	}
896 896
 
@@ -902,8 +902,8 @@  discard block
 block discarded – undo
902 902
 	print '<table class="noborder centpercent">';
903 903
 	$diff = $x_coll_sum - $x_paye_sum;
904 904
 	print '<tr class="liste_total">';
905
-	print '<td class="liste_total" colspan="' . $span . '">' . $langs->trans("TotalToPay") . '</td>';
906
-	print '<td class="liste_total nowrap right"><b>' . price(price2num($diff, 'MT')) . "</b></td>\n";
905
+	print '<td class="liste_total" colspan="'.$span.'">'.$langs->trans("TotalToPay").'</td>';
906
+	print '<td class="liste_total nowrap right"><b>'.price(price2num($diff, 'MT'))."</b></td>\n";
907 907
 	print "</tr>\n";
908 908
 
909 909
 	$i++;
Please login to merge, or discard this patch.
htdocs/product/class/productbatch.class.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -84,13 +84,13 @@  discard block
 block discarded – undo
84 84
 	 * @var int|''|null
85 85
 	 * @deprecated
86 86
 	 */
87
-	public $sellby = '';	// dlc
87
+	public $sellby = ''; // dlc
88 88
 
89 89
 	/**
90 90
 	 * @var int|''|null
91 91
 	 * @deprecated
92 92
 	 */
93
-	public $eatby = '';		// dmd/dluo
93
+	public $eatby = ''; // dmd/dluo
94 94
 
95 95
 
96 96
 	/**
@@ -124,15 +124,15 @@  discard block
 block discarded – undo
124 124
 		// Insert request
125 125
 		$sql = "INSERT INTO ".$this->db->prefix()."product_batch (";
126 126
 		$sql .= "fk_product_stock,";
127
-		$sql .= "sellby,";				// no more used
128
-		$sql .= "eatby,";				// no more used
127
+		$sql .= "sellby,"; // no more used
128
+		$sql .= "eatby,"; // no more used
129 129
 		$sql .= "batch,";
130 130
 		$sql .= "qty,";
131 131
 		$sql .= "import_key";
132 132
 		$sql .= ") VALUES (";
133 133
 		$sql .= " ".(!isset($this->fk_product_stock) ? 'NULL' : $this->fk_product_stock).",";
134
-		$sql .= " ".(!isset($this->sellby) || dol_strlen($this->sellby) == 0 ? 'NULL' : "'".$this->db->idate($this->sellby)."'").",";		// no more used
135
-		$sql .= " ".(!isset($this->eatby) || dol_strlen($this->eatby) == 0 ? 'NULL' : "'".$this->db->idate($this->eatby)."'").",";			// no more used
134
+		$sql .= " ".(!isset($this->sellby) || dol_strlen($this->sellby) == 0 ? 'NULL' : "'".$this->db->idate($this->sellby)."'").","; // no more used
135
+		$sql .= " ".(!isset($this->eatby) || dol_strlen($this->eatby) == 0 ? 'NULL' : "'".$this->db->idate($this->eatby)."'").","; // no more used
136 136
 		$sql .= " ".(!isset($this->batch) ? 'NULL' : "'".$this->db->escape($this->batch)."'").",";
137 137
 		$sql .= " ".(!isset($this->qty) ? 'NULL' : $this->qty).",";
138 138
 		$sql .= " ".(!isset($this->import_key) ? 'NULL' : "'".$this->db->escape($this->import_key)."'");
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 		$sql .= " pl.eatby,";
184 184
 		$sql .= " pl.sellby";
185 185
 		$sql .= " FROM ".$this->db->prefix()."product_batch as t";
186
-		$sql .= " INNER JOIN ".$this->db->prefix()."product_stock w on t.fk_product_stock = w.rowid";	// llx_product_stock is a parent table so this link does NOT generate duplicate record
186
+		$sql .= " INNER JOIN ".$this->db->prefix()."product_stock w on t.fk_product_stock = w.rowid"; // llx_product_stock is a parent table so this link does NOT generate duplicate record
187 187
 		$sql .= " LEFT JOIN ".$this->db->prefix()."product_lot as pl on pl.fk_product = w.fk_product and pl.batch = t.batch";
188 188
 		$sql .= " WHERE t.rowid = ".((int) $id);
189 189
 
@@ -459,8 +459,8 @@  discard block
 block discarded – undo
459 459
 
460 460
 				$this->tms = $this->db->jdate($obj->tms);
461 461
 				$this->fk_product_stock = $obj->fk_product_stock;
462
-				$this->sellby = $this->db->jdate($obj->sellby);	// deprecated. do not use this data.
463
-				$this->eatby = $this->db->jdate($obj->eatby);	// deprecated. do not use this data.
462
+				$this->sellby = $this->db->jdate($obj->sellby); // deprecated. do not use this data.
463
+				$this->eatby = $this->db->jdate($obj->eatby); // deprecated. do not use this data.
464 464
 				$this->batch = $obj->batch;
465 465
 				$this->qty = $obj->qty;
466 466
 				$this->import_key = $obj->import_key;
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
 
559 559
 				if ($fk_product > 0) {
560 560
 					// Some properties of the lot
561
-					$tmp->lotid = $obj->lotid;	// ID in table of the details of properties of each lots
561
+					$tmp->lotid = $obj->lotid; // ID in table of the details of properties of each lots
562 562
 					$tmp->sellby = $dbs->jdate($obj->sellby ? $obj->sellby : $obj->oldsellby);
563 563
 					$tmp->eatby = $dbs->jdate($obj->eatby ? $obj->eatby : $obj->oldeatby);
564 564
 				}
Please login to merge, or discard this patch.
htdocs/product/stock/class/entrepot.class.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -577,7 +577,7 @@  discard block
 block discarded – undo
577 577
 				$this->fax            = $obj->fax;
578 578
 
579 579
 				$this->date_creation  = $obj->date_creation;
580
-				$this->barcode		  = $obj->barcode;
580
+				$this->barcode = $obj->barcode;
581 581
 				$this->fk_departement = $obj->fk_departement;
582 582
 				$this->barcode_type   = $obj->fk_barcode_type;
583 583
 				$this->warehouse_id   = $obj->rowid;
@@ -734,7 +734,7 @@  discard block
 block discarded – undo
734 734
 		}
735 735
 		$sql .= " WHERE ps.fk_entrepot = ".((int) $this->id);
736 736
 		if ($separatedPMP) {
737
-			$sql .= " AND pa.fk_product = p.rowid AND pa.entity = ". (int) $conf->entity;
737
+			$sql .= " AND pa.fk_product = p.rowid AND pa.entity = ".(int) $conf->entity;
738 738
 		}
739 739
 		$sql .= " AND ps.fk_product = p.rowid";
740 740
 		//print $sql;
@@ -818,9 +818,9 @@  discard block
 block discarded – undo
818 818
 		}
819 819
 		// show categories for this record only in ajax to not overload lists
820 820
 		if (!$nofetch && isModEnabled('category')) {
821
-			require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
821
+			require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
822 822
 			$form = new Form($this->db);
823
-			$datas['categories_warehouse'] = '<br>' . $form->showCategories($this->id, Categorie::TYPE_WAREHOUSE, 1, 1);
823
+			$datas['categories_warehouse'] = '<br>'.$form->showCategories($this->id, Categorie::TYPE_WAREHOUSE, 1, 1);
824 824
 		}
825 825
 
826 826
 		return $datas;
@@ -1079,7 +1079,7 @@  discard block
 block discarded – undo
1079 1079
 		$return .= img_picto('', $this->picto);
1080 1080
 		$return .= '</div>';
1081 1081
 		$return .= '<div class="info-box-content" >';
1082
-		$return .= '<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">' . $this->getNomUrl() . '</span>';
1082
+		$return .= '<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.$this->getNomUrl().'</span>';
1083 1083
 		if ($selected >= 0) {
1084 1084
 			$return .= '<input id="cb'.$this->id.'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>';
1085 1085
 		}
Please login to merge, or discard this patch.