Completed
Branch develop (19db69)
by
unknown
11:46
created
htdocs/core/get_menudiv.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
 $title = $langs->trans("Menu");
85 85
 
86 86
 // URL http://mydolibarr/core/get_menudiv.php?dol_use_jmobile=1 can be used for tests
87
-$head = '<!-- Menu -->'."\n";	// This is used by DoliDroid to know page is a menu page
87
+$head = '<!-- Menu -->'."\n"; // This is used by DoliDroid to know page is a menu page
88 88
 $arrayofjs = array();
89 89
 $arrayofcss = array();
90 90
 top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss);
Please login to merge, or discard this patch.
htdocs/holiday/month_report.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@
 block discarded – undo
149 149
 $sql .= " AND cp.statut = ".Holiday::STATUS_APPROVED;
150 150
 $sql .= " AND (";
151 151
 $sql .= " (date_format(cp.date_debut, '%Y-%m') = '".$db->escape($year_month)."' OR date_format(cp.date_fin, '%Y-%m') = '".$db->escape($year_month)."')";
152
-$sql .= " OR";	// For leave over several months
152
+$sql .= " OR"; // For leave over several months
153 153
 $sql .= " (date_format(cp.date_debut, '%Y-%m') < '".$db->escape($year_month)."' AND date_format(cp.date_fin, '%Y-%m') > '".$db->escape($year_month)."') ";
154 154
 $sql .= " )";
155 155
 if (!empty($search_ref)) {
Please login to merge, or discard this patch.
htdocs/reception/card.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -916,7 +916,7 @@
 block discarded – undo
916 916
 			/**
917 917
 			 * @var array $suffix2numAsked map HTTP query parameter suffixes (like '1_0') to line indices so that
918 918
 			 *                             extrafields from HTTP query can be assigned to the correct dispatch line
919
-			*/
919
+			 */
920 920
 			$suffix2numAsked = array();
921 921
 			$dispatchLines = array();
922 922
 
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 $line_id = GETPOST('lineid', 'int') ? GETPOST('lineid', 'int') : '';
87 87
 $facid = GETPOST('facid', 'int');
88 88
 
89
-$action	= GETPOST('action', 'alpha');
89
+$action = GETPOST('action', 'alpha');
90 90
 //Select mail models is same action as presend
91 91
 if (GETPOST('modelselected')) {
92 92
 	$action = 'presend';
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
 
343 343
 		// Loop lines to calculate $totalqty
344 344
 		for ($i = 1; $i <= $num; $i++) {
345
-			$idl = "idl".$i;	// id line source
345
+			$idl = "idl".$i; // id line source
346 346
 
347 347
 			//$sub_qty = array();
348 348
 			//$subtotalqty = 0;
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
 			//$j = 0;
351 351
 			//$batch = "batchl".$i."_0";
352 352
 			//$stockLocation = "ent1".$i."_0";
353
-			$qty = "qtyl".$i;	// qty
353
+			$qty = "qtyl".$i; // qty
354 354
 
355 355
 			//reception line for product with no batch management and no multiple stock location
356 356
 			if (GETPOST($qty, 'alpha') > 0) {
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
 
365 365
 		if ($totalqty > 0) {  // There is at least one thing to ship
366 366
 			for ($i = 1; $i <= $num; $i++) {
367
-				$idl = "idl".$i;	// id line source
367
+				$idl = "idl".$i; // id line source
368 368
 				$lineToTest = '';
369 369
 				$lineId = GETPOST($idl, 'int');
370 370
 				foreach ($objectsrc->lines as $linesrc) {
@@ -973,35 +973,35 @@  discard block
 block discarded – undo
973 973
 				$reg = array();
974 974
 				if (preg_match('/^product_([0-9]+)_([0-9]+)$/i', $key, $reg)) {
975 975
 					$numAsked++;
976
-					$paramSuffix = $reg[1] . '_' . $reg[2];
976
+					$paramSuffix = $reg[1].'_'.$reg[2];
977 977
 					$suffix2numAsked[$paramSuffix] = $numAsked;
978 978
 
979 979
 					// $numline=$reg[2] + 1; // line of product
980 980
 					$numline = $numAsked;
981 981
 
982
-					$prod = "product_" . $paramSuffix;
983
-					$qty = "qty_" . $paramSuffix;
984
-					$ent = "entrepot_" . $paramSuffix;
985
-					$pu = "pu_" . $paramSuffix; // This is unit price including discount
986
-					$fk_commandefourndet = "fk_commandefourndet_" . $paramSuffix;
982
+					$prod = "product_".$paramSuffix;
983
+					$qty = "qty_".$paramSuffix;
984
+					$ent = "entrepot_".$paramSuffix;
985
+					$pu = "pu_".$paramSuffix; // This is unit price including discount
986
+					$fk_commandefourndet = "fk_commandefourndet_".$paramSuffix;
987 987
 					$dispatchLines[$numAsked] = array('paramSuffix'=>$paramSuffix, 'prod' => GETPOST($prod, 'int'), 'qty' => price2num(GETPOST($qty), 'MS'), 'ent' => GETPOST($ent, 'int'), 'pu' => price2num(GETPOST($pu), 'MU'), 'comment' => GETPOST('comment'), 'fk_commandefourndet' => GETPOST($fk_commandefourndet, 'int'));
988 988
 				}
989 989
 
990 990
 				// with batch module enabled and product with lot/serial
991 991
 				if (preg_match('/^product_batch_([0-9]+)_([0-9]+)$/i', $key, $reg)) {
992 992
 					$numAsked++;
993
-					$paramSuffix = $reg[1] . '_' . $reg[2];
993
+					$paramSuffix = $reg[1].'_'.$reg[2];
994 994
 					$suffix2numAsked[$paramSuffix] = $numAsked;
995 995
 
996 996
 					// eat-by date dispatch
997 997
 					// $numline=$reg[2] + 1; // line of product
998 998
 					$numline = $numAsked;
999 999
 
1000
-					$prod = 'product_batch_' . $paramSuffix;
1001
-					$qty = 'qty_' . $paramSuffix;
1002
-					$ent = 'entrepot_' . $paramSuffix;
1003
-					$pu = 'pu_' . $paramSuffix;
1004
-					$lot = 'lot_number_' . $paramSuffix;
1000
+					$prod = 'product_batch_'.$paramSuffix;
1001
+					$qty = 'qty_'.$paramSuffix;
1002
+					$ent = 'entrepot_'.$paramSuffix;
1003
+					$pu = 'pu_'.$paramSuffix;
1004
+					$lot = 'lot_number_'.$paramSuffix;
1005 1005
 					$dDLUO = dol_mktime(12, 0, 0, GETPOST('dluo_'.$paramSuffix.'month', 'int'), GETPOST('dluo_'.$paramSuffix.'day', 'int'), GETPOST('dluo_'.$paramSuffix.'year', 'int'));
1006 1006
 					$dDLC = dol_mktime(12, 0, 0, GETPOST('dlc_'.$paramSuffix.'month', 'int'), GETPOST('dlc_'.$paramSuffix.'day', 'int'), GETPOST('dlc_'.$paramSuffix.'year', 'int'));
1007 1007
 					$fk_commandefourndet = 'fk_commandefourndet_'.$paramSuffix;
@@ -1035,7 +1035,7 @@  discard block
 block discarded – undo
1035 1035
 			// Note that if an extrafield with the same name exists in the origin supplier order line, the value
1036 1036
 			// from the HTTP query will be ignored
1037 1037
 			foreach ($suffix2numAsked as $suffix => $n) {
1038
-				$dispatchLines[$n]['array_options'] = $extrafields->getOptionalsFromPost('commande_fournisseur_dispatch', '_' . $suffix, '');
1038
+				$dispatchLines[$n]['array_options'] = $extrafields->getOptionalsFromPost('commande_fournisseur_dispatch', '_'.$suffix, '');
1039 1039
 			}
1040 1040
 
1041 1041
 			print '<script type="text/javascript">
@@ -1099,7 +1099,7 @@  discard block
 block discarded – undo
1099 1099
 			// $objectsrc->lines contains the line of the purchase order
1100 1100
 			// $dispatchLines is list of lines with dispatching detail (with product, qty and warehouse). One purchase order line may have n of this dispatch lines.
1101 1101
 
1102
-			$arrayofpurchaselinealreadyoutput= array();
1102
+			$arrayofpurchaselinealreadyoutput = array();
1103 1103
 
1104 1104
 			// $_POST contains fk_commandefourndet_X_Y    where Y is num of product line and X is number of splitted line
1105 1105
 			$indiceAsked = 1;
@@ -1140,7 +1140,7 @@  discard block
 block discarded – undo
1140 1140
 
1141 1141
 					print '<input type="hidden" name="productl'.$indiceAsked.'" value="'.$line->fk_product.'">';
1142 1142
 
1143
-					if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1143
+					if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1144 1144
 						print '<input type="hidden" name="productid'.$indiceAsked.'" value="'.$line->fk_product.'">';
1145 1145
 
1146 1146
 						// Show product and description
@@ -1162,7 +1162,7 @@  discard block
 block discarded – undo
1162 1162
 					print '</td>';
1163 1163
 				} else {
1164 1164
 					print "<td>";
1165
-					if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1165
+					if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1166 1166
 						if ($type == 1) {
1167 1167
 							$text = img_object($langs->trans('Service'), 'service');
1168 1168
 						} else {
@@ -1191,7 +1191,7 @@  discard block
 block discarded – undo
1191 1191
 
1192 1192
 				// Qty in source purchase order line
1193 1193
 				print '<td class="center">';
1194
-				if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1194
+				if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1195 1195
 					print $line->qty;
1196 1196
 				}
1197 1197
 				print '<input type="hidden" name="fk_commandefournisseurdet'.$indiceAsked.'" value="'.$line->id.'">';
@@ -1203,7 +1203,7 @@  discard block
 block discarded – undo
1203 1203
 				// Qty already received
1204 1204
 				print '<td class="center">';
1205 1205
 				$quantityDelivered = $objectsrc->receptions[$line->id];
1206
-				if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1206
+				if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1207 1207
 					print $quantityDelivered;
1208 1208
 				}
1209 1209
 				print '<input name="qtydelivered'.$indiceAsked.'" id="qtydelivered'.$indiceAsked.'" type="hidden" value="'.$quantityDelivered.'">';
@@ -2039,7 +2039,7 @@  discard block
 block discarded – undo
2039 2039
 							$detail = $form->textwithtooltip(img_picto('', 'object_barcode').' '.$langs->trans("DetailBatchNumber"), $batchinfo);
2040 2040
 						}
2041 2041
 					}
2042
-					print $detail . '</td>';
2042
+					print $detail.'</td>';
2043 2043
 				} else {
2044 2044
 					print '<td></td>';
2045 2045
 				}
Please login to merge, or discard this patch.
htdocs/eventorganization/lib/eventorganization_conferenceorbooth.lib.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
 	$h = 0;
38 38
 	$head = array();
39 39
 
40
-	$withProjectUrl='';
41
-	if ($with_project>0) {
40
+	$withProjectUrl = '';
41
+	if ($with_project > 0) {
42 42
 		$withProjectUrl = "&withproject=1";
43 43
 	}
44 44
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 	$head[$h][2] = 'conferenceorbooth';
132 132
 	// Enable caching of conf or booth count attendees
133 133
 	$nbAttendees = 0;
134
-	$nbConferenceOrBooth= 0;
134
+	$nbConferenceOrBooth = 0;
135 135
 	require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php';
136 136
 	$cachekey = 'count_conferenceorbooth_project_'.$object->id;
137 137
 	$dataretrieved = dol_getcache($cachekey);
@@ -139,14 +139,14 @@  discard block
 block discarded – undo
139 139
 		$nbAttendees = $dataretrieved;
140 140
 	} else {
141 141
 		require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php';
142
-		$conforbooth=new ConferenceOrBooth($db);
142
+		$conforbooth = new ConferenceOrBooth($db);
143 143
 		$result = $conforbooth->fetchAll('', '', 0, 0, array('t.fk_project'=>$object->id));
144
-		if (!is_array($result) && $result<0) {
144
+		if (!is_array($result) && $result < 0) {
145 145
 			setEventMessages($conforbooth->error, $conforbooth->errors, 'errors');
146 146
 		} else {
147 147
 			$nbConferenceOrBooth = count($result);
148 148
 		}
149
-		dol_setcache($cachekey, $nbConferenceOrBooth, 120);	// If setting cache fails, this is not a problem, so we do not test result.
149
+		dol_setcache($cachekey, $nbConferenceOrBooth, 120); // If setting cache fails, this is not a problem, so we do not test result.
150 150
 	}
151 151
 	if ($nbConferenceOrBooth > 0) {
152 152
 		$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbConferenceOrBooth.'</span>';
@@ -165,14 +165,14 @@  discard block
 block discarded – undo
165 165
 		$nbAttendees = $dataretrieved;
166 166
 	} else {
167 167
 		require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php';
168
-		$attendees=new ConferenceOrBoothAttendee($db);
168
+		$attendees = new ConferenceOrBoothAttendee($db);
169 169
 		$result = $attendees->fetchAll('', '', 0, 0, array('t.fk_project'=>$object->id));
170
-		if (!is_array($result) && $result<0) {
170
+		if (!is_array($result) && $result < 0) {
171 171
 			setEventMessages($attendees->error, $attendees->errors, 'errors');
172 172
 		} else {
173 173
 			$nbAttendees = count($result);
174 174
 		}
175
-		dol_setcache($cachekey, $nbAttendees, 120);	// If setting cache fails, this is not a problem, so we do not test result.
175
+		dol_setcache($cachekey, $nbAttendees, 120); // If setting cache fails, this is not a problem, so we do not test result.
176 176
 	}
177 177
 	if ($nbAttendees > 0) {
178 178
 		$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbAttendees.'</span>';
Please login to merge, or discard this patch.
htdocs/core/modules/takepos/mod_takepos_ref_simple.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	 */
77 77
 	public function getExample()
78 78
 	{
79
-		return $this->prefix.'0-0501-0001';		// TC0-0501-0001
79
+		return $this->prefix.'0-0501-0001'; // TC0-0501-0001
80 80
 	}
81 81
 
82 82
 	/**
@@ -92,10 +92,10 @@  discard block
 block discarded – undo
92 92
 		$pryymm = '';
93 93
 		$max = '';
94 94
 
95
-		$pos_source = 0;	// POS source = Terminal ID
95
+		$pos_source = 0; // POS source = Terminal ID
96 96
 
97 97
 		// First, we get the max value
98
-		$posindice = strlen($this->prefix.$pos_source.'-____-') + 1;	// So posindice is position after TCX-YYMM-
98
+		$posindice = strlen($this->prefix.$pos_source.'-____-') + 1; // So posindice is position after TCX-YYMM-
99 99
 
100 100
 		$sql  = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max";
101 101
 		$sql .= " FROM ".MAIN_DB_PREFIX."facture";
@@ -135,10 +135,10 @@  discard block
 block discarded – undo
135 135
 	{
136 136
 		global $db;
137 137
 
138
-		$pos_source = is_object($invoice) && $invoice->pos_source > 0 ? $invoice->pos_source : 0;	// POS source = Terminal ID
138
+		$pos_source = is_object($invoice) && $invoice->pos_source > 0 ? $invoice->pos_source : 0; // POS source = Terminal ID
139 139
 
140 140
 		// First, we get the max value
141
-		$posindice = strlen($this->prefix.$pos_source.'-____-') + 1;	// So posindice is position after TCX-YYMM-
141
+		$posindice = strlen($this->prefix.$pos_source.'-____-') + 1; // So posindice is position after TCX-YYMM-
142 142
 		$sql  = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; // This is standard SQL
143 143
 		$sql .= " FROM ".MAIN_DB_PREFIX."facture";
144 144
 		$sql .= " WHERE ref LIKE '".$db->escape($this->prefix.$pos_source."-____-%")."'";
Please login to merge, or discard this patch.
htdocs/societe/ajax/company.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
 	$match = preg_grep('/('.preg_quote($htmlname, '/').'[0-9]+)/', array_keys($_GET));
106 106
 	sort($match);
107 107
 
108
-	$id = (!empty($match[0]) ? $match[0] : '');		// Take first key found into GET array with matching $htmlname123
108
+	$id = (!empty($match[0]) ? $match[0] : ''); // Take first key found into GET array with matching $htmlname123
109 109
 
110 110
 	// When used from jQuery, the search term is added as GET param "term".
111 111
 	$searchkey = (($id && GETPOST($id, 'alpha')) ? GETPOST($id, 'alpha') : (($htmlname && GETPOST($htmlname, 'alpha')) ?GETPOST($htmlname, 'alpha') : ''));
Please login to merge, or discard this patch.
htdocs/core/class/html.formactions.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -373,7 +373,7 @@
 block discarded – undo
373 373
 		$caction = new CActionComm($this->db);
374 374
 
375 375
 		// Suggest a list with manual events or all auto events
376
-		$arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot, '', 0);		// If we use param 'all' instead of 'code', there is no group by include in answer but the key 'type' of answer array contains the key for the group by.
376
+		$arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot, '', 0); // If we use param 'all' instead of 'code', there is no group by include in answer but the key 'type' of answer array contains the key for the group by.
377 377
 		if (empty($multiselect)) {
378 378
 			// Add empty line at start only if no multiselect
379 379
 			array_unshift($arraylist, '&nbsp;');
Please login to merge, or discard this patch.
htdocs/core/lib/contact.lib.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
 			} else {
81 81
 				dol_print_error($db);
82 82
 			}
83
-			dol_setcache($cachekey, $nbProject, 120);	// If setting cache fails, this is not a problem, so we do not test result.
83
+			dol_setcache($cachekey, $nbProject, 120); // If setting cache fails, this is not a problem, so we do not test result.
84 84
 		}
85 85
 		$head[$tab][0] = DOL_URL_ROOT.'/contact/project.php?id='.$object->id;
86 86
 		$head[$tab][1] = $langs->trans("Projects");
Please login to merge, or discard this patch.
htdocs/adherents/class/subscription.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -235,7 +235,7 @@
 block discarded – undo
235 235
 				$this->dateh          = $this->db->jdate($obj->dateh);
236 236
 				$this->datef          = $this->db->jdate($obj->datef);
237 237
 				$this->amount         = $obj->subscription;
238
-				$this->note           = $obj->note_public;	// deprecated
238
+				$this->note           = $obj->note_public; // deprecated
239 239
 				$this->note_public    = $obj->note_public;
240 240
 				$this->fk_bank        = $obj->fk_bank;
241 241
 				return 1;
Please login to merge, or discard this patch.