Completed
Branch develop (6b48e0)
by
unknown
14:33
created
htdocs/document.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
  */
139 139
 
140 140
 // If we have a hash public (hashp), we guess the original_file.
141
-$ecmfile='';
141
+$ecmfile = '';
142 142
 if (!empty($hashp)) {
143 143
 	include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php';
144 144
 	$ecmfile = new EcmFiles($db);
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 }
197 197
 
198 198
 // Security: Delete string ../ or ..\ into $original_file
199
-$original_file = preg_replace('/\.\.+/', '..', $original_file);	// Replace '... or more' with '..'
199
+$original_file = preg_replace('/\.\.+/', '..', $original_file); // Replace '... or more' with '..'
200 200
 $original_file = str_replace('../', '/', $original_file);
201 201
 $original_file = str_replace('..\\', '/', $original_file);
202 202
 
Please login to merge, or discard this patch.
htdocs/core/class/html.formldap.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,8 +124,8 @@
 block discarded – undo
124 124
 			$htmlname = 'activesynchro';
125 125
 		}
126 126
 
127
-		$dolibarr2ldaplabel = $langs->trans("DolibarrToLDAP") . (($scriptonly == 1 || $scriptonly == 3) ? " (".$langs->trans("SupportedForLDAPExportScriptOnly").")" : "");
128
-		$ldap2dolibarrlabel = $langs->trans("LDAPToDolibarr") . (($scriptonly == 2 || $scriptonly == 3) ? " (".$langs->trans("SupportedForLDAPImportScriptOnly").")" : "");
127
+		$dolibarr2ldaplabel = $langs->trans("DolibarrToLDAP").(($scriptonly == 1 || $scriptonly == 3) ? " (".$langs->trans("SupportedForLDAPExportScriptOnly").")" : "");
128
+		$ldap2dolibarrlabel = $langs->trans("LDAPToDolibarr").(($scriptonly == 2 || $scriptonly == 3) ? " (".$langs->trans("SupportedForLDAPImportScriptOnly").")" : "");
129 129
 
130 130
 		$arraylist = array(
131 131
 			Ldap::SYNCHRO_NONE				=> $langs->trans("No"),
Please login to merge, or discard this patch.
htdocs/product/inventory/ajax/searchfrombarcode.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	$result = $db->query($sql);
79 79
 	if ($result) {
80 80
 		$nbline = $db->num_rows($result);
81
-		for ($i=0; $i < $nbline; $i++) {
81
+		for ($i = 0; $i < $nbline; $i++) {
82 82
 			$object = $db->fetch_object($result);
83 83
 			if (($mode == "barcode" && $barcode == $object->barcode) || ($mode == "lotserial" && $barcode == $object->batch)) {
84 84
 				$warehouse->fetch(0, $product["Warehouse"]);
@@ -88,22 +88,22 @@  discard block
 block discarded – undo
88 88
 					$fk_product = $object->fk_product;
89 89
 					$reelqty = $object->reel;
90 90
 
91
-					$objectreturn = array('fk_warehouse'=>$warehouseid,'fk_product'=>$fk_product,'reelqty'=>$reelqty);
91
+					$objectreturn = array('fk_warehouse'=>$warehouseid, 'fk_product'=>$fk_product, 'reelqty'=>$reelqty);
92 92
 				}
93 93
 			}
94 94
 		}
95 95
 		if ($warehousefound < 1) {
96
-			$response = array('status'=>'error','errorcode'=>'NotFound','message'=>'No warehouse found for barcode'.$barcode);
96
+			$response = array('status'=>'error', 'errorcode'=>'NotFound', 'message'=>'No warehouse found for barcode'.$barcode);
97 97
 		} elseif ($warehousefound > 1) {
98
-			$response = array('status'=>'error','errorcode'=>'TooManyWarehouse','message'=>'Too many warehouse found');
98
+			$response = array('status'=>'error', 'errorcode'=>'TooManyWarehouse', 'message'=>'Too many warehouse found');
99 99
 		} else {
100
-			$response = array('status'=>'success','message'=>'Warehouse found','object'=>$objectreturn);
100
+			$response = array('status'=>'success', 'message'=>'Warehouse found', 'object'=>$objectreturn);
101 101
 		}
102 102
 	} else {
103
-		$response = array('status'=>'error','errorcode'=>'NotFound','message'=>"No results found for barcode");
103
+		$response = array('status'=>'error', 'errorcode'=>'NotFound', 'message'=>"No results found for barcode");
104 104
 	}
105 105
 } else {
106
-	$response = array('status'=>'error','errorcode'=>'ActionError','message'=>"Error on action");
106
+	$response = array('status'=>'error', 'errorcode'=>'ActionError', 'message'=>"Error on action");
107 107
 }
108 108
 
109 109
 if ($action == "addnewlineproduct") {
@@ -122,12 +122,12 @@  discard block
 block discarded – undo
122 122
 
123 123
 		$result = $inventoryline->create($user);
124 124
 		if ($result > 0) {
125
-			$response = array('status'=>'success','message'=>'Success on creating line','id_line'=>$result);
125
+			$response = array('status'=>'success', 'message'=>'Success on creating line', 'id_line'=>$result);
126 126
 		} else {
127
-			$response = array('status'=>'error','errorcode'=>'ErrorCreation','message'=>"Error on line creation");
127
+			$response = array('status'=>'error', 'errorcode'=>'ErrorCreation', 'message'=>"Error on line creation");
128 128
 		}
129 129
 	} else {
130
-		$response = array('status'=>'error','errorcode'=>'NoIdForInventory','message'=>"No id for inventory");
130
+		$response = array('status'=>'error', 'errorcode'=>'NoIdForInventory', 'message'=>"No id for inventory");
131 131
 	}
132 132
 }
133 133
 
Please login to merge, or discard this patch.
htdocs/core/multicompany_page.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
 $title = $langs->trans("Multicompanies");
82 82
 
83 83
 // URL http://mydolibarr/core/multicompany_page?dol_use_jmobile=1 can be used for tests
84
-$head = '<!-- Multicompany selection -->'."\n";	// This is used by DoliDroid to know page is a multicompany selection page
84
+$head = '<!-- Multicompany selection -->'."\n"; // This is used by DoliDroid to know page is a multicompany selection page
85 85
 $arrayofjs = array();
86 86
 $arrayofcss = array();
87 87
 top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss);
Please login to merge, or discard this patch.
htdocs/core/bookmarks_page.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
 $title = $langs->trans("Bookmarks");
59 59
 
60 60
 // URL http://mydolibarr/core/bookmarks_page?dol_use_jmobile=1 can be used for tests
61
-$head = '<!-- Bookmarks -->'."\n";	// This is used by DoliDroid to know page is a bookmark selection page
61
+$head = '<!-- Bookmarks -->'."\n"; // This is used by DoliDroid to know page is a bookmark selection page
62 62
 $arrayofjs = array();
63 63
 $arrayofcss = array();
64 64
 top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss);
Please login to merge, or discard this patch.
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   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 $line_id = GETPOSTINT('lineid') ? GETPOSTINT('lineid') : 0;
87 87
 $facid = GETPOSTINT('facid');
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 = GETPOSTINT($idl);
370 370
 				foreach ($objectsrc->lines as $linesrc) {
@@ -974,35 +974,35 @@  discard block
 block discarded – undo
974 974
 				$reg = array();
975 975
 				if (preg_match('/^product_([0-9]+)_([0-9]+)$/i', $key, $reg)) {
976 976
 					$numAsked++;
977
-					$paramSuffix = $reg[1] . '_' . $reg[2];
977
+					$paramSuffix = $reg[1].'_'.$reg[2];
978 978
 					$suffix2numAsked[$paramSuffix] = $numAsked;
979 979
 
980 980
 					// $numline=$reg[2] + 1; // line of product
981 981
 					$numline = $numAsked;
982 982
 
983
-					$prod = "product_" . $paramSuffix;
984
-					$qty = "qty_" . $paramSuffix;
985
-					$ent = "entrepot_" . $paramSuffix;
986
-					$pu = "pu_" . $paramSuffix; // This is unit price including discount
987
-					$fk_commandefourndet = "fk_commandefourndet_" . $paramSuffix;
983
+					$prod = "product_".$paramSuffix;
984
+					$qty = "qty_".$paramSuffix;
985
+					$ent = "entrepot_".$paramSuffix;
986
+					$pu = "pu_".$paramSuffix; // This is unit price including discount
987
+					$fk_commandefourndet = "fk_commandefourndet_".$paramSuffix;
988 988
 					$dispatchLines[$numAsked] = array('paramSuffix' => $paramSuffix, 'prod' => GETPOSTINT($prod), 'qty' => price2num(GETPOST($qty), 'MS'), 'ent' => GETPOSTINT($ent), 'pu' => price2num(GETPOST($pu), 'MU'), 'comment' => GETPOST('comment'), 'fk_commandefourndet' => GETPOSTINT($fk_commandefourndet));
989 989
 				}
990 990
 
991 991
 				// with batch module enabled and product with lot/serial
992 992
 				if (preg_match('/^product_batch_([0-9]+)_([0-9]+)$/i', $key, $reg)) {
993 993
 					$numAsked++;
994
-					$paramSuffix = $reg[1] . '_' . $reg[2];
994
+					$paramSuffix = $reg[1].'_'.$reg[2];
995 995
 					$suffix2numAsked[$paramSuffix] = $numAsked;
996 996
 
997 997
 					// eat-by date dispatch
998 998
 					// $numline=$reg[2] + 1; // line of product
999 999
 					$numline = $numAsked;
1000 1000
 
1001
-					$prod = 'product_batch_' . $paramSuffix;
1002
-					$qty = 'qty_' . $paramSuffix;
1003
-					$ent = 'entrepot_' . $paramSuffix;
1004
-					$pu = 'pu_' . $paramSuffix;
1005
-					$lot = 'lot_number_' . $paramSuffix;
1001
+					$prod = 'product_batch_'.$paramSuffix;
1002
+					$qty = 'qty_'.$paramSuffix;
1003
+					$ent = 'entrepot_'.$paramSuffix;
1004
+					$pu = 'pu_'.$paramSuffix;
1005
+					$lot = 'lot_number_'.$paramSuffix;
1006 1006
 					$dDLUO = dol_mktime(12, 0, 0, GETPOSTINT('dluo_'.$paramSuffix.'month'), GETPOSTINT('dluo_'.$paramSuffix.'day'), GETPOSTINT('dluo_'.$paramSuffix.'year'));
1007 1007
 					$dDLC = dol_mktime(12, 0, 0, GETPOSTINT('dlc_'.$paramSuffix.'month'), GETPOSTINT('dlc_'.$paramSuffix.'day'), GETPOSTINT('dlc_'.$paramSuffix.'year'));
1008 1008
 					$fk_commandefourndet = 'fk_commandefourndet_'.$paramSuffix;
@@ -1036,7 +1036,7 @@  discard block
 block discarded – undo
1036 1036
 			// Note that if an extrafield with the same name exists in the origin supplier order line, the value
1037 1037
 			// from the HTTP query will be ignored
1038 1038
 			foreach ($suffix2numAsked as $suffix => $n) {
1039
-				$dispatchLines[$n]['array_options'] = $extrafields->getOptionalsFromPost('commande_fournisseur_dispatch', '_' . $suffix, '');
1039
+				$dispatchLines[$n]['array_options'] = $extrafields->getOptionalsFromPost('commande_fournisseur_dispatch', '_'.$suffix, '');
1040 1040
 			}
1041 1041
 
1042 1042
 			print '<script type="text/javascript">
@@ -1141,7 +1141,7 @@  discard block
 block discarded – undo
1141 1141
 
1142 1142
 					print '<input type="hidden" name="productl'.$indiceAsked.'" value="'.$line->fk_product.'">';
1143 1143
 
1144
-					if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1144
+					if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1145 1145
 						print '<input type="hidden" name="productid'.$indiceAsked.'" value="'.$line->fk_product.'">';
1146 1146
 
1147 1147
 						// Show product and description
@@ -1163,7 +1163,7 @@  discard block
 block discarded – undo
1163 1163
 					print '</td>';
1164 1164
 				} else {
1165 1165
 					print "<td>";
1166
-					if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1166
+					if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1167 1167
 						if ($type == 1) {
1168 1168
 							$text = img_object($langs->trans('Service'), 'service');
1169 1169
 						} else {
@@ -1192,7 +1192,7 @@  discard block
 block discarded – undo
1192 1192
 
1193 1193
 				// Qty in source purchase order line
1194 1194
 				print '<td class="center">';
1195
-				if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1195
+				if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1196 1196
 					print $line->qty;
1197 1197
 				}
1198 1198
 				print '<input type="hidden" name="fk_commandefournisseurdet'.$indiceAsked.'" value="'.$line->id.'">';
@@ -1204,7 +1204,7 @@  discard block
 block discarded – undo
1204 1204
 				// Qty already received
1205 1205
 				print '<td class="center">';
1206 1206
 				$quantityDelivered = $objectsrc->receptions[$line->id];
1207
-				if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1207
+				if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1208 1208
 					print $quantityDelivered;
1209 1209
 				}
1210 1210
 				print '<input name="qtydelivered'.$indiceAsked.'" id="qtydelivered'.$indiceAsked.'" type="hidden" value="'.$quantityDelivered.'">';
@@ -2040,7 +2040,7 @@  discard block
 block discarded – undo
2040 2040
 							$detail = $form->textwithtooltip(img_picto('', 'object_barcode').' '.$langs->trans("DetailBatchNumber"), $batchinfo);
2041 2041
 						}
2042 2042
 					}
2043
-					print $detail . '</td>';
2043
+					print $detail.'</td>';
2044 2044
 				} else {
2045 2045
 					print '<td></td>';
2046 2046
 				}
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.