Completed
Branch develop (c23a95)
by
unknown
18:46
created
htdocs/adherents/partnership.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 require_once DOL_DOCUMENT_ROOT.'/partnership/lib/partnership.lib.php';
34 34
 
35 35
 // Load translation files required by the page
36
-$langs->loadLangs(array("companies","members","partnership", "other"));
36
+$langs->loadLangs(array("companies", "members", "partnership", "other"));
37 37
 
38 38
 // Get parameters
39 39
 $id = GETPOST('rowid', 'int') ? GETPOST('rowid', 'int') : GETPOST('id', 'int');
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
 }
53 53
 
54 54
 // Initialize technical objects
55
-$object 		= new Partnership($db);
56
-$extrafields 	= new ExtraFields($db);
57
-$adht 			= new AdherentType($db);
55
+$object = new Partnership($db);
56
+$extrafields = new ExtraFields($db);
57
+$adht = new AdherentType($db);
58 58
 $diroutputmassaction = $conf->partnership->dir_output.'/temp/massgeneration/'.$user->id;
59 59
 $hookmanager->initHooks(array('partnershipthirdparty', 'globalcard')); // Note that conf->hooks_modules contains array
60 60
 
Please login to merge, or discard this patch.
htdocs/asset/depreciation.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
 
25 25
 // Load Dolibarr environment
26 26
 require '../main.inc.php';
27
-require_once DOL_DOCUMENT_ROOT . '/core/lib/asset.lib.php';
28
-require_once DOL_DOCUMENT_ROOT . '/asset/class/asset.class.php';
29
-require_once DOL_DOCUMENT_ROOT . '/asset/class/assetdepreciationoptions.class.php';
27
+require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php';
28
+require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php';
29
+require_once DOL_DOCUMENT_ROOT.'/asset/class/assetdepreciationoptions.class.php';
30 30
 
31 31
 // Load translation files required by the page
32 32
 $langs->loadLangs(array("assets", "companies"));
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 $extrafields->fetch_name_optionals_label($object->table_element);
49 49
 
50 50
 // Load object
51
-include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once  // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
51
+include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once  // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
52 52
 if ($id > 0 || !empty($ref)) {
53
-	$upload_dir = $conf->asset->multidir_output[$object->entity] . "/" . $object->id;
53
+	$upload_dir = $conf->asset->multidir_output[$object->entity]."/".$object->id;
54 54
 }
55 55
 
56 56
 // Security check (enable the most restrictive one)
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
 	// Object card
100 100
 	// ------------------------------------------------------------
101
-	$linkback = '<a href="' . DOL_URL_ROOT . '/asset/list.php?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
101
+	$linkback = '<a href="'.DOL_URL_ROOT.'/asset/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
102 102
 
103 103
 	$morehtmlref = '<div class="refidno">';
104 104
 	$morehtmlref .= '</div>';
@@ -134,9 +134,9 @@  discard block
 block discarded – undo
134 134
 				print '<div class="fichecenter">';
135 135
 				print '<div class="fichehalfleft">';
136 136
 				print '<div class="underbanner clearboth"></div>';
137
-				print '<table class="border centpercent tableforfield">' . "\n";
138
-				print '<tr><td class="titlefield">' . $langs->trans('AssetBaseDepreciationHT') . '</td><td>' . price($depreciation_info['base_depreciation_ht']) . '</td></tr>';
139
-				print '<tr><td class="titlefield">' . $langs->trans('AssetDepreciationBeginDate') . '</td><td>' . dol_print_date($object->date_start > $object->date_acquisition ? $object->date_start : $object->date_acquisition, 'day') . '</td></tr>';
137
+				print '<table class="border centpercent tableforfield">'."\n";
138
+				print '<tr><td class="titlefield">'.$langs->trans('AssetBaseDepreciationHT').'</td><td>'.price($depreciation_info['base_depreciation_ht']).'</td></tr>';
139
+				print '<tr><td class="titlefield">'.$langs->trans('AssetDepreciationBeginDate').'</td><td>'.dol_print_date($object->date_start > $object->date_acquisition ? $object->date_start : $object->date_acquisition, 'day').'</td></tr>';
140 140
 				print '</table>';
141 141
 
142 142
 				// We close div and reopen for second column
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
 
146 146
 				print '<div class="underbanner clearboth"></div>';
147 147
 				print '<table class="border centpercent tableforfield">';
148
-				print '<tr><td class="titlefield">' . $langs->trans('AssetDepreciationDuration') . '</td><td>' . $depreciation_info['duration'] . ' ( ' . $depreciation_info['duration_type'] . ' )</td></tr>';
149
-				print '<tr><td class="titlefield">' . $langs->trans('AssetDepreciationRate') . '</td><td>' . $depreciation_info['rate'] . '</td></tr>';
148
+				print '<tr><td class="titlefield">'.$langs->trans('AssetDepreciationDuration').'</td><td>'.$depreciation_info['duration'].' ( '.$depreciation_info['duration_type'].' )</td></tr>';
149
+				print '<tr><td class="titlefield">'.$langs->trans('AssetDepreciationRate').'</td><td>'.$depreciation_info['rate'].'</td></tr>';
150 150
 				print '</table>';
151 151
 				print '</div>';
152 152
 				print '</div>';
@@ -160,21 +160,21 @@  discard block
 block discarded – undo
160 160
 
161 161
 				print '<tr class="liste_titre">';
162 162
 				print '<td class="width20"></td>';
163
-				print '<td>' . $langs->trans("Ref") . '</td>';
164
-				print '<td class="center">' . $langs->trans("AssetDepreciationDate") . '</td>';
165
-				print '<td class="right">' . $langs->trans("AssetDepreciationHT") . '</td>';
166
-				print '<td class="right">' . $langs->trans("AssetCumulativeDepreciationHT") . '</td>';
167
-				print '<td class="right">' . $langs->trans("AssetResidualHT") . '</td>';
163
+				print '<td>'.$langs->trans("Ref").'</td>';
164
+				print '<td class="center">'.$langs->trans("AssetDepreciationDate").'</td>';
165
+				print '<td class="right">'.$langs->trans("AssetDepreciationHT").'</td>';
166
+				print '<td class="right">'.$langs->trans("AssetCumulativeDepreciationHT").'</td>';
167
+				print '<td class="right">'.$langs->trans("AssetResidualHT").'</td>';
168 168
 				print '</tr>';
169 169
 
170 170
 				if (empty($lines)) {
171
-					print '<tr><td class="impair center" colspan="6"><span class="opacitymedium">' . $langs->trans("None") . '</span></td></tr>';
171
+					print '<tr><td class="impair center" colspan="6"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
172 172
 				} else {
173 173
 					foreach ($lines as $line) {
174 174
 						print '<tr class="oddeven">';
175
-						print '<td>' . ($line['bookkeeping'] ? $bookkeeping_icon : ($line['depreciation_date'] > $now ? $future_icon : '')) . '</td>';
176
-						print '<td >' . (empty($line['ref']) ? $langs->trans('AssetDepreciationReversal') : $line['ref']) . '</td>';
177
-						print '<td class="center">' . dol_print_date($line['depreciation_date'], 'day') . '</td>';
175
+						print '<td>'.($line['bookkeeping'] ? $bookkeeping_icon : ($line['depreciation_date'] > $now ? $future_icon : '')).'</td>';
176
+						print '<td >'.(empty($line['ref']) ? $langs->trans('AssetDepreciationReversal') : $line['ref']).'</td>';
177
+						print '<td class="center">'.dol_print_date($line['depreciation_date'], 'day').'</td>';
178 178
 						print '<td class="right">';
179 179
 						print price($line['depreciation_ht']);
180 180
 						print '</td>';
Please login to merge, or discard this patch.
htdocs/asset/tpl/accountancy_codes_view.tpl.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 }
51 51
 
52 52
 if (empty($reshook)) {
53
-	if (isModEnabled('accounting')) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
53
+	if (isModEnabled('accounting')) require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
54 54
 
55 55
 	foreach ($assetaccountancycodes->accountancy_codes_fields as $mode_key => $mode_info) {
56 56
 		//if (empty($object->enabled_modes[$mode_key])) continue;
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 		print '<div class="underbanner clearboth"></div>';
61 61
 		print '<table class="border centpercent tableforfield">';
62 62
 		foreach ($mode_info['fields'] as $field_key => $field_info) {
63
-			print '<tr><td class="titlefieldcreate">' . $langs->trans($field_info['label']) . '</td><td colspan="3">';
63
+			print '<tr><td class="titlefieldcreate">'.$langs->trans($field_info['label']).'</td><td colspan="3">';
64 64
 			if (!empty($assetaccountancycodes->accountancy_codes[$mode_key][$field_key])) {
65 65
 				$accountancy_code = $assetaccountancycodes->accountancy_codes[$mode_key][$field_key];
66 66
 				if (isModEnabled('accounting')) {
Please login to merge, or discard this patch.
htdocs/asset/tpl/accountancy_codes_edit.tpl.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 }
36 36
 
37 37
 if (isModEnabled('accounting') && !is_object($formaccounting)) {
38
-	require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
38
+	require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
39 39
 	$formaccounting = new FormAccounting($db);
40 40
 }
41 41
 
@@ -63,13 +63,13 @@  discard block
 block discarded – undo
63 63
 		print '<div class="underbanner clearboth"></div>';
64 64
 		print '<table class="border centpercent tableforfield">';
65 65
 		foreach ($mode_info['fields'] as $field_key => $field_info) {
66
-			$html_name = $mode_key . '_' . $field_key;
67
-			print '<tr><td class="titlefieldcreate">' . $langs->trans($field_info['label']) . '</td><td colspan="3">';
66
+			$html_name = $mode_key.'_'.$field_key;
67
+			print '<tr><td class="titlefieldcreate">'.$langs->trans($field_info['label']).'</td><td colspan="3">';
68 68
 			$accountancy_code = GETPOSTISSET($html_name) ? GETPOST($html_name, 'aZ09') : (!empty($assetaccountancycodes->accountancy_codes[$mode_key][$field_key]) ? $assetaccountancycodes->accountancy_codes[$mode_key][$field_key] : '');
69 69
 			if (isModEnabled('accounting')) {
70 70
 				print $formaccounting->select_account($accountancy_code, $html_name, 1, null, 1, 1, 'minwidth150 maxwidth300', 1);
71 71
 			} else {
72
-				print '<input name="' . $html_name . '" class="maxwidth200" value="' . dol_escape_htmltag($accountancy_code) . '">';
72
+				print '<input name="'.$html_name.'" class="maxwidth200" value="'.dol_escape_htmltag($accountancy_code).'">';
73 73
 			}
74 74
 			print '</td></tr>';
75 75
 		}
Please login to merge, or discard this patch.
htdocs/asset/card.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 	}
182 182
 	if (GETPOSTISSET('supplier_invoice_id')) {
183 183
 		$object->fields['supplier_invoice_id'] = array('type' => 'integer:FactureFournisseur:fourn/class/fournisseur.facture.class.php:1:entity IN (__SHARED_ENTITIES__)', 'label' => 'SupplierInvoice', 'enabled' => '1', 'noteditable' => '1', 'position' => 280, 'notnull' => 0, 'visible' => 1, 'index' => 1, 'validate' => '1',);
184
-		print '<input type="hidden" name="supplier_invoice_id" value="' . GETPOST('supplier_invoice_id', 'int') . '">';
184
+		print '<input type="hidden" name="supplier_invoice_id" value="'.GETPOST('supplier_invoice_id', 'int').'">';
185 185
 	}
186 186
 
187 187
 	print dol_get_fiche_head(array(), '');
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 			array('type' => 'checkbox', 'name' => 'disposal_depreciated', 'label' => $langs->trans("AssetDisposalDepreciated"), 'value' => $disposal_depreciated),
285 285
 			array('type' => 'checkbox', 'name' => 'disposal_subject_to_vat', 'label' => $langs->trans("AssetDisposalSubjectToVat"), 'value' => $disposal_subject_to_vat),
286 286
 		);
287
-		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('AssetDisposal'), $langs->trans('AssetConfirmDisposalAsk', $object->ref . ' - ' . $object->label), 'confirm_disposal', $formquestion, 'yes', 1);
287
+		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('AssetDisposal'), $langs->trans('AssetConfirmDisposalAsk', $object->ref.' - '.$object->label), 'confirm_disposal', $formquestion, 'yes', 1);
288 288
 	} elseif ($action == 'reopen') {
289 289
 		// Re-open
290 290
 		// Create an array for form
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
 	print '<table class="border centpercent tableforfield">'."\n";
329 329
 
330 330
 	// Common attributes
331
-	$keyforbreak='date_acquisition';	// We change column just before this field
331
+	$keyforbreak = 'date_acquisition'; // We change column just before this field
332 332
 	//unset($object->fields['fk_project']);				// Hide field already shown in banner
333 333
 	//unset($object->fields['fk_soc']);					// Hide field already shown in banner
334 334
 	include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
 
347 347
 	// Buttons for actions
348 348
 	if ($action != 'presend' && $action != 'editline') {
349
-		print '<div class="tabsAction">' . "\n";
349
+		print '<div class="tabsAction">'."\n";
350 350
 		$parameters = array();
351 351
 		$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
352 352
 		if ($reshook < 0) {
@@ -356,26 +356,26 @@  discard block
 block discarded – undo
356 356
 		if (empty($reshook)) {
357 357
 			// Send
358 358
 			if (empty($user->socid)) {
359
-				print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=presend&mode=init&token=' . newToken() . '#formmailbeforetitle');
359
+				print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init&token='.newToken().'#formmailbeforetitle');
360 360
 			}
361 361
 
362 362
 			if ($object->status == $object::STATUS_DRAFT) {
363
-				print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=edit&token=' . newToken(), '', $permissiontoadd);
363
+				print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd);
364 364
 			}
365 365
 
366 366
 			// Clone
367 367
 			//print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=clone&token=' . newToken(), '', false && $permissiontoadd);
368 368
 
369 369
 			if ($object->status == $object::STATUS_DRAFT) {
370
-				print dolGetButtonAction($langs->trans('AssetDisposal'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=disposal&token=' . newToken(), '', $permissiontoadd);
370
+				print dolGetButtonAction($langs->trans('AssetDisposal'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=disposal&token='.newToken(), '', $permissiontoadd);
371 371
 			} else {
372
-				print dolGetButtonAction($langs->trans('ReOpen'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=reopen&token=' . newToken(), '', $permissiontoadd);
372
+				print dolGetButtonAction($langs->trans('ReOpen'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=reopen&token='.newToken(), '', $permissiontoadd);
373 373
 			}
374 374
 
375 375
 			// Delete (need delete permission, or if draft, just need create/modify permission)
376
-			print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=delete&token=' . newToken(), '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd));
376
+			print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken(), '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd));
377 377
 		}
378
-		print '</div>' . "\n";
378
+		print '</div>'."\n";
379 379
 	}
380 380
 
381 381
 	// Select mail models is same action as presend
Please login to merge, or discard this patch.
htdocs/asset/class/asset.class.php 1 patch
Spacing   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
 	 */
61 61
 	public $picto = 'asset';
62 62
 
63
-	const STATUS_DRAFT = 0; 	// In progress
64
-	const STATUS_DISPOSED = 9;	// Disposed
63
+	const STATUS_DRAFT = 0; // In progress
64
+	const STATUS_DISPOSED = 9; // Disposed
65 65
 
66 66
 	/**
67 67
 	 *  'type' field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]', 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter[:Sortfield]]]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'text:none', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password')
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 	/**
95 95
 	 * @var array  Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
96 96
 	 */
97
-	public $fields=array(
97
+	public $fields = array(
98 98
 		'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
99 99
 		'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>20, 'notnull'=>1, 'visible'=>1, 'noteditable'=>'0', 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'validate'=>'1', 'comment'=>"Reference of object"),
100 100
 		'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'cssview'=>'wordbreak', 'showoncombobox'=>'2', 'validate'=>'1',),
@@ -536,11 +536,11 @@  discard block
 block discarded – undo
536 536
 		// Check parameters
537 537
 		$error = 0;
538 538
 		if (empty($this->id)) {
539
-			$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Asset") . ' (' . $langs->transnoentitiesnoconv("TechnicalID") . ')');
539
+			$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Asset").' ('.$langs->transnoentitiesnoconv("TechnicalID").')');
540 540
 			$error++;
541 541
 		}
542 542
 		if (empty($this->fk_asset_model)) {
543
-			$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("AssetModel") . ' (' . $langs->transnoentitiesnoconv("TechnicalID") . ')');
543
+			$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("AssetModel").' ('.$langs->transnoentitiesnoconv("TechnicalID").')');
544 544
 			$error++;
545 545
 		}
546 546
 		if ($error) {
@@ -551,7 +551,7 @@  discard block
 block discarded – undo
551 551
 
552 552
 		// Get depreciation options
553 553
 		//---------------------------
554
-		require_once DOL_DOCUMENT_ROOT . '/asset/class/assetdepreciationoptions.class.php';
554
+		require_once DOL_DOCUMENT_ROOT.'/asset/class/assetdepreciationoptions.class.php';
555 555
 		$options_model = new AssetDepreciationOptions($this->db);
556 556
 		$result = $options_model->fetchDeprecationOptions(0, $this->fk_asset_model);
557 557
 		if ($result < 0) {
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
 		// Get accountancy codes
587 587
 		//---------------------------
588 588
 		if (!$error) {
589
-			require_once DOL_DOCUMENT_ROOT . '/asset/class/assetaccountancycodes.class.php';
589
+			require_once DOL_DOCUMENT_ROOT.'/asset/class/assetaccountancycodes.class.php';
590 590
 			$accountancy_codes_model = new AssetAccountancyCodes($this->db);
591 591
 			$result = $accountancy_codes_model->fetchAccountancyCodes(0, $this->fk_asset_model);
592 592
 			if ($result < 0) {
@@ -645,7 +645,7 @@  discard block
 block discarded – undo
645 645
 		// Check parameters
646 646
 		$error = 0;
647 647
 		if (empty($this->id)) {
648
-			$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Asset") . ' (' . $langs->transnoentitiesnoconv("TechnicalID") . ')');
648
+			$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Asset").' ('.$langs->transnoentitiesnoconv("TechnicalID").')');
649 649
 			$error++;
650 650
 		}
651 651
 		if ($error) {
@@ -668,15 +668,15 @@  discard block
 block discarded – undo
668 668
 		*/
669 669
 
670 670
 		$sql = "SELECT ad.rowid, ad.depreciation_mode, ad.ref, ad.depreciation_date, ad.depreciation_ht, ad.cumulative_depreciation_ht";
671
-		$sql .= ", " . $this->db->ifsql('iab.fk_docdet IS NOT NULL', 1, 0) . " AS bookkeeping";
672
-		$sql .= " FROM " . MAIN_DB_PREFIX . "asset_depreciation AS ad";
673
-		$sql .= " LEFT JOIN (SELECT DISTINCT fk_docdet FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping WHERE doc_type = 'asset') AS iab ON iab.fk_docdet = ad.rowid";
674
-		$sql .= " WHERE ad.fk_asset = " . (int) $this->id;
671
+		$sql .= ", ".$this->db->ifsql('iab.fk_docdet IS NOT NULL', 1, 0)." AS bookkeeping";
672
+		$sql .= " FROM ".MAIN_DB_PREFIX."asset_depreciation AS ad";
673
+		$sql .= " LEFT JOIN (SELECT DISTINCT fk_docdet FROM ".MAIN_DB_PREFIX."accounting_bookkeeping WHERE doc_type = 'asset') AS iab ON iab.fk_docdet = ad.rowid";
674
+		$sql .= " WHERE ad.fk_asset = ".(int) $this->id;
675 675
 		$sql .= " ORDER BY ad.depreciation_date ASC";
676 676
 
677 677
 		$resql = $this->db->query($sql);
678 678
 		if (!$resql) {
679
-			$this->errors[] = $langs->trans('AssetErrorFetchDepreciationLines') . ': ' . $this->db->lasterror();
679
+			$this->errors[] = $langs->trans('AssetErrorFetchDepreciationLines').': '.$this->db->lasterror();
680 680
 			return -1;
681 681
 		}
682 682
 
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
 		// Check parameters
712 712
 		$error = 0;
713 713
 		if (empty($this->id)) {
714
-			$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Asset") . ' (' . $langs->transnoentitiesnoconv("TechnicalID") . ')');
714
+			$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Asset").' ('.$langs->transnoentitiesnoconv("TechnicalID").')');
715 715
 			$error++;
716 716
 		}
717 717
 		if ($error) {
@@ -733,14 +733,14 @@  discard block
 block discarded – undo
733 733
 		*/
734 734
 
735 735
 		$sql = "SELECT COUNT(*) AS has_bookkeeping";
736
-		$sql .= " FROM " . MAIN_DB_PREFIX . "asset_depreciation AS ad";
737
-		$sql .= " LEFT JOIN (SELECT DISTINCT fk_docdet FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping WHERE doc_type = 'asset') AS iab ON iab.fk_docdet = ad.rowid";
738
-		$sql .= " WHERE ad.fk_asset = " . (int) $this->id;
736
+		$sql .= " FROM ".MAIN_DB_PREFIX."asset_depreciation AS ad";
737
+		$sql .= " LEFT JOIN (SELECT DISTINCT fk_docdet FROM ".MAIN_DB_PREFIX."accounting_bookkeeping WHERE doc_type = 'asset') AS iab ON iab.fk_docdet = ad.rowid";
738
+		$sql .= " WHERE ad.fk_asset = ".(int) $this->id;
739 739
 		$sql .= " AND iab.fk_docdet IS NOT NULL";
740 740
 
741 741
 		$resql = $this->db->query($sql);
742 742
 		if (!$resql) {
743
-			$this->errors[] = $langs->trans('AssetErrorFetchDepreciationLines') . ': ' . $this->db->lasterror();
743
+			$this->errors[] = $langs->trans('AssetErrorFetchDepreciationLines').': '.$this->db->lasterror();
744 744
 			return -1;
745 745
 		}
746 746
 
@@ -778,28 +778,28 @@  discard block
 block discarded – undo
778 778
 		// Check parameters
779 779
 		$error = 0;
780 780
 		if (empty($this->id)) {
781
-			$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Asset") . ' (' . $langs->transnoentitiesnoconv("TechnicalID") . ')');
781
+			$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Asset").' ('.$langs->transnoentitiesnoconv("TechnicalID").')');
782 782
 			$error++;
783 783
 		}
784 784
 		if ($error) {
785 785
 			return -1;
786 786
 		}
787 787
 
788
-		$sql = "INSERT INTO " . MAIN_DB_PREFIX . "asset_depreciation(fk_asset, depreciation_mode, ref, depreciation_date, depreciation_ht, cumulative_depreciation_ht, accountancy_code_debit, accountancy_code_credit)";
788
+		$sql = "INSERT INTO ".MAIN_DB_PREFIX."asset_depreciation(fk_asset, depreciation_mode, ref, depreciation_date, depreciation_ht, cumulative_depreciation_ht, accountancy_code_debit, accountancy_code_credit)";
789 789
 		$sql .= " VALUES ( ";
790
-		$sql .= " " . (int) $this->id;
791
-		$sql .= ", '" . $this->db->escape($mode) . "'";
792
-		$sql .= ", '" . $this->db->escape($ref) . "'";
793
-		$sql .= ", '" . $this->db->idate($depreciation_date) . "'";
794
-		$sql .= ", " . (double) $depreciation_ht;
795
-		$sql .= ", " . (double) $cumulative_depreciation_ht;
796
-		$sql .= ", '" . $this->db->escape($accountancy_code_debit) . "'";
797
-		$sql .= ", '" . $this->db->escape($accountancy_code_credit) . "'";
790
+		$sql .= " ".(int) $this->id;
791
+		$sql .= ", '".$this->db->escape($mode)."'";
792
+		$sql .= ", '".$this->db->escape($ref)."'";
793
+		$sql .= ", '".$this->db->idate($depreciation_date)."'";
794
+		$sql .= ", ".(double) $depreciation_ht;
795
+		$sql .= ", ".(double) $cumulative_depreciation_ht;
796
+		$sql .= ", '".$this->db->escape($accountancy_code_debit)."'";
797
+		$sql .= ", '".$this->db->escape($accountancy_code_credit)."'";
798 798
 		$sql .= ")";
799 799
 
800 800
 		$resql = $this->db->query($sql);
801 801
 		if (!$resql) {
802
-			$this->errors[] = $langs->trans('AssetErrorAddDepreciationLine') . ': ' . $this->db->lasterror();
802
+			$this->errors[] = $langs->trans('AssetErrorAddDepreciationLine').': '.$this->db->lasterror();
803 803
 			return -1;
804 804
 		}
805 805
 
@@ -822,7 +822,7 @@  discard block
 block discarded – undo
822 822
 		// Check parameters
823 823
 		$error = 0;
824 824
 		if (empty($this->id)) {
825
-			$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Asset") . ' (' . $langs->transnoentitiesnoconv("TechnicalID") . ')');
825
+			$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Asset").' ('.$langs->transnoentitiesnoconv("TechnicalID").')');
826 826
 			$error++;
827 827
 		}
828 828
 		if ($error) {
@@ -831,7 +831,7 @@  discard block
 block discarded – undo
831 831
 
832 832
 		// Get depreciation options
833 833
 		//---------------------------
834
-		require_once DOL_DOCUMENT_ROOT . '/asset/class/assetdepreciationoptions.class.php';
834
+		require_once DOL_DOCUMENT_ROOT.'/asset/class/assetdepreciationoptions.class.php';
835 835
 		$options = new AssetDepreciationOptions($this->db);
836 836
 		$result = $options->fetchDeprecationOptions($this->id);
837 837
 		if ($result < 0) {
@@ -842,7 +842,7 @@  discard block
 block discarded – undo
842 842
 
843 843
 		// Get accountancy codes
844 844
 		//---------------------------
845
-		require_once DOL_DOCUMENT_ROOT . '/asset/class/assetaccountancycodes.class.php';
845
+		require_once DOL_DOCUMENT_ROOT.'/asset/class/assetaccountancycodes.class.php';
846 846
 		$accountancy_codes = new AssetAccountancyCodes($this->db);
847 847
 		$result = $accountancy_codes->fetchAccountancyCodes($this->id);
848 848
 		if ($result < 0) {
@@ -858,20 +858,20 @@  discard block
 block discarded – undo
858 858
 		foreach ($options->deprecation_options as $mode_key => $fields) {
859 859
 			$modes[$mode_key] = $this->db->escape($mode_key);
860 860
 		}
861
-		$sql = "DELETE FROM " . MAIN_DB_PREFIX . "asset_depreciation";
862
-		$sql .= " WHERE fk_asset = " . (int) $this->id;
863
-		$sql .= " AND depreciation_mode NOT IN ('" . $this->db->sanitize(implode("', '", $modes)) . "')";
861
+		$sql = "DELETE FROM ".MAIN_DB_PREFIX."asset_depreciation";
862
+		$sql .= " WHERE fk_asset = ".(int) $this->id;
863
+		$sql .= " AND depreciation_mode NOT IN ('".$this->db->sanitize(implode("', '", $modes))."')";
864 864
 
865 865
 		$resql = $this->db->query($sql);
866 866
 		if (!$resql) {
867
-			$this->errors[] = $langs->trans('AssetErrorClearDepreciationLines') . ': ' . $this->db->lasterror();
867
+			$this->errors[] = $langs->trans('AssetErrorClearDepreciationLines').': '.$this->db->lasterror();
868 868
 			$error++;
869 869
 		}
870 870
 
871 871
 		if (!$error) {
872 872
 			// Get fiscal period
873
-			require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
874
-			require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
873
+			require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
874
+			require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
875 875
 			$dates = getDefaultDatesForTransfer();
876 876
 			$init_fiscal_period_start = $dates['date_start'];
877 877
 			$init_fiscal_period_end = $dates['date_end'];
@@ -904,17 +904,17 @@  discard block
 block discarded – undo
904 904
 				*/
905 905
 
906 906
 				$sql = "SELECT ad.depreciation_date, ad.cumulative_depreciation_ht";
907
-				$sql .= " FROM " . MAIN_DB_PREFIX . "asset_depreciation AS ad";
908
-				$sql .= " LEFT JOIN (SELECT DISTINCT fk_docdet FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping WHERE doc_type = 'asset') AS iab ON iab.fk_docdet = ad.rowid";
909
-				$sql .= " WHERE ad.fk_asset = " . (int) $this->id;
910
-				$sql .= " AND ad.depreciation_mode = '" . $this->db->escape($mode_key) . "'";
907
+				$sql .= " FROM ".MAIN_DB_PREFIX."asset_depreciation AS ad";
908
+				$sql .= " LEFT JOIN (SELECT DISTINCT fk_docdet FROM ".MAIN_DB_PREFIX."accounting_bookkeeping WHERE doc_type = 'asset') AS iab ON iab.fk_docdet = ad.rowid";
909
+				$sql .= " WHERE ad.fk_asset = ".(int) $this->id;
910
+				$sql .= " AND ad.depreciation_mode = '".$this->db->escape($mode_key)."'";
911 911
 				$sql .= " AND iab.fk_docdet IS NOT NULL";
912 912
 				$sql .= " ORDER BY ad.depreciation_date DESC";
913 913
 				$sql .= " LIMIT 1";
914 914
 
915 915
 				$resql = $this->db->query($sql);
916 916
 				if (!$resql) {
917
-					$this->errors[] = $langs->trans('AssetErrorFetchMaxDepreciationDateForMode', $mode_key) . ': ' . $this->db->lasterror();
917
+					$this->errors[] = $langs->trans('AssetErrorFetchMaxDepreciationDateForMode', $mode_key).': '.$this->db->lasterror();
918 918
 					$error++;
919 919
 					break;
920 920
 				}
@@ -926,26 +926,26 @@  discard block
 block discarded – undo
926 926
 				}
927 927
 
928 928
 				// Set last cumulative depreciation
929
-				$sql = "UPDATE " . MAIN_DB_PREFIX . $options->deprecation_options_fields[$mode_key]['table'];
930
-				$sql .= " SET total_amount_last_depreciation_ht = " . (empty($last_cumulative_depreciation_ht) ? 0 : $last_cumulative_depreciation_ht);
931
-				$sql .= " WHERE fk_asset = " . (int) $this->id;
929
+				$sql = "UPDATE ".MAIN_DB_PREFIX.$options->deprecation_options_fields[$mode_key]['table'];
930
+				$sql .= " SET total_amount_last_depreciation_ht = ".(empty($last_cumulative_depreciation_ht) ? 0 : $last_cumulative_depreciation_ht);
931
+				$sql .= " WHERE fk_asset = ".(int) $this->id;
932 932
 				$resql = $this->db->query($sql);
933 933
 				if (!$resql) {
934
-					$this->errors[] = $langs->trans('AssetErrorSetLastCumulativeDepreciation') . ': ' . $this->db->lasterror();
934
+					$this->errors[] = $langs->trans('AssetErrorSetLastCumulativeDepreciation').': '.$this->db->lasterror();
935 935
 					$error++;
936 936
 					break;
937 937
 				}
938 938
 
939 939
 				// Delete old lines
940
-				$sql = "DELETE " . MAIN_DB_PREFIX . "asset_depreciation FROM " . MAIN_DB_PREFIX . "asset_depreciation";
941
-				$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab ON ab.doc_type = 'asset' AND ab.fk_docdet = " . MAIN_DB_PREFIX . "asset_depreciation.rowid";
942
-				$sql .= " WHERE " . MAIN_DB_PREFIX . "asset_depreciation.fk_asset = " . (int) $this->id;
943
-				$sql .= " AND " . MAIN_DB_PREFIX . "asset_depreciation.depreciation_mode = '" . $this->db->escape($mode_key) . "'";
940
+				$sql = "DELETE ".MAIN_DB_PREFIX."asset_depreciation FROM ".MAIN_DB_PREFIX."asset_depreciation";
941
+				$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_bookkeeping as ab ON ab.doc_type = 'asset' AND ab.fk_docdet = ".MAIN_DB_PREFIX."asset_depreciation.rowid";
942
+				$sql .= " WHERE ".MAIN_DB_PREFIX."asset_depreciation.fk_asset = ".(int) $this->id;
943
+				$sql .= " AND ".MAIN_DB_PREFIX."asset_depreciation.depreciation_mode = '".$this->db->escape($mode_key)."'";
944 944
 				$sql .= " AND ab.fk_docdet IS NULL";
945
-				if ($last_depreciation_date !== "") $sql .= " AND " . MAIN_DB_PREFIX . "asset_depreciation.ref != ''";
945
+				if ($last_depreciation_date !== "") $sql .= " AND ".MAIN_DB_PREFIX."asset_depreciation.ref != ''";
946 946
 				$resql = $this->db->query($sql);
947 947
 				if (!$resql) {
948
-					$this->errors[] = $langs->trans('AssetErrorClearDepreciationLines') . ': ' . $this->db->lasterror();
948
+					$this->errors[] = $langs->trans('AssetErrorClearDepreciationLines').': '.$this->db->lasterror();
949 949
 					$error++;
950 950
 					break;
951 951
 				}
@@ -1012,7 +1012,7 @@  discard block
 block discarded – undo
1012 1012
 				$first_period_found = false;
1013 1013
 				$first_period_date = isset($begin_period) && $begin_period > $fiscal_period_start ? $begin_period : $fiscal_period_start;
1014 1014
 
1015
-				$ref_date_format = "%Y" . ($fields['duration_type'] == 1 || $fields['duration_type'] == 2 ? '-%m' : '') . ($fields['duration_type'] == 2 ? '-%d' : '');
1015
+				$ref_date_format = "%Y".($fields['duration_type'] == 1 || $fields['duration_type'] == 2 ? '-%m' : '').($fields['duration_type'] == 2 ? '-%d' : '');
1016 1016
 
1017 1017
 				// Loop security
1018 1018
 				$idx_loop = 0;
@@ -1032,9 +1032,9 @@  discard block
 block discarded – undo
1032 1032
 
1033 1033
 						$period_begin = dol_print_date($fiscal_period_start, $ref_date_format);
1034 1034
 						$period_end = dol_print_date($fiscal_period_end, $ref_date_format);
1035
-						$ref = $period_begin . ($period_begin != $period_end ? ' - ' . $period_end : '');
1035
+						$ref = $period_begin.($period_begin != $period_end ? ' - '.$period_end : '');
1036 1036
 						if ($fiscal_period_start <= $disposal_date && $disposal_date <= $fiscal_period_end) {
1037
-							$ref .= ' - ' . $langs->transnoentitiesnoconv('AssetDisposal');
1037
+							$ref .= ' - '.$langs->transnoentitiesnoconv('AssetDisposal');
1038 1038
 						}
1039 1039
 
1040 1040
 						$begin_date = $fiscal_period_start < $start_date && $start_date <= $fiscal_period_end ? $start_date : $fiscal_period_start;
@@ -1113,7 +1113,7 @@  discard block
 block discarded – undo
1113 1113
 		// Check parameters
1114 1114
 		$error = 0;
1115 1115
 		if (empty($asset_depreciation_id)) {
1116
-			$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("AssetDepreciation") . ' (' . $langs->transnoentitiesnoconv("TechnicalID") . ')');
1116
+			$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("AssetDepreciation").' ('.$langs->transnoentitiesnoconv("TechnicalID").')');
1117 1117
 			$error++;
1118 1118
 		}
1119 1119
 		if ($error) {
@@ -1122,28 +1122,28 @@  discard block
 block discarded – undo
1122 1122
 
1123 1123
 		$this->db->begin();
1124 1124
 
1125
-		require_once DOL_DOCUMENT_ROOT . '/asset/class/assetdepreciationoptions.class.php';
1125
+		require_once DOL_DOCUMENT_ROOT.'/asset/class/assetdepreciationoptions.class.php';
1126 1126
 		$options = new AssetDepreciationOptions($this->db);
1127 1127
 
1128 1128
 		// Get last depreciation lines save in bookkeeping
1129 1129
 		//-----------------------------------------------------
1130 1130
 		$sql = "SELECT fk_asset, depreciation_mode, cumulative_depreciation_ht";
1131
-		$sql .= " FROM " . MAIN_DB_PREFIX . "asset_depreciation";
1132
-		$sql .= " WHERE rowid = " . (int) $asset_depreciation_id;
1131
+		$sql .= " FROM ".MAIN_DB_PREFIX."asset_depreciation";
1132
+		$sql .= " WHERE rowid = ".(int) $asset_depreciation_id;
1133 1133
 		$resql = $this->db->query($sql);
1134 1134
 		if (!$resql) {
1135
-			$this->errors[] = $langs->trans('AssetErrorFetchCumulativeDepreciation') . ': ' . $this->db->lasterror();
1135
+			$this->errors[] = $langs->trans('AssetErrorFetchCumulativeDepreciation').': '.$this->db->lasterror();
1136 1136
 			$error++;
1137 1137
 		} else {
1138 1138
 			if ($obj = $this->db->fetch_object($resql)) {
1139 1139
 				$mode_key = $obj->depreciation_mode;
1140 1140
 				if (!empty($options->deprecation_options_fields[$mode_key])) {
1141
-					$sql = "UPDATE " . MAIN_DB_PREFIX . $options->deprecation_options_fields[$mode_key]['table'];
1142
-					$sql .= " SET total_amount_last_depreciation_ht = " . $obj->cumulative_depreciation_ht;
1143
-					$sql .= " WHERE fk_asset = " . (int) $obj->fk_asset;
1141
+					$sql = "UPDATE ".MAIN_DB_PREFIX.$options->deprecation_options_fields[$mode_key]['table'];
1142
+					$sql .= " SET total_amount_last_depreciation_ht = ".$obj->cumulative_depreciation_ht;
1143
+					$sql .= " WHERE fk_asset = ".(int) $obj->fk_asset;
1144 1144
 					$resql = $this->db->query($sql);
1145 1145
 					if (!$resql) {
1146
-						$this->errors[] = $langs->trans('AssetErrorSetLastCumulativeDepreciation') . ': ' . $this->db->lasterror();
1146
+						$this->errors[] = $langs->trans('AssetErrorSetLastCumulativeDepreciation').': '.$this->db->lasterror();
1147 1147
 						$error++;
1148 1148
 					}
1149 1149
 				}
@@ -1388,7 +1388,7 @@  discard block
 block discarded – undo
1388 1388
 		if ($withpicto != 2) {
1389 1389
 			$name = $this->ref;
1390 1390
 			if ($option == 'label') $name = $this->label;
1391
-			elseif ($option == 'with_label') $name .= ' - ' . $this->label;
1391
+			elseif ($option == 'with_label') $name .= ' - '.$this->label;
1392 1392
 			$result .= dol_escape_htmltag($maxlen ? dol_trunc($name, $maxlen) : $name);
1393 1393
 		}
1394 1394
 
@@ -1396,7 +1396,7 @@  discard block
 block discarded – undo
1396 1396
 		//if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : '');
1397 1397
 
1398 1398
 		global $action;
1399
-		$hookmanager->initHooks(array($this->element . 'dao'));
1399
+		$hookmanager->initHooks(array($this->element.'dao'));
1400 1400
 		$parameters = array('id'=>$this->id, 'getnomurl' => &$result);
1401 1401
 		$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
1402 1402
 		if ($reshook > 0) {
Please login to merge, or discard this patch.
htdocs/theme/eldy/btn.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 if (!empty($conf->global->THEME_DARKMODEENABLED)) {
19 19
 	print "/* For dark mode */\n";
20 20
 	if ($conf->global->THEME_DARKMODEENABLED != 2) {
21
-		print "@media (prefers-color-scheme: dark) {";	// To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes
21
+		print "@media (prefers-color-scheme: dark) {"; // To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes
22 22
 	} else {
23 23
 		print "@media not print {";
24 24
 	}
Please login to merge, or discard this patch.
htdocs/theme/md/style.css.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 $colortext           = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXT) ? $colortext : $conf->global->THEME_ELDY_TEXT) : (empty($user->conf->THEME_ELDY_TEXT) ? $colortext : $user->conf->THEME_ELDY_TEXT);
186 186
 $colortextlink       = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTLINK) ? $colortext : $conf->global->THEME_ELDY_TEXTLINK) : (empty($user->conf->THEME_ELDY_TEXTLINK) ? $colortextlink : $user->conf->THEME_ELDY_TEXTLINK);
187 187
 $butactionbg       	 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_BTNACTION) ? $butactionbg : $conf->global->THEME_ELDY_BTNACTION) : (empty($user->conf->THEME_ELDY_BTNACTION) ? $butactionbg : $user->conf->THEME_ELDY_BTNACTION);
188
-$textbutaction     = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTBTNACTION) ? $textbutaction : $conf->global->THEME_ELDY_TEXTBTNACTION) : (empty($user->conf->THEME_ELDY_TEXTBTNACTION) ? $textbutaction : $user->conf->THEME_ELDY_TEXTBTNACTION);
188
+$textbutaction = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTBTNACTION) ? $textbutaction : $conf->global->THEME_ELDY_TEXTBTNACTION) : (empty($user->conf->THEME_ELDY_TEXTBTNACTION) ? $textbutaction : $user->conf->THEME_ELDY_TEXTBTNACTION);
189 189
 $fontsize            = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_FONT_SIZE1) ? $fontsize : $conf->global->THEME_ELDY_FONT_SIZE1) : (empty($user->conf->THEME_ELDY_FONT_SIZE1) ? $fontsize : $user->conf->THEME_ELDY_FONT_SIZE1);
190 190
 $fontsizesmaller     = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_FONT_SIZE2) ? $fontsize : $conf->global->THEME_ELDY_FONT_SIZE2) : (empty($user->conf->THEME_ELDY_FONT_SIZE2) ? $fontsize : $user->conf->THEME_ELDY_FONT_SIZE2);
191 191
 
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
 if (!empty($conf->global->THEME_DARKMODEENABLED)) {
361 361
 	print "/* For dark mode */\n";
362 362
 	if ($conf->global->THEME_DARKMODEENABLED != 2) {
363
-		print "@media (prefers-color-scheme: dark) {";	// To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes
363
+		print "@media (prefers-color-scheme: dark) {"; // To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes
364 364
 	} else {
365 365
 		print "@media not print {";
366 366
 	}
Please login to merge, or discard this patch.
htdocs/comm/remx.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
  *		\brief      Page to edit absolute discounts for a customer
25 25
  */
26 26
 
27
-if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1');		// Force use of CSRF protection with tokens even for GET
27
+if (!defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET
28 28
 
29 29
 // Load Dolibarr environment
30 30
 require '../main.inc.php';
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 	print '</table>';
331 331
 	print '</div>';
332 332
 
333
-	print '</div>';	// close fichecenter
333
+	print '</div>'; // close fichecenter
334 334
 
335 335
 	print dol_get_fiche_end();
336 336
 
Please login to merge, or discard this patch.