Passed
Branch develop (5ec324)
by
unknown
37:40
created
htdocs/core/class/html.form.class.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 					$ret .= '<input type="text" id="'.$htmlname.'" name="'.$htmlname.'" value="'.($valuetoshow != '' ?price($valuetoshow) : '').'"'.($tmp[1] ? ' size="'.$tmp[1].'"' : '').' autofocus>';
240 240
 				} elseif (preg_match('/^(checkbox)/', $typeofdata)) {
241 241
 					$tmp = explode(':', $typeofdata);
242
-					$ret .= '<input type="checkbox" id="' . $htmlname . '" name="' . $htmlname . '" value="' . $value . '"' . ($tmp[1] ? $tmp[1] : '') . '/>';
242
+					$ret .= '<input type="checkbox" id="'.$htmlname.'" name="'.$htmlname.'" value="'.$value.'"'.($tmp[1] ? $tmp[1] : '').'/>';
243 243
 				} elseif (preg_match('/^text/', $typeofdata) || preg_match('/^note/', $typeofdata)) {	// if wysiwyg is enabled $typeofdata = 'ckeditor'
244 244
 					$tmp = explode(':', $typeofdata);
245 245
 					$cols = $tmp[2];
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
 					$ret .= ($value != '' ? price($value, '', $langs, 0, -1, -1, $conf->currency) : '');
304 304
 				} elseif (preg_match('/^(checkbox)/', $typeofdata)) {
305 305
 					$tmp = explode(':', $typeofdata);
306
-					$ret .= '<input type="checkbox" disabled id="' . $htmlname . '" name="' . $htmlname . '" value="' . $value . '"' . ($tmp[1] ? $tmp[1] : '') . '/>';
306
+					$ret .= '<input type="checkbox" disabled id="'.$htmlname.'" name="'.$htmlname.'" value="'.$value.'"'.($tmp[1] ? $tmp[1] : '').'/>';
307 307
 				} elseif (preg_match('/^text/', $typeofdata) || preg_match('/^note/', $typeofdata)) {
308 308
 					$ret .= dol_htmlentitiesbr($value);
309 309
 				} elseif (preg_match('/^safehtmlstring/', $typeofdata)) {
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
 		if (!$htmltext) {
590 590
 			return $text;
591 591
 		}
592
-		$direction = (int) $direction;	// For backward compatibility when $direction was set to '' instead of 0
592
+		$direction = (int) $direction; // For backward compatibility when $direction was set to '' instead of 0
593 593
 
594 594
 		$tag = 'td';
595 595
 		if ($notabs == 2) {
@@ -902,7 +902,7 @@  discard block
 block discarded – undo
902 902
 
903 903
 					$countryArray[$i]['rowid'] = $obj->rowid;
904 904
 					$countryArray[$i]['code_iso'] = $obj->code_iso;
905
-					$countryArray[$i]['code_iso3'] 	= $obj->code_iso3;
905
+					$countryArray[$i]['code_iso3'] = $obj->code_iso3;
906 906
 					$countryArray[$i]['label'] = ($obj->code_iso && $langs->transnoentitiesnoconv("Country".$obj->code_iso) != "Country".$obj->code_iso ? $langs->transnoentitiesnoconv("Country".$obj->code_iso) : ($obj->label != '-' ? $obj->label : ''));
907 907
 					$countryArray[$i]['favorite'] = $obj->favorite;
908 908
 					$countryArray[$i]['eec'] = $obj->eec;
@@ -1253,7 +1253,7 @@  discard block
 block discarded – undo
1253 1253
 				$ajaxoptions = array();
1254 1254
 			}
1255 1255
 
1256
-			require_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
1256
+			require_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
1257 1257
 
1258 1258
 			// No immediate load of all database
1259 1259
 			$placeholder = '';
@@ -2486,7 +2486,7 @@  discard block
 block discarded – undo
2486 2486
 				$soc = new Societe($db);
2487 2487
 				$result = $soc->fetch($socid);
2488 2488
 				if ($result > 0 && !empty($soc->default_lang)) {
2489
-					$sql .= " AND pl.lang='" . $this->db->escape($soc->default_lang) . "'";
2489
+					$sql .= " AND pl.lang='".$this->db->escape($soc->default_lang)."'";
2490 2490
 				} else {
2491 2491
 					$sql .= " AND pl.lang='".$this->db->escape($langs->getDefaultLang())."'";
2492 2492
 				}
@@ -2541,7 +2541,7 @@  discard block
 block discarded – undo
2541 2541
 				if (!empty($conf->global->MAIN_MULTILANGS)) {
2542 2542
 					$sql .= " OR pl.label LIKE '".$this->db->escape($prefix.$crit)."%'";
2543 2543
 				}
2544
-				if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES) && ! empty($socid)) {
2544
+				if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES) && !empty($socid)) {
2545 2545
 					$sql .= " OR pcp.ref_customer LIKE '".$this->db->escape($prefix.$crit)."%'";
2546 2546
 				}
2547 2547
 				if (!empty($conf->global->PRODUCT_AJAX_SEARCH_ON_DESCRIPTION)) {
@@ -2822,8 +2822,8 @@  discard block
 block discarded – undo
2822 2822
 		}
2823 2823
 		$opt .= '>';
2824 2824
 		$opt .= $objp->ref;
2825
-		if (! empty($objp->custref)) {
2826
-			$opt.= ' (' . $objp->custref . ')';
2825
+		if (!empty($objp->custref)) {
2826
+			$opt .= ' ('.$objp->custref.')';
2827 2827
 		}
2828 2828
 		if ($outbarcode) {
2829 2829
 			$opt .= ' ('.$outbarcode.')';
@@ -2834,8 +2834,8 @@  discard block
 block discarded – undo
2834 2834
 		}
2835 2835
 
2836 2836
 		$objRef = $objp->ref;
2837
-		if (! empty($objp->custref)) {
2838
-			$objRef .= ' (' . $objp->custref . ')';
2837
+		if (!empty($objp->custref)) {
2838
+			$objRef .= ' ('.$objp->custref.')';
2839 2839
 		}
2840 2840
 		if (!empty($filterkey) && $filterkey != '') {
2841 2841
 			$objRef = preg_replace('/('.preg_quote($filterkey, '/').')/i', '<strong>$1</strong>', $objRef, 1);
@@ -4214,7 +4214,7 @@  discard block
 block discarded – undo
4214 4214
 					$i++;
4215 4215
 				}
4216 4216
 				print "</select>";
4217
-				if ($user->admin  && empty($noinfoadmin)) {
4217
+				if ($user->admin && empty($noinfoadmin)) {
4218 4218
 					print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
4219 4219
 				}
4220 4220
 
@@ -4730,7 +4730,7 @@  discard block
 block discarded – undo
4730 4730
 
4731 4731
 					if ($input['type'] == 'text') {
4732 4732
 						$more .= '<div class="tagtr"><div class="tagtd'.(empty($input['tdclass']) ? '' : (' '.$input['tdclass'])).'">'.$input['label'].'</div><div class="tagtd"><input type="text" class="flat'.$morecss.'" id="'.$input['name'].'" name="'.$input['name'].'"'.$size.' value="'.$input['value'].'"'.$moreattr.' /></div></div>'."\n";
4733
-					} elseif ($input['type'] == 'password')	{
4733
+					} elseif ($input['type'] == 'password') {
4734 4734
 						$more .= '<div class="tagtr"><div class="tagtd'.(empty($input['tdclass']) ? '' : (' '.$input['tdclass'])).'">'.$input['label'].'</div><div class="tagtd"><input type="password" class="flat'.$morecss.'" id="'.$input['name'].'" name="'.$input['name'].'"'.$size.' value="'.$input['value'].'"'.$moreattr.' /></div></div>'."\n";
4735 4735
 					} elseif ($input['type'] == 'select') {
4736 4736
 						if (empty($morecss)) {
@@ -6873,7 +6873,7 @@  discard block
 block discarded – undo
6873 6873
 			// Activate the auto complete using ajax call.
6874 6874
 			$out .= ajax_autocompleter($preselectedvalue, $htmlname, $urlforajaxcall, $urloption, $conf->global->$confkeyforautocompletemode, 0, array());
6875 6875
 			$out .= '<style type="text/css">.ui-autocomplete { z-index: 1003; }</style>';
6876
-			$out .= '<input type="text" class="'.$morecss.'"'.($disabled ? ' disabled="disabled"' : '').' name="search_'.$htmlname.'" id="search_'.$htmlname.'" value="'.$selected_input_value.'"'.($placeholder ? ' placeholder="'.dol_escape_htmltag($placeholder).'"' : '') .' />';
6876
+			$out .= '<input type="text" class="'.$morecss.'"'.($disabled ? ' disabled="disabled"' : '').' name="search_'.$htmlname.'" id="search_'.$htmlname.'" value="'.$selected_input_value.'"'.($placeholder ? ' placeholder="'.dol_escape_htmltag($placeholder).'"' : '').' />';
6877 6877
 		} else {
6878 6878
 			// Immediate load of table record. Note: filter is inside $objecttmp->filter
6879 6879
 			$out .= $this->selectForFormsList($objecttmp, $htmlname, $preselectedvalue, $showempty, $searchkey, $placeholder, $morecss, $moreparams, $forcecombo, 0, $disabled);
@@ -7279,7 +7279,7 @@  discard block
 block discarded – undo
7279 7279
 	public static function selectArrayAjax($htmlname, $url, $id = '', $moreparam = '', $moreparamtourl = '', $disabled = 0, $minimumInputLength = 1, $morecss = '', $callurlonselect = 0, $placeholder = '', $acceptdelayedhtml = 0)
7280 7280
 	{
7281 7281
 		global $conf, $langs;
7282
-		global $delayedhtmlcontent;	// Will be used later outside of this function
7282
+		global $delayedhtmlcontent; // Will be used later outside of this function
7283 7283
 
7284 7284
 		// TODO Use an internal dolibarr component instead of select2
7285 7285
 		if (empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) && !defined('REQUIRE_JQUERY_MULTISELECT')) {
@@ -7383,7 +7383,7 @@  discard block
 block discarded – undo
7383 7383
 	public static function selectArrayFilter($htmlname, $array, $id = '', $moreparam = '', $disableFiltering = 0, $disabled = 0, $minimumInputLength = 1, $morecss = '', $callurlonselect = 0, $placeholder = '', $acceptdelayedhtml = 0)
7384 7384
 	{
7385 7385
 		global $conf, $langs;
7386
-		global $delayedhtmlcontent;	// Will be used later outside of this function
7386
+		global $delayedhtmlcontent; // Will be used later outside of this function
7387 7387
 
7388 7388
 		// TODO Use an internal dolibarr component instead of select2
7389 7389
 		if (empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) && !defined('REQUIRE_JQUERY_MULTISELECT')) {
@@ -7982,14 +7982,14 @@  discard block
 block discarded – undo
7982 7982
 				print '<div id="'.$key.'list"'.(empty($conf->use_javascript_ajax) ? '' : ' style="display:none"').'>';
7983 7983
 
7984 7984
 				if (!empty($conf->global->MAIN_LINK_BY_REF_IN_LINKTO)) {
7985
-					print '<br><form action="' . $_SERVER["PHP_SELF"] . '" method="POST" name="formlinkedbyref' . $key . '">';
7986
-					print '<input type="hidden" name="id" value="' . $object->id . '">';
7985
+					print '<br><form action="'.$_SERVER["PHP_SELF"].'" method="POST" name="formlinkedbyref'.$key.'">';
7986
+					print '<input type="hidden" name="id" value="'.$object->id.'">';
7987 7987
 					print '<input type="hidden" name="action" value="addlinkbyref">';
7988
-					print '<input type="hidden" name="addlink" value="' . $key . '">';
7988
+					print '<input type="hidden" name="addlink" value="'.$key.'">';
7989 7989
 					print '<table class="noborder">';
7990 7990
 					print '<tr>';
7991
-					print '<td>' . $langs->trans("Ref") . '</td>';
7992
-					print '<td><input type="text" name="reftolinkto" value="' . dol_escape_htmltag(GETPOST('reftolinkto', 'alpha')) . '">&nbsp;<input type="submit" class="button valignmiddle" value="' . $langs->trans('ToLink') . '">&nbsp;<input type="submit" class="button" name="cancel" value="' . $langs->trans('Cancel') . '"></td>';
7991
+					print '<td>'.$langs->trans("Ref").'</td>';
7992
+					print '<td><input type="text" name="reftolinkto" value="'.dol_escape_htmltag(GETPOST('reftolinkto', 'alpha')).'">&nbsp;<input type="submit" class="button valignmiddle" value="'.$langs->trans('ToLink').'">&nbsp;<input type="submit" class="button" name="cancel" value="'.$langs->trans('Cancel').'"></td>';
7993 7993
 					print '</tr>';
7994 7994
 					print '</table>';
7995 7995
 					print '</form>';
@@ -8468,7 +8468,7 @@  discard block
 block discarded – undo
8468 8468
 				}
8469 8469
 			}
8470 8470
 			$email = $object->email;
8471
-		} elseif ($modulepart == 'contact')	{
8471
+		} elseif ($modulepart == 'contact') {
8472 8472
 			$dir = $conf->societe->multidir_output[$entity].'/contact';
8473 8473
 			if (!empty($object->photo)) {
8474 8474
 				if (dolIsAllowedForPreview($object->photo)) {
@@ -8503,7 +8503,7 @@  discard block
 block discarded – undo
8503 8503
 			}
8504 8504
 			$email = $object->email;
8505 8505
 			$capture = 'user';
8506
-		} elseif ($modulepart == 'memberphoto')	{
8506
+		} elseif ($modulepart == 'memberphoto') {
8507 8507
 			$dir = $conf->adherent->dir_output;
8508 8508
 			if (!empty($object->photo)) {
8509 8509
 				if (dolIsAllowedForPreview($object->photo)) {
@@ -8576,7 +8576,7 @@  discard block
 block discarded – undo
8576 8576
 				}
8577 8577
 			} else {
8578 8578
 				$nophoto = '/public/theme/common/nophoto.png';
8579
-				$defaultimg = 'identicon';		// For gravatar
8579
+				$defaultimg = 'identicon'; // For gravatar
8580 8580
 				if (in_array($modulepart, array('societe', 'userphoto', 'contact', 'memberphoto'))) {	// For modules that need a special image when photo not found
8581 8581
 					if ($modulepart == 'societe' || ($modulepart == 'memberphoto' && strpos($object->morphy, 'mor')) !== false) {
8582 8582
 						$nophoto = 'company';
Please login to merge, or discard this patch.
htdocs/accountancy/bookkeeping/listbyaccount.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -39,29 +39,29 @@  discard block
 block discarded – undo
39 39
 $langs->loadLangs(array("accountancy", "compta"));
40 40
 
41 41
 $action = GETPOST('action', 'aZ09');
42
-$search_date_startyear =  GETPOST('search_date_startyear', 'int');
43
-$search_date_startmonth =  GETPOST('search_date_startmonth', 'int');
44
-$search_date_startday =  GETPOST('search_date_startday', 'int');
45
-$search_date_endyear =  GETPOST('search_date_endyear', 'int');
46
-$search_date_endmonth =  GETPOST('search_date_endmonth', 'int');
47
-$search_date_endday =  GETPOST('search_date_endday', 'int');
42
+$search_date_startyear = GETPOST('search_date_startyear', 'int');
43
+$search_date_startmonth = GETPOST('search_date_startmonth', 'int');
44
+$search_date_startday = GETPOST('search_date_startday', 'int');
45
+$search_date_endyear = GETPOST('search_date_endyear', 'int');
46
+$search_date_endmonth = GETPOST('search_date_endmonth', 'int');
47
+$search_date_endday = GETPOST('search_date_endday', 'int');
48 48
 $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);
49 49
 $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
50 50
 $search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int'));
51
-$search_date_export_startyear =  GETPOST('search_date_export_startyear', 'int');
52
-$search_date_export_startmonth =  GETPOST('search_date_export_startmonth', 'int');
53
-$search_date_export_startday =  GETPOST('search_date_export_startday', 'int');
54
-$search_date_export_endyear =  GETPOST('search_date_export_endyear', 'int');
55
-$search_date_export_endmonth =  GETPOST('search_date_export_endmonth', 'int');
56
-$search_date_export_endday =  GETPOST('search_date_export_endday', 'int');
51
+$search_date_export_startyear = GETPOST('search_date_export_startyear', 'int');
52
+$search_date_export_startmonth = GETPOST('search_date_export_startmonth', 'int');
53
+$search_date_export_startday = GETPOST('search_date_export_startday', 'int');
54
+$search_date_export_endyear = GETPOST('search_date_export_endyear', 'int');
55
+$search_date_export_endmonth = GETPOST('search_date_export_endmonth', 'int');
56
+$search_date_export_endday = GETPOST('search_date_export_endday', 'int');
57 57
 $search_date_export_start = dol_mktime(0, 0, 0, $search_date_export_startmonth, $search_date_export_startday, $search_date_export_startyear);
58 58
 $search_date_export_end = dol_mktime(23, 59, 59, $search_date_export_endmonth, $search_date_export_endday, $search_date_export_endyear);
59
-$search_date_validation_startyear =  GETPOST('search_date_validation_startyear', 'int');
60
-$search_date_validation_startmonth =  GETPOST('search_date_validation_startmonth', 'int');
61
-$search_date_validation_startday =  GETPOST('search_date_validation_startday', 'int');
62
-$search_date_validation_endyear =  GETPOST('search_date_validation_endyear', 'int');
63
-$search_date_validation_endmonth =  GETPOST('search_date_validation_endmonth', 'int');
64
-$search_date_validation_endday =  GETPOST('search_date_validation_endday', 'int');
59
+$search_date_validation_startyear = GETPOST('search_date_validation_startyear', 'int');
60
+$search_date_validation_startmonth = GETPOST('search_date_validation_startmonth', 'int');
61
+$search_date_validation_startday = GETPOST('search_date_validation_startday', 'int');
62
+$search_date_validation_endyear = GETPOST('search_date_validation_endyear', 'int');
63
+$search_date_validation_endmonth = GETPOST('search_date_validation_endmonth', 'int');
64
+$search_date_validation_endday = GETPOST('search_date_validation_endday', 'int');
65 65
 $search_date_validation_start = dol_mktime(0, 0, 0, $search_date_validation_startmonth, $search_date_validation_startday, $search_date_validation_startyear);
66 66
 $search_date_validation_end = dol_mktime(23, 59, 59, $search_date_validation_endmonth, $search_date_validation_endday, $search_date_validation_endyear);
67 67
 
@@ -670,8 +670,8 @@  discard block
 block discarded – undo
670 670
 	$accountg = length_accountg($line->numero_compte);
671 671
 	//if (empty($accountg)) $accountg = '-';
672 672
 
673
-	$colspan = 0;			// colspan before field 'label of operation'
674
-	$colspanend = 3;		// colspan after debit/credit
673
+	$colspan = 0; // colspan before field 'label of operation'
674
+	$colspanend = 3; // colspan after debit/credit
675 675
 	if (!empty($arrayfields['t.piece_num']['checked'])) { $colspan++; }
676 676
 	if (!empty($arrayfields['t.code_journal']['checked'])) { $colspan++; }
677 677
 	if (!empty($arrayfields['t.doc_date']['checked'])) { $colspan++; }
@@ -820,7 +820,7 @@  discard block
 block discarded – undo
820 820
 		} elseif ($line->doc_type == 'bank') {
821 821
 			print $objectstatic->getNomUrl(1);
822 822
 			$bank_ref = strstr($line->doc_ref, '-');
823
-			print " " . $bank_ref;
823
+			print " ".$bank_ref;
824 824
 		} else {
825 825
 			print $line->doc_ref;
826 826
 		}
@@ -899,7 +899,7 @@  discard block
 block discarded – undo
899 899
 	print '<td class="nowraponall center">';
900 900
 	if (empty($line->date_export) && empty($line->date_validation)) {
901 901
 		if ($user->rights->accounting->mouvements->creer) {
902
-			print '<a class="editfielda paddingleft marginrightonly" href="' . DOL_URL_ROOT . '/accountancy/bookkeeping/card.php?piece_num=' . $line->piece_num . $param . '&page=' . $page . ($sortfield ? '&sortfield=' . $sortfield : '') . ($sortorder ? '&sortorder=' . $sortorder : '') . '">' . img_edit() . '</a>';
902
+			print '<a class="editfielda paddingleft marginrightonly" href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?piece_num='.$line->piece_num.$param.'&page='.$page.($sortfield ? '&sortfield='.$sortfield : '').($sortorder ? '&sortorder='.$sortorder : '').'">'.img_edit().'</a>';
903 903
 		}
904 904
 	}
905 905
 	if (empty($line->date_validation)) {
Please login to merge, or discard this patch.
htdocs/accountancy/bookkeeping/listbysubaccount.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -48,20 +48,20 @@  discard block
 block discarded – undo
48 48
 $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);
49 49
 $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
50 50
 $search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int'));
51
-$search_date_export_startyear =  GETPOST('search_date_export_startyear', 'int');
52
-$search_date_export_startmonth =  GETPOST('search_date_export_startmonth', 'int');
53
-$search_date_export_startday =  GETPOST('search_date_export_startday', 'int');
54
-$search_date_export_endyear =  GETPOST('search_date_export_endyear', 'int');
55
-$search_date_export_endmonth =  GETPOST('search_date_export_endmonth', 'int');
56
-$search_date_export_endday =  GETPOST('search_date_export_endday', 'int');
51
+$search_date_export_startyear = GETPOST('search_date_export_startyear', 'int');
52
+$search_date_export_startmonth = GETPOST('search_date_export_startmonth', 'int');
53
+$search_date_export_startday = GETPOST('search_date_export_startday', 'int');
54
+$search_date_export_endyear = GETPOST('search_date_export_endyear', 'int');
55
+$search_date_export_endmonth = GETPOST('search_date_export_endmonth', 'int');
56
+$search_date_export_endday = GETPOST('search_date_export_endday', 'int');
57 57
 $search_date_export_start = dol_mktime(0, 0, 0, $search_date_export_startmonth, $search_date_export_startday, $search_date_export_startyear);
58 58
 $search_date_export_end = dol_mktime(23, 59, 59, $search_date_export_endmonth, $search_date_export_endday, $search_date_export_endyear);
59
-$search_date_validation_startyear =  GETPOST('search_date_validation_startyear', 'int');
60
-$search_date_validation_startmonth =  GETPOST('search_date_validation_startmonth', 'int');
61
-$search_date_validation_startday =  GETPOST('search_date_validation_startday', 'int');
62
-$search_date_validation_endyear =  GETPOST('search_date_validation_endyear', 'int');
63
-$search_date_validation_endmonth =  GETPOST('search_date_validation_endmonth', 'int');
64
-$search_date_validation_endday =  GETPOST('search_date_validation_endday', 'int');
59
+$search_date_validation_startyear = GETPOST('search_date_validation_startyear', 'int');
60
+$search_date_validation_startmonth = GETPOST('search_date_validation_startmonth', 'int');
61
+$search_date_validation_startday = GETPOST('search_date_validation_startday', 'int');
62
+$search_date_validation_endyear = GETPOST('search_date_validation_endyear', 'int');
63
+$search_date_validation_endmonth = GETPOST('search_date_validation_endmonth', 'int');
64
+$search_date_validation_endday = GETPOST('search_date_validation_endday', 'int');
65 65
 $search_date_validation_start = dol_mktime(0, 0, 0, $search_date_validation_startmonth, $search_date_validation_startday, $search_date_validation_startyear);
66 66
 $search_date_validation_end = dol_mktime(23, 59, 59, $search_date_validation_endmonth, $search_date_validation_endday, $search_date_validation_endyear);
67 67
 
@@ -672,8 +672,8 @@  discard block
 block discarded – undo
672 672
 	$accountg = length_accounta($line->subledger_account);
673 673
 	//if (empty($accountg)) $accountg = '-';
674 674
 
675
-	$colspan = 0;			// colspan before field 'label of operation'
676
-	$colspanend = 3;		// colspan after debit/credit
675
+	$colspan = 0; // colspan before field 'label of operation'
676
+	$colspanend = 3; // colspan after debit/credit
677 677
 	if (!empty($arrayfields['t.piece_num']['checked'])) { $colspan++; }
678 678
 	if (!empty($arrayfields['t.code_journal']['checked'])) { $colspan++; }
679 679
 	if (!empty($arrayfields['t.doc_date']['checked'])) { $colspan++; }
@@ -831,7 +831,7 @@  discard block
 block discarded – undo
831 831
 		} elseif ($line->doc_type == 'bank') {
832 832
 			print $objectstatic->getNomUrl(1);
833 833
 			$bank_ref = strstr($line->doc_ref, '-');
834
-			print " " . $bank_ref;
834
+			print " ".$bank_ref;
835 835
 		} else {
836 836
 			print $line->doc_ref;
837 837
 		}
@@ -910,7 +910,7 @@  discard block
 block discarded – undo
910 910
 	print '<td class="nowraponall center">';
911 911
 	if (empty($line->date_export) && empty($line->date_validation)) {
912 912
 		if ($user->rights->accounting->mouvements->creer) {
913
-			print '<a class="editfielda paddingleft marginrightonly" href="' . DOL_URL_ROOT . '/accountancy/bookkeeping/card.php?piece_num=' . $line->piece_num . $param . '&page=' . $page . ($sortfield ? '&sortfield=' . $sortfield : '') . ($sortorder ? '&sortorder=' . $sortorder : '') . '">' . img_edit() . '</a>';
913
+			print '<a class="editfielda paddingleft marginrightonly" href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?piece_num='.$line->piece_num.$param.'&page='.$page.($sortfield ? '&sortfield='.$sortfield : '').($sortorder ? '&sortorder='.$sortorder : '').'">'.img_edit().'</a>';
914 914
 		}
915 915
 	}
916 916
 	if (empty($line->date_validation)) {
Please login to merge, or discard this patch.
htdocs/product/class/productbatch.class.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
 
45 45
 	public $tms = '';
46 46
 	public $fk_product_stock;
47
-	public $sellby = '';	// dlc
48
-	public $eatby = '';		// dmd/dluo
47
+	public $sellby = ''; // dlc
48
+	public $eatby = ''; // dmd/dluo
49 49
 	public $batch = '';
50 50
 	public $qty;
51 51
 	public $warehouseid;
@@ -89,15 +89,15 @@  discard block
 block discarded – undo
89 89
 		// Insert request
90 90
 		$sql = "INSERT INTO ".MAIN_DB_PREFIX."product_batch (";
91 91
 		$sql .= "fk_product_stock,";
92
-		$sql .= "sellby,";				// no more used
93
-		$sql .= "eatby,";				// no more used
92
+		$sql .= "sellby,"; // no more used
93
+		$sql .= "eatby,"; // no more used
94 94
 		$sql .= "batch,";
95 95
 		$sql .= "qty,";
96 96
 		$sql .= "import_key";
97 97
 		$sql .= ") VALUES (";
98 98
 		$sql .= " ".(!isset($this->fk_product_stock) ? 'NULL' : $this->fk_product_stock).",";
99
-		$sql .= " ".(!isset($this->sellby) || dol_strlen($this->sellby) == 0 ? 'NULL' : "'".$this->db->idate($this->sellby)."'").",";		// no more used
100
-		$sql .= " ".(!isset($this->eatby) || dol_strlen($this->eatby) == 0 ? 'NULL' : "'".$this->db->idate($this->eatby)."'").",";			// no more used
99
+		$sql .= " ".(!isset($this->sellby) || dol_strlen($this->sellby) == 0 ? 'NULL' : "'".$this->db->idate($this->sellby)."'").","; // no more used
100
+		$sql .= " ".(!isset($this->eatby) || dol_strlen($this->eatby) == 0 ? 'NULL' : "'".$this->db->idate($this->eatby)."'").","; // no more used
101 101
 		$sql .= " ".(!isset($this->batch) ? 'NULL' : "'".$this->db->escape($this->batch)."'").",";
102 102
 		$sql .= " ".(!isset($this->qty) ? 'NULL' : $this->qty).",";
103 103
 		$sql .= " ".(!isset($this->import_key) ? 'NULL' : "'".$this->db->escape($this->import_key)."'")."";
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
 		// TODO : use product lifo and fifo when product will implement it
467 467
 		if ($fk_product > 0) { $sql .= "pl.eatby ASC, pl.sellby ASC, "; }
468 468
 		$sql .= "t.eatby ASC, t.sellby ASC ";
469
-		$sql .= ", t.qty ".(!empty($conf->global->DO_NOT_TRY_TO_DEFRAGMENT_STOCKS_WAREHOUSE)?'DESC':'ASC'); // Note : qty ASC is important for expedition card, to avoid stock fragmentation
469
+		$sql .= ", t.qty ".(!empty($conf->global->DO_NOT_TRY_TO_DEFRAGMENT_STOCKS_WAREHOUSE) ? 'DESC' : 'ASC'); // Note : qty ASC is important for expedition card, to avoid stock fragmentation
470 470
 
471 471
 		dol_syslog("productbatch::findAll", LOG_DEBUG);
472 472
 		$resql = $db->query($sql);
Please login to merge, or discard this patch.
htdocs/salaries/class/paymentsalary.class.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -560,7 +560,7 @@
 block discarded – undo
560 560
 							}
561 561
 							if ($result <= 0) {
562 562
 								$this->error = $this->db->lasterror();
563
-								dol_syslog(get_class($this) . '::addPaymentToBank ' . $this->error);
563
+								dol_syslog(get_class($this).'::addPaymentToBank '.$this->error);
564 564
 								$error++;
565 565
 							}
566 566
 						}
Please login to merge, or discard this patch.
Braces   +81 added lines, -26 removed lines patch added patch discarded remove patch
@@ -139,15 +139,34 @@  discard block
 block discarded – undo
139 139
 		}
140 140
 
141 141
 		// Clean parameters
142
-		if (isset($this->fk_salary)) $this->fk_salary = (int) $this->fk_salary;
143
-		if (isset($this->amount)) $this->amount = trim($this->amount);
144
-		if (isset($this->fk_typepayment)) $this->fk_typepayment = (int) $this->fk_typepayment;
145
-		if (isset($this->num_paiement)) $this->num_paiement = trim($this->num_paiement); // deprecated
146
-		if (isset($this->num_payment)) $this->num_payment = trim($this->num_payment);
147
-		if (isset($this->note)) $this->note = trim($this->note);
148
-		if (isset($this->fk_bank)) $this->fk_bank = (int) $this->fk_bank;
149
-		if (isset($this->fk_user_author)) $this->fk_user_author = (int) $this->fk_user_author;
150
-		if (isset($this->fk_user_modif)) $this->fk_user_modif = (int) $this->fk_user_modif;
142
+		if (isset($this->fk_salary)) {
143
+			$this->fk_salary = (int) $this->fk_salary;
144
+		}
145
+		if (isset($this->amount)) {
146
+			$this->amount = trim($this->amount);
147
+		}
148
+		if (isset($this->fk_typepayment)) {
149
+			$this->fk_typepayment = (int) $this->fk_typepayment;
150
+		}
151
+		if (isset($this->num_paiement)) {
152
+			$this->num_paiement = trim($this->num_paiement);
153
+		}
154
+		// deprecated
155
+		if (isset($this->num_payment)) {
156
+			$this->num_payment = trim($this->num_payment);
157
+		}
158
+		if (isset($this->note)) {
159
+			$this->note = trim($this->note);
160
+		}
161
+		if (isset($this->fk_bank)) {
162
+			$this->fk_bank = (int) $this->fk_bank;
163
+		}
164
+		if (isset($this->fk_user_author)) {
165
+			$this->fk_user_author = (int) $this->fk_user_author;
166
+		}
167
+		if (isset($this->fk_user_modif)) {
168
+			$this->fk_user_modif = (int) $this->fk_user_modif;
169
+		}
151 170
 
152 171
 		$totalamount = 0;
153 172
 		foreach ($this->amounts as $key => $value) {  // How payment is dispatch
@@ -158,7 +177,10 @@  discard block
 block discarded – undo
158 177
 		$totalamount = price2num($totalamount);
159 178
 
160 179
 		// Check parameters
161
-		if ($totalamount == 0) return -1; // On accepte les montants negatifs pour les rejets de prelevement mais pas null
180
+		if ($totalamount == 0) {
181
+			return -1;
182
+		}
183
+		// On accepte les montants negatifs pour les rejets de prelevement mais pas null
162 184
 
163 185
 
164 186
 		$this->db->begin();
@@ -195,7 +217,9 @@  discard block
 block discarded – undo
195 217
 							$remaintopay = price2num($contrib->amount - $paiement - $creditnotes - $deposits, 'MT');
196 218
 							if ($remaintopay == 0) {
197 219
 								$result = $contrib->set_paid($user);
198
-							} else dol_syslog("Remain to pay for conrib ".$contribid." not null. We do nothing.");
220
+							} else {
221
+								dol_syslog("Remain to pay for conrib ".$contribid." not null. We do nothing.");
222
+							}
199 223
 						}
200 224
 					}
201 225
 				}
@@ -205,7 +229,9 @@  discard block
 block discarded – undo
205 229
 		}
206 230
 
207 231
 		$result = $this->call_trigger('PAYMENTSALARY_CREATE', $user);
208
-		if ($result < 0) $error++;
232
+		if ($result < 0) {
233
+			$error++;
234
+		}
209 235
 
210 236
 		if ($totalamount != 0 && !$error) {
211 237
 			$this->amount = $totalamount;
@@ -300,15 +326,34 @@  discard block
 block discarded – undo
300 326
 
301 327
 		// Clean parameters
302 328
 
303
-		if (isset($this->fk_salary)) $this->fk_salary = (int) $this->fk_salary;
304
-		if (isset($this->amount)) $this->amount = trim($this->amount);
305
-		if (isset($this->fk_typepayment)) $this->fk_typepayment = (int) $this->fk_typepayment;
306
-		if (isset($this->num_paiement)) $this->num_paiement = trim($this->num_paiement); // deprecated
307
-		if (isset($this->num_payment)) $this->num_payment = trim($this->num_payment);
308
-		if (isset($this->note)) $this->note = trim($this->note);
309
-		if (isset($this->fk_bank)) $this->fk_bank = (int) $this->fk_bank;
310
-		if (isset($this->fk_user_author)) $this->fk_user_author = (int) $this->fk_user_author;
311
-		if (isset($this->fk_user_modif)) $this->fk_user_modif = (int) $this->fk_user_modif;
329
+		if (isset($this->fk_salary)) {
330
+			$this->fk_salary = (int) $this->fk_salary;
331
+		}
332
+		if (isset($this->amount)) {
333
+			$this->amount = trim($this->amount);
334
+		}
335
+		if (isset($this->fk_typepayment)) {
336
+			$this->fk_typepayment = (int) $this->fk_typepayment;
337
+		}
338
+		if (isset($this->num_paiement)) {
339
+			$this->num_paiement = trim($this->num_paiement);
340
+		}
341
+		// deprecated
342
+		if (isset($this->num_payment)) {
343
+			$this->num_payment = trim($this->num_payment);
344
+		}
345
+		if (isset($this->note)) {
346
+			$this->note = trim($this->note);
347
+		}
348
+		if (isset($this->fk_bank)) {
349
+			$this->fk_bank = (int) $this->fk_bank;
350
+		}
351
+		if (isset($this->fk_user_author)) {
352
+			$this->fk_user_author = (int) $this->fk_user_author;
353
+		}
354
+		if (isset($this->fk_user_modif)) {
355
+			$this->fk_user_modif = (int) $this->fk_user_modif;
356
+		}
312 357
 
313 358
 		// Check parameters
314 359
 		// Put here code to add control on parameters values
@@ -679,7 +724,9 @@  discard block
 block discarded – undo
679 724
 
680 725
 		$result = '';
681 726
 
682
-		if (empty($this->ref)) $this->ref = $this->lib;
727
+		if (empty($this->ref)) {
728
+			$this->ref = $this->lib;
729
+		}
683 730
 
684 731
 		$label = img_picto('', $this->picto).' <u>'.$langs->trans("SalaryPayment").'</u>';
685 732
 		$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
@@ -688,7 +735,9 @@  discard block
 block discarded – undo
688 735
 			$reg = array();
689 736
 			if (preg_match('/^\((.*)\)$/i', $this->label, $reg)) {
690 737
 				// Label generique car entre parentheses. On l'affiche en le traduisant
691
-				if ($reg[1] == 'paiement') $reg[1] = 'Payment';
738
+				if ($reg[1] == 'paiement') {
739
+					$reg[1] = 'Payment';
740
+				}
692 741
 				$labeltoshow = $langs->trans($reg[1]);
693 742
 			}
694 743
 			$label .= '<br><b>'.$langs->trans('Label').':</b> '.$labeltoshow;
@@ -701,9 +750,15 @@  discard block
 block discarded – undo
701 750
 			$link = '<a href="'.DOL_URL_ROOT.'/salaries/payment_salary/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
702 751
 			$linkend = '</a>';
703 752
 
704
-			if ($withpicto) $result .= ($link.img_object($label, 'payment', 'class="classfortooltip"').$linkend.' ');
705
-			if ($withpicto && $withpicto != 2) $result .= ' ';
706
-			if ($withpicto != 2) $result .= $link.($maxlen ?dol_trunc($this->ref, $maxlen) : $this->ref).$linkend;
753
+			if ($withpicto) {
754
+				$result .= ($link.img_object($label, 'payment', 'class="classfortooltip"').$linkend.' ');
755
+			}
756
+			if ($withpicto && $withpicto != 2) {
757
+				$result .= ' ';
758
+			}
759
+			if ($withpicto != 2) {
760
+				$result .= $link.($maxlen ?dol_trunc($this->ref, $maxlen) : $this->ref).$linkend;
761
+			}
707 762
 		}
708 763
 
709 764
 		return $result;
Please login to merge, or discard this patch.
htdocs/expedition/class/api_shipments.class.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -622,15 +622,15 @@
 block discarded – undo
622 622
 	*/
623 623
 
624 624
 	/**
625
-	* Close a shipment (Classify it as "Delivered")
626
-	*
627
-	* @param   int     $id             Expedition ID
628
-	* @param   int     $notrigger      Disabled triggers
629
-	*
630
-	* @url POST    {id}/close
631
-	*
632
-	* @return  int
633
-	*/
625
+	 * Close a shipment (Classify it as "Delivered")
626
+	 *
627
+	 * @param   int     $id             Expedition ID
628
+	 * @param   int     $notrigger      Disabled triggers
629
+	 *
630
+	 * @url POST    {id}/close
631
+	 *
632
+	 * @return  int
633
+	 */
634 634
 	public function close($id, $notrigger = 0)
635 635
 	{
636 636
 		if (!DolibarrApiAccess::$user->rights->expedition->creer) {
Please login to merge, or discard this patch.
htdocs/compta/bank/class/account.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -412,13 +412,13 @@
 block discarded – undo
412 412
 		$sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_url (";
413 413
 		$sql .= "fk_bank";
414 414
 		$sql .= ", url_id";
415
-		$sql .= ", url";		// deprecated
415
+		$sql .= ", url"; // deprecated
416 416
 		$sql .= ", label";
417 417
 		$sql .= ", type";
418 418
 		$sql .= ") VALUES (";
419 419
 		$sql .= " ".((int) $line_id);
420 420
 		$sql .= ", ".((int) $url_id);
421
-		$sql .= ", '".$this->db->escape($url)."'";		// dperecated
421
+		$sql .= ", '".$this->db->escape($url)."'"; // dperecated
422 422
 		$sql .= ", '".$this->db->escape($label)."'";
423 423
 		$sql .= ", '".$this->db->escape($type)."'";
424 424
 		$sql .= ")";
Please login to merge, or discard this patch.
htdocs/compta/bank/bankentries_list.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
 
394 394
 $companystatic = new Societe($db);
395 395
 $bankaccountstatic = new Account($db);
396
-$userstatic= new User($db);
396
+$userstatic = new User($db);
397 397
 
398 398
 $banktransferstatic = new BonPrelevement($db);
399 399
 $societestatic = new Societe($db);
@@ -609,18 +609,18 @@  discard block
 block discarded – undo
609 609
 	$sql .= " AND b.rappro = ".((int) $search_conciliated);
610 610
 }
611 611
 if ($search_thirdparty_user) {
612
-	$sql.= " AND (b.rowid IN ";
613
-	$sql.= " 	( SELECT bu.fk_bank FROM ".MAIN_DB_PREFIX."bank_url AS bu";
614
-	$sql.= "	 JOIN ".MAIN_DB_PREFIX."bank AS b2 ON b2.rowid = bu.fk_bank";
615
-	$sql.= "	 JOIN ".MAIN_DB_PREFIX."user AS subUser ON (bu.type = 'user' AND bu.url_id = subUser.rowid)";
616
-	$sql.= "	  WHERE ". natural_search(array("subUser.firstname", "subUser.lastname"), $search_thirdparty_user, '', 1)."))";
617
-
618
-	$sql.= " OR b.rowid IN ";
619
-	$sql.= " 	( SELECT bu.fk_bank FROM ".MAIN_DB_PREFIX."bank_url AS bu";
620
-	$sql.= "	 JOIN ".MAIN_DB_PREFIX."bank AS b2 ON b2.rowid = bu.fk_bank";
621
-	$sql.= "	 JOIN ".MAIN_DB_PREFIX."societe AS subSoc ON (bu.type = 'company' AND bu.url_id = subSoc.rowid)";
622
-	$sql.= "	  WHERE ". natural_search(array("subSoc.nom"), $search_thirdparty_user, '', 1);
623
-	$sql.= ")";
612
+	$sql .= " AND (b.rowid IN ";
613
+	$sql .= " 	( SELECT bu.fk_bank FROM ".MAIN_DB_PREFIX."bank_url AS bu";
614
+	$sql .= "	 JOIN ".MAIN_DB_PREFIX."bank AS b2 ON b2.rowid = bu.fk_bank";
615
+	$sql .= "	 JOIN ".MAIN_DB_PREFIX."user AS subUser ON (bu.type = 'user' AND bu.url_id = subUser.rowid)";
616
+	$sql .= "	  WHERE ".natural_search(array("subUser.firstname", "subUser.lastname"), $search_thirdparty_user, '', 1)."))";
617
+
618
+	$sql .= " OR b.rowid IN ";
619
+	$sql .= " 	( SELECT bu.fk_bank FROM ".MAIN_DB_PREFIX."bank_url AS bu";
620
+	$sql .= "	 JOIN ".MAIN_DB_PREFIX."bank AS b2 ON b2.rowid = bu.fk_bank";
621
+	$sql .= "	 JOIN ".MAIN_DB_PREFIX."societe AS subSoc ON (bu.type = 'company' AND bu.url_id = subSoc.rowid)";
622
+	$sql .= "	  WHERE ".natural_search(array("subSoc.nom"), $search_thirdparty_user, '', 1);
623
+	$sql .= ")";
624 624
 }
625 625
 if ($search_description) {
626 626
 	$search_description_to_use = $search_description;
@@ -1344,7 +1344,7 @@  discard block
 block discarded – undo
1344 1344
 				}
1345 1345
 			}
1346 1346
 			print '<td class="tdoverflowmax300"'.($titletoshow ? ' title="'.dol_escape_htmltag($titletoshow).'"' : '').'>';
1347
-			print $labeltoshow;	// Already escaped
1347
+			print $labeltoshow; // Already escaped
1348 1348
 
1349 1349
 			// Add info about links after description
1350 1350
 			$cachebankaccount = array();
Please login to merge, or discard this patch.
htdocs/comm/propal/card.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -932,7 +932,7 @@  discard block
 block discarded – undo
932 932
 						if (count($prodcustprice->lines) > 0) {
933 933
 							$pu_ht = price($prodcustprice->lines[0]->price);
934 934
 							$pu_ttc = price($prodcustprice->lines[0]->price_ttc);
935
-							$price_min =  price($prodcustprice->lines[0]->price_min);
935
+							$price_min = price($prodcustprice->lines[0]->price_min);
936 936
 							$price_base_type = $prodcustprice->lines[0]->price_base_type;
937 937
 							$tva_tx = ($prodcustprice->lines[0]->default_vat_code ? $prodcustprice->lines[0]->tva_tx.' ('.$prodcustprice->lines[0]->default_vat_code.' )' : $prodcustprice->lines[0]->tva_tx);
938 938
 							if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) {
@@ -1028,8 +1028,8 @@  discard block
 block discarded – undo
1028 1028
 				}
1029 1029
 
1030 1030
 				//If text set in desc is the same as product description (as now it's preloaded) whe add it only one time
1031
-				if ($product_desc==$desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) {
1032
-					$product_desc='';
1031
+				if ($product_desc == $desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) {
1032
+					$product_desc = '';
1033 1033
 				}
1034 1034
 
1035 1035
 				if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) {
@@ -2529,7 +2529,7 @@  discard block
 block discarded – undo
2529 2529
 				}
2530 2530
 
2531 2531
 				// ReOpen
2532
-				if ( (( ! empty($conf->global->PROPAL_REOPEN_UNSIGNED_ONLY) && $object->statut == Propal::STATUS_NOTSIGNED) || (empty($conf->global->PROPAL_REOPEN_UNSIGNED_ONLY) && ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED))) && $usercanclose) {
2532
+				if (((!empty($conf->global->PROPAL_REOPEN_UNSIGNED_ONLY) && $object->statut == Propal::STATUS_NOTSIGNED) || (empty($conf->global->PROPAL_REOPEN_UNSIGNED_ONLY) && ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED))) && $usercanclose) {
2533 2533
 					print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=reopen'.(empty($conf->global->MAIN_JUMP_TAG) ? '' : '#reopen').'"';
2534 2534
 					print '>'.$langs->trans('ReOpen').'</a>';
2535 2535
 				}
Please login to merge, or discard this patch.