Completed
Branch develop (21bcc8)
by
unknown
19:13
created
htdocs/eventorganization/conferenceorbooth_list.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,9 @@
 block discarded – undo
152 152
 	accessforbidden();
153 153
 }
154 154
 $result = restrictedArea($user, 'eventorganization');
155
-if (!$permissiontoread) accessforbidden();
155
+if (!$permissiontoread) {
156
+	accessforbidden();
157
+}
156 158
 
157 159
 
158 160
 /*
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 
86 86
 // Default sort order (if not yet defined by previous GETPOST)
87 87
 if (!$sortfield) {
88
-	reset($object->fields);					// Reset is required to avoid key() to return null.
88
+	reset($object->fields); // Reset is required to avoid key() to return null.
89 89
 	$sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition.
90 90
 }
91 91
 if (!$sortorder) {
@@ -157,15 +157,15 @@  discard block
 block discarded – undo
157 157
 
158 158
 if (preg_match('/^set/', $action) && ($projectid > 0 || $projectref) && !empty($user->rights->eventorganization->write)) {
159 159
 	//If "set" fields keys is in projects fields
160
-	$project_attr=preg_replace('/^set/', '', $action);
160
+	$project_attr = preg_replace('/^set/', '', $action);
161 161
 	if (array_key_exists($project_attr, $project->fields)) {
162 162
 		$result = $project->fetch($projectid, $projectref);
163 163
 		if ($result < 0) {
164 164
 			setEventMessages(null, $project->errors, 'errors');
165 165
 		} else {
166 166
 			$projectid = $project->id;
167
-			$project->{$project_attr}=GETPOST($project_attr);
168
-			$result=$project->update($user);
167
+			$project->{$project_attr} = GETPOST($project_attr);
168
+			$result = $project->update($user);
169 169
 			if ($result < 0) {
170 170
 				setEventMessages(null, $project->errors, 'errors');
171 171
 			}
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 
227 227
 	if ($permissiontoadd && (($action == 'setstatus' && $confirm == "yes") || $massaction == 'setstatus')) {
228 228
 		$db->begin();
229
-		$error = 0;$nbok = 0;
229
+		$error = 0; $nbok = 0;
230 230
 		$objecttmp = new $objectclass($db);
231 231
 		foreach ($toselect as $key => $idselect) {
232 232
 			$result = $objecttmp->fetch($idselect);
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
 				}
243 243
 			} else {
244 244
 				setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
245
-				$error ++;
245
+				$error++;
246 246
 				break;
247 247
 			}
248 248
 		}
@@ -292,9 +292,9 @@  discard block
 block discarded – undo
292 292
 	}
293 293
 
294 294
 	$help_url = "EN:Module_Projects|FR:Module_Projets|ES:M&oacute;dulo_Proyectos";
295
-	$title = $langs->trans("Project") . ' - ' . $langs->trans("EventOrganizationConfOrBoothes") . ' - ' . $project->ref . ' ' . $project->name;
295
+	$title = $langs->trans("Project").' - '.$langs->trans("EventOrganizationConfOrBoothes").' - '.$project->ref.' '.$project->name;
296 296
 	if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $project->name) {
297
-		$title = $project->ref . ' ' . $project->name . ' - ' . $langs->trans("ListOfConferencesOrBooths");
297
+		$title = $project->ref.' '.$project->name.' - '.$langs->trans("ListOfConferencesOrBooths");
298 298
 	}
299 299
 }
300 300
 
@@ -724,7 +724,7 @@  discard block
 block discarded – undo
724 724
 }
725 725
 $massactionbutton = $form->selectMassAction('', $arrayofmassactions);
726 726
 
727
-print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].(!empty($projectid)?'?projectid='.$projectid:'').'">'."\n";
727
+print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].(!empty($projectid) ? '?projectid='.$projectid : '').'">'."\n";
728 728
 if ($optioncss != '') {
729 729
 	print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
730 730
 }
@@ -740,10 +740,10 @@  discard block
 block discarded – undo
740 740
 
741 741
 
742 742
 $newcardbutton = '';
743
-$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.(!empty($project->id)?'&withproject=1&fk_project='.$project->id:'').(!empty($project->socid)?'&fk_soc='.$project->socid:'').preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
744
-$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.(!empty($project->id)?'&withproject=1&fk_project='.$project->id:'').(!empty($project->socid)?'&fk_soc='.$project->socid:'').preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
743
+$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.(!empty($project->id) ? '&withproject=1&fk_project='.$project->id : '').(!empty($project->socid) ? '&fk_soc='.$project->socid : '').preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
744
+$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.(!empty($project->id) ? '&withproject=1&fk_project='.$project->id : '').(!empty($project->socid) ? '&fk_soc='.$project->socid : '').preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
745 745
 $newcardbutton .= dolGetButtonTitleSeparator();
746
-$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/eventorganization/conferenceorbooth_card.php?action=create'.(!empty($project->id)?'&withproject=1&fk_project='.$project->id:'').(!empty($project->socid)?'&fk_soc='.$project->socid:'').'&backtopage='.urlencode($_SERVER['PHP_SELF']).(!empty($project->id)?'?projectid='.$project->id:''), '', $permissiontoadd);
746
+$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/eventorganization/conferenceorbooth_card.php?action=create'.(!empty($project->id) ? '&withproject=1&fk_project='.$project->id : '').(!empty($project->socid) ? '&fk_soc='.$project->socid : '').'&backtopage='.urlencode($_SERVER['PHP_SELF']).(!empty($project->id) ? '?projectid='.$project->id : ''), '', $permissiontoadd);
747 747
 
748 748
 print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
749 749
 
@@ -895,7 +895,7 @@  discard block
 block discarded – undo
895 895
 	} elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
896 896
 		$cssforfield .= ($cssforfield ? ' ' : '').'right';
897 897
 	}
898
-	$cssforfield = preg_replace('/small\s*/', '', $cssforfield);	// the 'small' css must not be used for the title label
898
+	$cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
899 899
 	if (!empty($arrayfields['t.'.$key]['checked'])) {
900 900
 		print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist']))."\n";
901 901
 		$totalarray['nbfield']++;
@@ -1008,7 +1008,7 @@  discard block
 block discarded – undo
1008 1008
 				if ($key == 'status') {
1009 1009
 					print $object->getLibStatut(5);
1010 1010
 				} elseif ($key == 'ref') {
1011
-					print $object->getNomUrl(1, 0, '', (($projectid > 0)?'withproject':''));
1011
+					print $object->getNomUrl(1, 0, '', (($projectid > 0) ? 'withproject' : ''));
1012 1012
 				} else {
1013 1013
 					print $object->showOutputField($val, $key, $object->$key, '');
1014 1014
 				}
Please login to merge, or discard this patch.
htdocs/categories/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -206,12 +206,12 @@
 block discarded – undo
206 206
 	$entry .= '</td>';
207 207
 	$entry .= '<td class="right" width="20px;">';
208 208
 	if ($user->rights->categorie->creer) {
209
-		$entry .= '<a class="editfielda" href="' . DOL_URL_ROOT . '/categories/edit.php?id=' . $val['id'] . '&type=' . $type . $moreparam . '&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?type=' . $type) . '">' . img_edit() . '</a>';
209
+		$entry .= '<a class="editfielda" href="'.DOL_URL_ROOT.'/categories/edit.php?id='.$val['id'].'&type='.$type.$moreparam.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type='.$type).'">'.img_edit().'</a>';
210 210
 	}
211 211
 	$entry .= '</td>';
212 212
 	$entry .= '<td class="right" width="20px;">';
213 213
 	if ($user->rights->categorie->supprimer) {
214
-		$entry .= '<a class="deletefilelink" href="' . DOL_URL_ROOT . '/categories/viewcat.php?action=delete&token=' . newToken() . '&id=' . $val['id'] . '&type=' . $type . $moreparam . '&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?type=' . $type . $moreparam) . '&backtolist=' . urlencode($_SERVER["PHP_SELF"] . '?type=' . $type . $moreparam) . '">' . img_delete() . '</a>';
214
+		$entry .= '<a class="deletefilelink" href="'.DOL_URL_ROOT.'/categories/viewcat.php?action=delete&token='.newToken().'&id='.$val['id'].'&type='.$type.$moreparam.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type='.$type.$moreparam).'&backtolist='.urlencode($_SERVER["PHP_SELF"].'?type='.$type.$moreparam).'">'.img_delete().'</a>';
215 215
 	}
216 216
 	$entry .= '</td>';
217 217
 
Please login to merge, or discard this patch.
htdocs/compta/facture/invoicetemplate_list.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 $search_date_endday = GETPOST('search_date_endday', 'int');
81 81
 $search_date_endmonth = GETPOST('search_date_endmonth', 'int');
82 82
 $search_date_endyear = GETPOST('search_date_endyear', 'int');
83
-$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);	// Use tzserver
83
+$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
84 84
 $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
85 85
 $search_date_when_startday = GETPOST('search_date_when_startday', 'int');
86 86
 $search_date_when_startmonth = GETPOST('search_date_when_startmonth', 'int');
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 $search_date_when_endday = GETPOST('search_date_when_endday', 'int');
89 89
 $search_date_when_endmonth = GETPOST('search_date_when_endmonth', 'int');
90 90
 $search_date_when_endyear = GETPOST('search_date_when_endyear', 'int');
91
-$search_date_when_start = dol_mktime(0, 0, 0, $search_date_when_startmonth, $search_date_when_startday, $search_date_when_startyear);	// Use tzserver
91
+$search_date_when_start = dol_mktime(0, 0, 0, $search_date_when_startmonth, $search_date_when_startday, $search_date_when_startyear); // Use tzserver
92 92
 $search_date_when_end = dol_mktime(23, 59, 59, $search_date_when_endmonth, $search_date_when_endday, $search_date_when_endyear);
93 93
 $search_recurring = GETPOST('search_recurring', 'int');
94 94
 $search_frequency = GETPOST('search_frequency', 'alpha');
Please login to merge, or discard this patch.
htdocs/fourn/paiement/list.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,9 @@
 block discarded – undo
49 49
 $socid = GETPOST('socid', 'int');
50 50
 
51 51
 // Security check
52
-if ($user->socid) $socid = $user->socid;
52
+if ($user->socid) {
53
+	$socid = $user->socid;
54
+}
53 55
 
54 56
 $search_ref				= GETPOST('search_ref', 'alpha');
55 57
 $search_date_startday	= GETPOST('search_date_startday', 'int');
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -53,20 +53,20 @@  discard block
 block discarded – undo
53 53
 // Security check
54 54
 if ($user->socid) $socid = $user->socid;
55 55
 
56
-$search_ref				= GETPOST('search_ref', 'alpha');
57
-$search_date_startday	= GETPOST('search_date_startday', 'int');
58
-$search_date_startmonth	= GETPOST('search_date_startmonth', 'int');
59
-$search_date_startyear	= GETPOST('search_date_startyear', 'int');
56
+$search_ref = GETPOST('search_ref', 'alpha');
57
+$search_date_startday = GETPOST('search_date_startday', 'int');
58
+$search_date_startmonth = GETPOST('search_date_startmonth', 'int');
59
+$search_date_startyear = GETPOST('search_date_startyear', 'int');
60 60
 $search_date_endday		= GETPOST('search_date_endday', 'int');
61
-$search_date_endmonth	= GETPOST('search_date_endmonth', 'int');
61
+$search_date_endmonth = GETPOST('search_date_endmonth', 'int');
62 62
 $search_date_endyear	= GETPOST('search_date_endyear', 'int');
63
-$search_date_start		= dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);	// Use tzserver
63
+$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
64 64
 $search_date_end		= dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
65 65
 $search_company			= GETPOST('search_company', 'alpha');
66 66
 $search_payment_type	= GETPOST('search_payment_type');
67
-$search_cheque_num		= GETPOST('search_cheque_num', 'alpha');
67
+$search_cheque_num = GETPOST('search_cheque_num', 'alpha');
68 68
 $search_bank_account	= GETPOST('search_bank_account', 'int');
69
-$search_amount			= GETPOST('search_amount', 'alpha'); // alpha because we must be able to search on '< x'
69
+$search_amount = GETPOST('search_amount', 'alpha'); // alpha because we must be able to search on '< x'
70 70
 
71 71
 $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
72 72
 $sortfield				= GETPOST('sortfield', 'aZ09comma');
@@ -207,10 +207,10 @@  discard block
 block discarded – undo
207 207
 	$sql .= natural_search('p.ref', $search_ref);
208 208
 }
209 209
 if ($search_date_start) {
210
-	$sql .= " AND p.datep >= '" . $db->idate($search_date_start) . "'";
210
+	$sql .= " AND p.datep >= '".$db->idate($search_date_start)."'";
211 211
 }
212 212
 if ($search_date_end) {
213
-	$sql .=" AND p.datep <= '" . $db->idate($search_date_end) . "'";
213
+	$sql .= " AND p.datep <= '".$db->idate($search_date_end)."'";
214 214
 }
215 215
 
216 216
 if ($search_company) {
Please login to merge, or discard this patch.
htdocs/core/tpl/objectline_edit.tpl.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -340,8 +340,8 @@  discard block
 block discarded – undo
340 340
 		}
341 341
 
342 342
 		$res = $line->fetch_product();
343
-		if ($res  > 0  ) {
344
-			if ( $line->product->isMandatoryPeriod() && $line->product->isService()) {
343
+		if ($res > 0) {
344
+			if ($line->product->isMandatoryPeriod() && $line->product->isService()) {
345 345
 				print  'jQuery("#date_start").addClass("error");';
346 346
 			}
347 347
 		}
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
 
357 357
 		$res = $line->fetch_product();
358 358
 		// on doit fetch le product là !!! pour connaître le type
359
-		if ($res  > 0  ) {
359
+		if ($res > 0) {
360 360
 			if ($line->product->isMandatoryperiod() && $line->product->isService()) {
361 361
 				print  'jQuery("#date_end").addClass("error");';
362 362
 			}
Please login to merge, or discard this patch.
htdocs/compta/facture/card.php 2 patches
Braces   +9 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4025,7 +4025,9 @@  discard block
 block discarded – undo
4025 4025
 				}
4026 4026
 			}
4027 4027
 		}
4028
-		if ($nbMandated > 0 ) $text .= '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>';
4028
+		if ($nbMandated > 0 ) {
4029
+			$text .= '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>';
4030
+		}
4029 4031
 
4030 4032
 
4031 4033
 		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, (($object->type != Facture::TYPE_CREDIT_NOTE && $object->total_ttc < 0) ? "no" : "yes"), 2);
@@ -5276,9 +5278,12 @@  discard block
 block discarded – undo
5276 5278
 
5277 5279
 			$parameters = array();
5278 5280
 			$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
5279
-			if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
5280
-			if (empty($reshook))
5281
-				$object->formAddObjectLine(1, $mysoc, $soc);
5281
+			if ($reshook < 0) {
5282
+				setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
5283
+			}
5284
+			if (empty($reshook)) {
5285
+							$object->formAddObjectLine(1, $mysoc, $soc);
5286
+			}
5282 5287
 		}
5283 5288
 	}
5284 5289
 
Please login to merge, or discard this patch.
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 }
81 81
 
82 82
 // General $Variables
83
-$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('facid', 'int'));    // For backward compatibility
83
+$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility
84 84
 $ref = GETPOST('ref', 'alpha');
85 85
 $socid = GETPOST('socid', 'int');
86 86
 $action = GETPOST('action', 'aZ09');
@@ -1009,7 +1009,7 @@  discard block
 block discarded – undo
1009 1009
 			$error++;
1010 1010
 		}
1011 1011
 
1012
-		$dateinvoice = dol_mktime(0, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'), 'tzserver');	// If we enter the 02 january, we need to save the 02 january for server
1012
+		$dateinvoice = dol_mktime(0, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server
1013 1013
 		$date_pointoftax = dol_mktime(0, 0, 0, GETPOST('date_pointoftaxmonth', 'int'), GETPOST('date_pointoftaxday', 'int'), GETPOST('date_pointoftaxyear', 'int'), 'tzserver');
1014 1014
 
1015 1015
 		// Replacement invoice
@@ -1097,7 +1097,7 @@  discard block
 block discarded – undo
1097 1097
 				$object->ref_customer		= GETPOST('ref_client', 'alphanohtml');
1098 1098
 				$object->model_pdf = GETPOST('model');
1099 1099
 				$object->fk_project			= GETPOST('projectid', 'int');
1100
-				$object->cond_reglement_id	= 0;		// No payment term for a credit note
1100
+				$object->cond_reglement_id	= 0; // No payment term for a credit note
1101 1101
 				$object->mode_reglement_id	= GETPOST('mode_reglement_id', 'int');
1102 1102
 				$object->fk_account = GETPOST('fk_account', 'int');
1103 1103
 				$object->remise_absolue		= price2num(GETPOST('remise_absolue'), 'MU');
@@ -1389,7 +1389,7 @@  discard block
 block discarded – undo
1389 1389
 				$object->note_public		= trim(GETPOST('note_public', 'restricthtml'));
1390 1390
 				$object->note_private = trim(GETPOST('note_private', 'restricthtml'));
1391 1391
 				$object->ref_client			= GETPOST('ref_client');
1392
-				$object->ref_customer		= GETPOST('ref_client');
1392
+				$object->ref_customer = GETPOST('ref_client');
1393 1393
 				$object->model_pdf = GETPOST('model');
1394 1394
 				$object->fk_project			= GETPOST('projectid', 'int');
1395 1395
 				$object->cond_reglement_id	= (GETPOST('type') == 3 ? 1 : GETPOST('cond_reglement_id'));
@@ -1941,7 +1941,7 @@  discard block
 block discarded – undo
1941 1941
 				$object->fk_project = GETPOST('projectid', 'int');
1942 1942
 				$object->cond_reglement_id = GETPOST('cond_reglement_id', 'int');
1943 1943
 				$object->mode_reglement_id = GETPOST('mode_reglement_id', 'int');
1944
-				$object->remise_absolue =price2num(GETPOST('remise_absolue'), 'MU', 2);
1944
+				$object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU', 2);
1945 1945
 				$object->remise_percent = price2num(GETPOST('remise_percent'), '', 2);
1946 1946
 
1947 1947
 				// Proprietes particulieres a facture de remplacement
@@ -2023,7 +2023,7 @@  discard block
 block discarded – undo
2023 2023
 
2024 2024
 		// Set if we used free entry or predefined product
2025 2025
 		$predef = '';
2026
-		$product_desc =(GETPOSTISSET('dp_desc') ? GETPOST('dp_desc', 'restricthtml') : '');
2026
+		$product_desc = (GETPOSTISSET('dp_desc') ? GETPOST('dp_desc', 'restricthtml') : '');
2027 2027
 
2028 2028
 		$price_ht = '';
2029 2029
 		$price_ht_devise = '';
@@ -2215,8 +2215,8 @@  discard block
 block discarded – undo
2215 2215
 				}
2216 2216
 
2217 2217
 				//If text set in desc is the same as product descpription (as now it's preloaded) whe add it only one time
2218
-				if ($product_desc==$desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) {
2219
-					$product_desc='';
2218
+				if ($product_desc == $desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) {
2219
+					$product_desc = '';
2220 2220
 				}
2221 2221
 
2222 2222
 				if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) {
@@ -2466,7 +2466,7 @@  discard block
 block discarded – undo
2466 2466
 		// Define special_code for special lines
2467 2467
 		$special_code = GETPOST('special_code', 'int');
2468 2468
 		if ($special_code == 3) {
2469
-			$special_code = 0;	// Options should not exists on invoices
2469
+			$special_code = 0; // Options should not exists on invoices
2470 2470
 		}
2471 2471
 
2472 2472
 		$line = new FactureLigne($db);
@@ -3080,7 +3080,7 @@  discard block
 block discarded – undo
3080 3080
 
3081 3081
 				if (isModEnabled('multicurrency')) {
3082 3082
 					$currency_code 	= (!empty($expesrc->multicurrency_code) ? $expesrc->multicurrency_code : (!empty($soc->multicurrency_code) ? $soc->multicurrency_code : $objectsrc->multicurrency_code));
3083
-					$currency_tx 	= (!empty($expesrc->multicurrency_tx) ? $expesrc->multicurrency_tx : (!empty($soc->multicurrency_tx) ? $soc->multicurrency_tx : $objectsrc->multicurrency_tx));
3083
+					$currency_tx = (!empty($expesrc->multicurrency_tx) ? $expesrc->multicurrency_tx : (!empty($soc->multicurrency_tx) ? $soc->multicurrency_tx : $objectsrc->multicurrency_tx));
3084 3084
 				}
3085 3085
 
3086 3086
 				//Replicate extrafields
@@ -3132,7 +3132,7 @@  discard block
 block discarded – undo
3132 3132
 
3133 3133
 	// when bank account is empty (means not override by payment mode form a other object, like third-party), try to use default value
3134 3134
 	if ($socid > 0 && $fk_account) {	// A company has already been set and it has a default fk_account
3135
-		$fk_account = GETPOSTISSET('fk_account') ? GETPOST("fk_account", 'int') : $fk_account;	// The GETPOST is used only if form was posted to avoid to take default value, because in such case, the default must be the one of the company
3135
+		$fk_account = GETPOSTISSET('fk_account') ? GETPOST("fk_account", 'int') : $fk_account; // The GETPOST is used only if form was posted to avoid to take default value, because in such case, the default must be the one of the company
3136 3136
 	} else {	// No company forced
3137 3137
 		$fk_account = GETPOST("fk_account", 'int');
3138 3138
 	}
@@ -3751,7 +3751,7 @@  discard block
 block discarded – undo
3751 3751
 	// Payment mode
3752 3752
 	print '<tr><td>'.$langs->trans('PaymentMode').'</td><td colspan="2">';
3753 3753
 	print img_picto('', 'bank', 'class="pictofixedwidth"');
3754
-	print $form->select_types_paiements((GETPOSTISSET('mode_reglement_id') && GETPOST('mode_reglement_id') != 0)? GETPOST('mode_reglement_id') : $mode_reglement_id, 'mode_reglement_id', 'CRDT', 0, 1, 0, 0, 1, 'maxwidth200 widthcentpercentminusx', 1);
3754
+	print $form->select_types_paiements((GETPOSTISSET('mode_reglement_id') && GETPOST('mode_reglement_id') != 0) ? GETPOST('mode_reglement_id') : $mode_reglement_id, 'mode_reglement_id', 'CRDT', 0, 1, 0, 0, 1, 'maxwidth200 widthcentpercentminusx', 1);
3755 3755
 	print '</td></tr>';
3756 3756
 
3757 3757
 	// Bank Account
@@ -4193,14 +4193,14 @@  discard block
 block discarded – undo
4193 4193
 		$nbMandated = 0;
4194 4194
 		foreach ($object->lines as $line) {
4195 4195
 			$res = $line->fetch_product();
4196
-			if ($res  > 0  ) {
4197
-				if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end) )) {
4196
+			if ($res > 0) {
4197
+				if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) {
4198 4198
 					$nbMandated++;
4199 4199
 					break;
4200 4200
 				}
4201 4201
 			}
4202 4202
 		}
4203
-		if ($nbMandated > 0 ) $text .= '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>';
4203
+		if ($nbMandated > 0) $text .= '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>';
4204 4204
 
4205 4205
 
4206 4206
 		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, (($object->type != Facture::TYPE_CREDIT_NOTE && $object->total_ttc < 0) ? "no" : "yes"), 2);
@@ -4815,40 +4815,40 @@  discard block
 block discarded – undo
4815 4815
 	}
4816 4816
 	print '<tr>';
4817 4817
 	// Amount HT
4818
-	print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>';
4819
-	print '<td class="nowrap amountcard right">' . price($sign * $object->total_ht, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
4818
+	print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>';
4819
+	print '<td class="nowrap amountcard right">'.price($sign * $object->total_ht, '', $langs, 0, -1, -1, $conf->currency).'</td>';
4820 4820
 	if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
4821 4821
 		// Multicurrency Amount HT
4822
-		print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
4822
+		print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
4823 4823
 	}
4824 4824
 	print '</tr>';
4825 4825
 
4826 4826
 	print '<tr>';
4827 4827
 	// Amount VAT
4828
-	print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>';
4829
-	print '<td class="nowrap amountcard right">' . price($sign * $object->total_tva, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
4828
+	print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>';
4829
+	print '<td class="nowrap amountcard right">'.price($sign * $object->total_tva, '', $langs, 0, -1, -1, $conf->currency).'</td>';
4830 4830
 	if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
4831 4831
 		// Multicurrency Amount VAT
4832
-		print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
4832
+		print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
4833 4833
 	}
4834 4834
 	print '</tr>';
4835 4835
 
4836 4836
 	// Amount Local Taxes
4837 4837
 	if (($mysoc->localtax1_assuj == "1" && $mysoc->useLocalTax(1)) || $object->total_localtax1 != 0) {
4838 4838
 		print '<tr>';
4839
-		print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
4840
-		print '<td class="nowrap amountcard right">' . price($sign * $object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
4839
+		print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>';
4840
+		print '<td class="nowrap amountcard right">'.price($sign * $object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency).'</td>';
4841 4841
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
4842
-			print '<td class="nowrap amountcard right">' . price($sign * $object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
4842
+			print '<td class="nowrap amountcard right">'.price($sign * $object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
4843 4843
 		}
4844 4844
 		print '</tr>';
4845 4845
 
4846 4846
 		if (($mysoc->localtax2_assuj == "1" && $mysoc->useLocalTax(2)) || $object->total_localtax2 != 0) {
4847 4847
 			print '<tr>';
4848
-			print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>';
4849
-			print '<td class="nowrap amountcard right">' . price($sign * $object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
4848
+			print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>';
4849
+			print '<td class="nowrap amountcard right">'.price($sign * $object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency).'</td>';
4850 4850
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
4851
-				print '<td class="nowrap amountcard right">' . price($sign * $object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
4851
+				print '<td class="nowrap amountcard right">'.price($sign * $object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
4852 4852
 			}
4853 4853
 			print '</tr>';
4854 4854
 		}
@@ -4910,11 +4910,11 @@  discard block
 block discarded – undo
4910 4910
 
4911 4911
 	print '<tr>';
4912 4912
 	// Amount TTC
4913
-	print '<td>' . $langs->trans('AmountTTC') . '</td>';
4914
-	print '<td class="nowrap amountcard right">' . price($sign * $object->total_ttc, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
4913
+	print '<td>'.$langs->trans('AmountTTC').'</td>';
4914
+	print '<td class="nowrap amountcard right">'.price($sign * $object->total_ttc, '', $langs, 0, -1, -1, $conf->currency).'</td>';
4915 4915
 	if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
4916 4916
 		// Multicurrency Amount TTC
4917
-		print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
4917
+		print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
4918 4918
 	}
4919 4919
 	print '</tr>';
4920 4920
 
@@ -5313,7 +5313,7 @@  discard block
 block discarded – undo
5313 5313
 			print '</td>';
5314 5314
 			print '<td class="right'.($resteapayeraffiche ? ' amountremaintopay' : (' '.$cssforamountpaymentcomplete)).'">';
5315 5315
 			//print (empty($object->multicurrency_code) ? $conf->currency : $object->multicurrency_code).' ';
5316
-			print price(price2num($object->multicurrency_tx*$resteapayeraffiche, 'MT'), 1, $langs, 1, -1, -1, (empty($object->multicurrency_code) ? $conf->currency : $object->multicurrency_code)).'</td><td>&nbsp;</td></tr>';
5316
+			print price(price2num($object->multicurrency_tx * $resteapayeraffiche, 'MT'), 1, $langs, 1, -1, -1, (empty($object->multicurrency_code) ? $conf->currency : $object->multicurrency_code)).'</td><td>&nbsp;</td></tr>';
5317 5317
 		}
5318 5318
 
5319 5319
 		// Retained warranty : usualy use on construction industry
@@ -5561,7 +5561,7 @@  discard block
 block discarded – undo
5561 5561
 					$langs->load("contracts");
5562 5562
 
5563 5563
 					if ($usercancreatecontract) {
5564
-						print '<a class="butAction" href="' . DOL_URL_ROOT . '/contrat/card.php?action=create&amp;origin=' . $object->element . '&amp;originid=' . $object->id . '&amp;socid=' . $object->socid . '">' . $langs->trans('AddContract') . '</a>';
5564
+						print '<a class="butAction" href="'.DOL_URL_ROOT.'/contrat/card.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid.'">'.$langs->trans('AddContract').'</a>';
5565 5565
 					}
5566 5566
 				}
5567 5567
 			}
Please login to merge, or discard this patch.
core/triggers/interface_50_modEventOrganization_EventOrganization.class.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -75,13 +75,13 @@  discard block
 block discarded – undo
75 75
 			return 0; // Module not active, we do nothing
76 76
 		}
77 77
 
78
-		$error=0;
78
+		$error = 0;
79 79
 
80 80
 		// Actions
81 81
 		if ($action == 'PROJECT_VALIDATE') {
82 82
 			if (!empty($conf->global->EVENTORGANIZATION_TASK_LABEL) && !empty($object->usage_organize_event)) {
83 83
 				$taskToDo = explode("\n", $conf->global->EVENTORGANIZATION_TASK_LABEL);
84
-				if (is_array($taskToDo) && count($taskToDo)>0) {
84
+				if (is_array($taskToDo) && count($taskToDo) > 0) {
85 85
 					// Load translation files required by the page
86 86
 					$langs->loadLangs(array("eventorganization"));
87 87
 
@@ -92,8 +92,8 @@  discard block
 block discarded – undo
92 92
 						$task->fk_project = $object->id;
93 93
 						$defaultref = '';
94 94
 						$obj = empty($conf->global->PROJECT_TASK_ADDON) ? 'mod_task_simple' : $conf->global->PROJECT_TASK_ADDON;
95
-						if (!empty($conf->global->PROJECT_TASK_ADDON) && is_readable(DOL_DOCUMENT_ROOT . "/core/modules/project/task/" . $conf->global->PROJECT_TASK_ADDON . ".php")) {
96
-							require_once DOL_DOCUMENT_ROOT . "/core/modules/project/task/" . $conf->global->PROJECT_TASK_ADDON . '.php';
95
+						if (!empty($conf->global->PROJECT_TASK_ADDON) && is_readable(DOL_DOCUMENT_ROOT."/core/modules/project/task/".$conf->global->PROJECT_TASK_ADDON.".php")) {
96
+							require_once DOL_DOCUMENT_ROOT."/core/modules/project/task/".$conf->global->PROJECT_TASK_ADDON.'.php';
97 97
 							$modTask = new $obj;
98 98
 							$defaultref = $modTask->getNextValue($object->thirdparty, null);
99 99
 						}
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
 						$result = $task->create($user);
110 110
 						if ($result < 0) {
111
-							$this->errors=array_merge($this->errors, $task->errors);
111
+							$this->errors = array_merge($this->errors, $task->errors);
112 112
 							$error++;
113 113
 						}
114 114
 					}
Please login to merge, or discard this patch.
htdocs/core/ajax/fetchKnowledgeRecord.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,12 +81,12 @@
 block discarded – undo
81 81
 		$response = array();
82 82
 		while ($i < $num) {
83 83
 			$obj = $db->fetch_object($resql);
84
-			$response[] = array('title'=>$obj->question,'ref'=>$obj->ref,'answer'=>dol_escape_htmltag(preg_replace('/\\r|\\r\\n|\\n/', "", $obj->answer)),'url'=>$obj->url);
84
+			$response[] = array('title'=>$obj->question, 'ref'=>$obj->ref, 'answer'=>dol_escape_htmltag(preg_replace('/\\r|\\r\\n|\\n/', "", $obj->answer)), 'url'=>$obj->url);
85 85
 			$i++;
86 86
 		}
87 87
 	} else {
88 88
 		dol_print_error($db);
89 89
 	}
90
-	$response =json_encode($response);
90
+	$response = json_encode($response);
91 91
 	echo $response;
92 92
 }
Please login to merge, or discard this patch.
htdocs/core/modules/modMultiCurrency.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -302,7 +302,7 @@
 block discarded – undo
302 302
 
303 303
 		$multicurrency = new MultiCurrency($this->db);
304 304
 
305
-		if (! $multicurrency->checkCodeAlreadyExists($conf->currency)) {
305
+		if (!$multicurrency->checkCodeAlreadyExists($conf->currency)) {
306 306
 			$langs->loadCacheCurrencies('');
307 307
 
308 308
 			$multicurrency->code = $conf->currency;
Please login to merge, or discard this patch.