Passed
Branch develop (d85e4e)
by Laurent
84:36
created
htdocs/core/lib/propal.lib.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 {
166 166
 	global $conf, $db, $langs, $user;
167 167
 
168
-	$result= '';
168
+	$result = '';
169 169
 
170 170
 	if (empty($conf->propal->enabled) || empty($user->rights->propal->lire)) {
171 171
 		return '';
@@ -218,9 +218,9 @@  discard block
 block discarded – undo
218 218
 		$result = '<div class="div-table-responsive-no-min">';
219 219
 		$result .= '<table class="noborder nohover centpercent">';
220 220
 
221
-		$result .=  '<tr class="liste_titre">';
222
-		$result .=  '<td colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("Proposals").'</td>';
223
-		$result .=  '</tr>';
221
+		$result .= '<tr class="liste_titre">';
222
+		$result .= '<td colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("Proposals").'</td>';
223
+		$result .= '</tr>';
224 224
 
225 225
 		foreach ($listofstatus as $status) {
226 226
 			$dataseries[] = array($propalstatic->LibStatut($status, 1), (isset($vals[$status]) ? (int) $vals[$status] : 0));
@@ -241,16 +241,16 @@  discard block
 block discarded – undo
241 241
 			}
242 242
 
243 243
 			if (empty($conf->use_javascript_ajax)) {
244
-				$result .=  '<tr class="oddeven">';
245
-				$result .=  '<td>'.$propalstatic->LibStatut($status, 0).'</td>';
246
-				$result .=  '<td class="right"><a href="list.php?statut='.$status.'">'.(isset($vals[$status]) ? $vals[$status] : 0).'</a></td>';
247
-				$result .=  "</tr>\n";
244
+				$result .= '<tr class="oddeven">';
245
+				$result .= '<td>'.$propalstatic->LibStatut($status, 0).'</td>';
246
+				$result .= '<td class="right"><a href="list.php?statut='.$status.'">'.(isset($vals[$status]) ? $vals[$status] : 0).'</a></td>';
247
+				$result .= "</tr>\n";
248 248
 			}
249 249
 		}
250 250
 
251 251
 		if ($conf->use_javascript_ajax) {
252
-			$result .=  '<tr>';
253
-			$result .=  '<td align="center" colspan="2">';
252
+			$result .= '<tr>';
253
+			$result .= '<td align="center" colspan="2">';
254 254
 
255 255
 			include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
256 256
 			$dolgraph = new DolGraph();
@@ -262,10 +262,10 @@  discard block
 block discarded – undo
262 262
 			$dolgraph->setHeight('150');
263 263
 			$dolgraph->setWidth('300');
264 264
 			$dolgraph->draw('idgraphthirdparties');
265
-			$result .=  $dolgraph->show($total ? 0 : 1);
265
+			$result .= $dolgraph->show($total ? 0 : 1);
266 266
 
267
-			$result .=  '</td>';
268
-			$result .=  '</tr>';
267
+			$result .= '</td>';
268
+			$result .= '</tr>';
269 269
 		}
270 270
 
271 271
 		//if ($totalinprocess != $total)
@@ -276,14 +276,14 @@  discard block
 block discarded – undo
276 276
 		//	print '</tr>';
277 277
 		//}
278 278
 
279
-		$result .=  '<tr class="liste_total">';
280
-		$result .=  '<td>'.$langs->trans("Total").'</td>';
281
-		$result .=  '<td class="right">'.$total.'</td>';
282
-		$result .=  '</tr>';
279
+		$result .= '<tr class="liste_total">';
280
+		$result .= '<td>'.$langs->trans("Total").'</td>';
281
+		$result .= '<td class="right">'.$total.'</td>';
282
+		$result .= '</tr>';
283 283
 
284
-		$result .=  '</table>';
285
-		$result .=  '</div>';
286
-		$result .=  '<br>';
284
+		$result .= '</table>';
285
+		$result .= '</div>';
286
+		$result .= '<br>';
287 287
 	} else {
288 288
 		dol_print_error($db);
289 289
 	}
Please login to merge, or discard this patch.
htdocs/contrat/note.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -180,7 +180,7 @@
 block discarded – undo
180 180
 
181 181
 	//print '<br>';
182 182
 
183
-	$cssclass='titlefield';
183
+	$cssclass = 'titlefield';
184 184
 	include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
185 185
 
186 186
 	print dol_get_fiche_end();
Please login to merge, or discard this patch.
htdocs/compta/paiement/card.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -117,8 +117,8 @@  discard block
 block discarded – undo
117 117
 				$outputlangs->setDefaultLang(GETPOST('lang_id', 'aZ09'));
118 118
 			}
119 119
 
120
-			$hidedetails = ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0;
121
-			$hidedesc = ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0;
120
+			$hidedetails = !empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0;
121
+			$hidedesc = !empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0;
122 122
 			$hideref = !empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0;
123 123
 
124 124
 			$sql = 'SELECT f.rowid as facid';
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 			}
162 162
 		}
163 163
 
164
-		if (! $errors) {
164
+		if (!$errors) {
165 165
 			header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id);
166 166
 			exit;
167 167
 		}
Please login to merge, or discard this patch.
htdocs/compta/journal/sellsjournal.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
 $sql .= " FROM ".MAIN_DB_PREFIX."facturedet as fd";
122 122
 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = fd.fk_product";
123 123
 if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) {
124
-	$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity);
124
+	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity);
125 125
 }
126 126
 $sql .= " JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = fd.fk_facture";
127 127
 $sql .= " JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc";
Please login to merge, or discard this patch.
htdocs/core/modules/modService.class.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -154,9 +154,9 @@  discard block
 block discarded – undo
154 154
 			'p.fk_product_type'=>'Type', 'p.tosell'=>"OnSell", 'p.tobuy'=>"OnBuy",
155 155
 			'p.description'=>"Description", 'p.url'=>"PublicUrl",
156 156
 			'p.customcode'=>'CustomCode', 'p.fk_country'=>'IDCountry',
157
-			$alias_product_perentity . '.accountancy_code_sell'=>"ProductAccountancySellCode", $alias_product_perentity . '.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode",
158
-			$alias_product_perentity . '.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", $alias_product_perentity . '.accountancy_code_buy'=>"ProductAccountancyBuyCode",
159
-			$alias_product_perentity . '.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", $alias_product_perentity . '.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode",
157
+			$alias_product_perentity.'.accountancy_code_sell'=>"ProductAccountancySellCode", $alias_product_perentity.'.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode",
158
+			$alias_product_perentity.'.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", $alias_product_perentity.'.accountancy_code_buy'=>"ProductAccountancyBuyCode",
159
+			$alias_product_perentity.'.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", $alias_product_perentity.'.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode",
160 160
 			'p.note'=>"NotePrivate", 'p.note_public'=>'NotePublic',
161 161
 			'p.weight'=>"Weight", 'p.length'=>"Length", 'p.width'=>"Width", 'p.height'=>"Height", 'p.surface'=>"Surface", 'p.volume'=>"Volume",
162 162
 			'p.duration'=>"Duration",
@@ -197,8 +197,8 @@  discard block
 block discarded – undo
197 197
 			'p.ref'=>"Text", 'p.label'=>"Text",
198 198
 			'p.fk_product_type'=>'Numeric', 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean",
199 199
 			'p.description'=>"Text", 'p.url'=>"Text",
200
-			$alias_product_perentity . '.accountancy_code_sell'=>"Text", $alias_product_perentity . '.accountancy_code_sell_intra'=>"Text", $alias_product_perentity . '.accountancy_code_sell_export'=>"Text",
201
-			$alias_product_perentity . '.accountancy_code_buy'=>"Text", $alias_product_perentity . '.accountancy_code_buy_intra'=>"Text", $alias_product_perentity . '.accountancy_code_buy_export'=>"Text",
200
+			$alias_product_perentity.'.accountancy_code_sell'=>"Text", $alias_product_perentity.'.accountancy_code_sell_intra'=>"Text", $alias_product_perentity.'.accountancy_code_sell_export'=>"Text",
201
+			$alias_product_perentity.'.accountancy_code_buy'=>"Text", $alias_product_perentity.'.accountancy_code_buy_intra'=>"Text", $alias_product_perentity.'.accountancy_code_buy_export'=>"Text",
202 202
 			'p.note'=>"Text", 'p.note_public'=>"Text",
203 203
 			'p.weight'=>"Numeric", 'p.length'=>"Numeric", 'p.width'=>"Numeric", 'p.height'=>"Numeric", 'p.surface'=>"Numeric", 'p.volume'=>"Numeric",
204 204
 			'p.customcode'=>'Text',
@@ -257,9 +257,9 @@  discard block
 block discarded – undo
257 257
 			$this->export_dependencies_array[$r] = array('category'=>'p.rowid');
258 258
 		}
259 259
 		$this->export_sql_start[$r] = 'SELECT DISTINCT ';
260
-		$this->export_sql_end[$r]  = ' FROM '.MAIN_DB_PREFIX.'product as p';
260
+		$this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p';
261 261
 		if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) {
262
-			$this->export_sql_end[$r] .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity);
262
+			$this->export_sql_end[$r] .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity);
263 263
 		}
264 264
 		if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) {
265 265
 			$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'categorie as cat ON cp.fk_categorie = cat.rowid';
@@ -352,9 +352,9 @@  discard block
 block discarded – undo
352 352
 				$this->export_permission[$r] = array(array("service", "export"));
353 353
 				$this->export_fields_array[$r] = array(
354 354
 					'p.rowid'=>"Id", 'p.ref'=>"Ref", 'p.label'=>"Label", 'p.description'=>"Description", 'p.url'=>"PublicUrl",
355
-					$alias_product_perentity . '.accountancy_code_sell'=>"ProductAccountancySellCode", $alias_product_perentity . '.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode",
356
-					$alias_product_perentity . '.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", $alias_product_perentity . '.accountancy_code_buy'=>"ProductAccountancyBuyCode",
357
-					$alias_product_perentity . '.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", $alias_product_perentity . '.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode",
355
+					$alias_product_perentity.'.accountancy_code_sell'=>"ProductAccountancySellCode", $alias_product_perentity.'.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode",
356
+					$alias_product_perentity.'.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", $alias_product_perentity.'.accountancy_code_buy'=>"ProductAccountancyBuyCode",
357
+					$alias_product_perentity.'.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", $alias_product_perentity.'.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode",
358 358
 					'p.note'=>"NotePrivate", 'p.note_public'=>'NotePublic',
359 359
 					'p.weight'=>"Weight", 'p.length'=>"Length", 'p.surface'=>"Surface", 'p.volume'=>"Volume", 'p.customcode'=>'CustomCode',
360 360
 					'p.price_base_type'=>"PriceBase", 'p.price'=>"UnitPriceHT", 'p.price_ttc'=>"UnitPriceTTC", 'p.tva_tx'=>'VATRate', 'p.tosell'=>"OnSell",
@@ -369,8 +369,8 @@  discard block
 block discarded – undo
369 369
 				$this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('pa.qty'=>'Qty', 'pa.incdec'=>'ComposedProductIncDecStock'));
370 370
 				$this->export_TypeFields_array[$r] = array(
371 371
 					'p.ref'=>"Text", 'p.label'=>"Text", 'p.description'=>"Text", 'p.url'=>"Text",
372
-					$alias_product_perentity . 'p.accountancy_code_sell'=>"Text", $alias_product_perentity . '.accountancy_code_sell_intra'=>"Text", $alias_product_perentity . '.accountancy_code_sell_export'=>"Text",
373
-					$alias_product_perentity . 'p.accountancy_code_buy'=>"Text", $alias_product_perentity . '.accountancy_code_buy_intra'=>"Text", $alias_product_perentity . '.accountancy_code_buy_export'=>"Text",
372
+					$alias_product_perentity.'p.accountancy_code_sell'=>"Text", $alias_product_perentity.'.accountancy_code_sell_intra'=>"Text", $alias_product_perentity.'.accountancy_code_sell_export'=>"Text",
373
+					$alias_product_perentity.'p.accountancy_code_buy'=>"Text", $alias_product_perentity.'.accountancy_code_buy_intra'=>"Text", $alias_product_perentity.'.accountancy_code_buy_export'=>"Text",
374 374
 					'p.note'=>"Text", 'p.note_public'=>"Text",
375 375
 					'p.weight'=>"Numeric", 'p.length'=>"Numeric", 'p.surface'=>"Numeric", 'p.volume'=>"Numeric", 'p.customcode'=>'Text',
376 376
 					'p.price_base_type'=>"Text", 'p.price'=>"Numeric", 'p.price_ttc'=>"Numeric", 'p.tva_tx'=>'Numeric', 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean",
@@ -385,8 +385,8 @@  discard block
 block discarded – undo
385 385
 				$this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('pa.qty'=>'Numeric'));
386 386
 				$this->export_entities_array[$r] = array(
387 387
 					'p.rowid'=>"virtualproduct", 'p.ref'=>"virtualproduct", 'p.label'=>"virtualproduct", 'p.description'=>"virtualproduct", 'p.url'=>"virtualproduct",
388
-					$alias_product_perentity . '.accountancy_code_sell'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_sell_intra'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_sell_export'=>'virtualproduct',
389
-					$alias_product_perentity . '.accountancy_code_buy'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_buy_intra'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_buy_export'=>'virtualproduct',
388
+					$alias_product_perentity.'.accountancy_code_sell'=>'virtualproduct', $alias_product_perentity.'.accountancy_code_sell_intra'=>'virtualproduct', $alias_product_perentity.'.accountancy_code_sell_export'=>'virtualproduct',
389
+					$alias_product_perentity.'.accountancy_code_buy'=>'virtualproduct', $alias_product_perentity.'.accountancy_code_buy_intra'=>'virtualproduct', $alias_product_perentity.'.accountancy_code_buy_export'=>'virtualproduct',
390 390
 					'p.note'=>"virtualproduct", 'p.length'=>"virtualproduct",
391 391
 					'p.surface'=>"virtualproduct", 'p.volume'=>"virtualproduct", 'p.weight'=>"virtualproduct", 'p.customcode'=>'virtualproduct',
392 392
 					'p.price_base_type'=>"virtualproduct", 'p.price'=>"virtualproduct", 'p.price_ttc'=>"virtualproduct", 'p.tva_tx'=>"virtualproduct",
@@ -406,9 +406,9 @@  discard block
 block discarded – undo
406 406
 				$this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p2.rowid'=>"Id", 'p2.ref'=>"Ref", 'p2.label'=>"Label", 'p2.description'=>"Description"));
407 407
 				$this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p2.rowid'=>"subproduct", 'p2.ref'=>"subproduct", 'p2.label'=>"subproduct", 'p2.description'=>"subproduct"));
408 408
 				$this->export_sql_start[$r] = 'SELECT DISTINCT ';
409
-				$this->export_sql_end[$r]  = ' FROM '.MAIN_DB_PREFIX.'product as p';
409
+				$this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p';
410 410
 				if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) {
411
-					$this->export_sql_end[$r] .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as pac ON pac.fk_product = p.rowid AND pac.entity = " . ((int) $conf->entity);
411
+					$this->export_sql_end[$r] .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as pac ON pac.fk_product = p.rowid AND pac.entity = ".((int) $conf->entity);
412 412
 				}
413 413
 				$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra ON p.rowid = extra.fk_object,';
414 414
 				$this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'product_association as pa, '.MAIN_DB_PREFIX.'product as p2';
Please login to merge, or discard this patch.
htdocs/core/modules/modProduct.class.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -187,16 +187,16 @@  discard block
 block discarded – undo
187 187
 			'p.fk_product_type'=>'Type', 'p.tosell'=>"OnSell", 'p.tobuy'=>"OnBuy",
188 188
 			'p.description'=>"Description", 'p.url'=>"PublicUrl",
189 189
 			'p.customcode'=>'CustomCode', 'p.fk_country'=>'IDCountry',
190
-			$alias_product_perentity . '.accountancy_code_sell'=>"ProductAccountancySellCode", $alias_product_perentity . '.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode",
191
-			$alias_product_perentity . '.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", $alias_product_perentity . '.accountancy_code_buy'=>"ProductAccountancyBuyCode",
192
-			$alias_product_perentity . '.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", $alias_product_perentity . '.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode",
190
+			$alias_product_perentity.'.accountancy_code_sell'=>"ProductAccountancySellCode", $alias_product_perentity.'.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode",
191
+			$alias_product_perentity.'.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", $alias_product_perentity.'.accountancy_code_buy'=>"ProductAccountancyBuyCode",
192
+			$alias_product_perentity.'.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", $alias_product_perentity.'.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode",
193 193
 			'p.note'=>"NotePrivate", 'p.note_public'=>'NotePublic',
194 194
 			'p.weight'=>"Weight", 'p.weight_units'=>"WeightUnits", 'p.length'=>"Length", 'p.length_units'=>"LengthUnits", 'p.width'=>"Width", 'p.width_units'=>"WidthUnits", 'p.height'=>"Height", 'p.height_units'=>"HeightUnits",
195 195
 			'p.surface'=>"Surface", 'p.surface_units'=>"SurfaceUnits", 'p.volume'=>"Volume", 'p.volume_units'=>"VolumeUnits",
196 196
 			'p.duration'=>"Duration",
197 197
 			'p.finished' => 'Nature',
198 198
 			'p.price_base_type'=>"PriceBase", 'p.price'=>"UnitPriceHT", 'p.price_ttc'=>"UnitPriceTTC",
199
-			'p.price_min'=>"MinPriceHT",'p.price_min_ttc'=>"MinPriceTTC",
199
+			'p.price_min'=>"MinPriceHT", 'p.price_min_ttc'=>"MinPriceTTC",
200 200
 			'p.tva_tx'=>'VATRate',
201 201
 			'p.datec'=>'DateCreation', 'p.tms'=>'DateModification'
202 202
 		);
@@ -232,8 +232,8 @@  discard block
 block discarded – undo
232 232
 			'p.ref'=>"Text", 'p.label'=>"Text",
233 233
 			'p.fk_product_type'=>'Numeric', 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean",
234 234
 			'p.description'=>"Text", 'p.url'=>"Text",
235
-			$alias_product_perentity . '.accountancy_code_sell'=>"Text", $alias_product_perentity . '.accountancy_code_sell_intra'=>"Text", $alias_product_perentity . '.accountancy_code_sell_export'=>"Text",
236
-			$alias_product_perentity . '.accountancy_code_buy'=>"Text", $alias_product_perentity . '.accountancy_code_buy_intra'=>"Text", $alias_product_perentity . '.accountancy_code_buy_export'=>"Text",
235
+			$alias_product_perentity.'.accountancy_code_sell'=>"Text", $alias_product_perentity.'.accountancy_code_sell_intra'=>"Text", $alias_product_perentity.'.accountancy_code_sell_export'=>"Text",
236
+			$alias_product_perentity.'.accountancy_code_buy'=>"Text", $alias_product_perentity.'.accountancy_code_buy_intra'=>"Text", $alias_product_perentity.'.accountancy_code_buy_export'=>"Text",
237 237
 			'p.note'=>"Text", 'p.note_public'=>"Text",
238 238
 			'p.weight'=>"Numeric", 'p.length'=>"Numeric", 'p.width'=>"Numeric", 'p.height'=>"Numeric", 'p.surface'=>"Numeric", 'p.volume'=>"Numeric",
239 239
 			'p.customcode'=>'Text',
@@ -294,9 +294,9 @@  discard block
 block discarded – undo
294 294
 			$this->export_dependencies_array[$r] = array('category'=>'p.rowid');
295 295
 		}
296 296
 		$this->export_sql_start[$r] = 'SELECT DISTINCT ';
297
-		$this->export_sql_end[$r]  = ' FROM '.MAIN_DB_PREFIX.'product as p';
297
+		$this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p';
298 298
 		if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) {
299
-			$this->export_sql_end[$r] .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity);
299
+			$this->export_sql_end[$r] .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity);
300 300
 		}
301 301
 		if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) {
302 302
 			$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'categorie as cat ON cp.fk_categorie = cat.rowid';
@@ -391,9 +391,9 @@  discard block
 block discarded – undo
391 391
 			$this->export_permission[$r] = array(array("produit", "export"));
392 392
 			$this->export_fields_array[$r] = array(
393 393
 				'p.rowid'=>"Id", 'p.ref'=>"Ref", 'p.label'=>"Label", 'p.description'=>"Description", 'p.url'=>"PublicUrl",
394
-				$alias_product_perentity . '.accountancy_code_sell'=>"ProductAccountancySellCode", $alias_product_perentity . '.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode",
395
-				$alias_product_perentity . '.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", $alias_product_perentity . '.accountancy_code_buy'=>"ProductAccountancyBuyCode",
396
-				$alias_product_perentity . '.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", $alias_product_perentity . '.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode",
394
+				$alias_product_perentity.'.accountancy_code_sell'=>"ProductAccountancySellCode", $alias_product_perentity.'.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode",
395
+				$alias_product_perentity.'.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", $alias_product_perentity.'.accountancy_code_buy'=>"ProductAccountancyBuyCode",
396
+				$alias_product_perentity.'.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", $alias_product_perentity.'.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode",
397 397
 				'p.note'=>"NotePrivate", 'p.note_public'=>'NotePublic',
398 398
 				'p.weight'=>"Weight", 'p.length'=>"Length", 'p.surface'=>"Surface", 'p.volume'=>"Volume", 'p.customcode'=>'CustomCode',
399 399
 				'p.price_base_type'=>"PriceBase", 'p.price'=>"UnitPriceHT", 'p.price_ttc'=>"UnitPriceTTC", 'p.tva_tx'=>'VATRate', 'p.tosell'=>"OnSell",
@@ -408,8 +408,8 @@  discard block
 block discarded – undo
408 408
 			$this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('pa.qty'=>'Qty', 'pa.incdec'=>'ComposedProductIncDecStock'));
409 409
 			$this->export_TypeFields_array[$r] = array(
410 410
 				'p.ref'=>"Text", 'p.label'=>"Text", 'p.description'=>"Text", 'p.url'=>"Text",
411
-				$alias_product_perentity . '.accountancy_code_sell'=>"Text", $alias_product_perentity . '.accountancy_code_sell_intra'=>"Text", $alias_product_perentity . '.accountancy_code_sell_export'=>"Text",
412
-				$alias_product_perentity . '.accountancy_code_buy'=>"Text", $alias_product_perentity . '.accountancy_code_buy_intra'=>"Text", $alias_product_perentity . '.accountancy_code_buy_export'=>"Text",
411
+				$alias_product_perentity.'.accountancy_code_sell'=>"Text", $alias_product_perentity.'.accountancy_code_sell_intra'=>"Text", $alias_product_perentity.'.accountancy_code_sell_export'=>"Text",
412
+				$alias_product_perentity.'.accountancy_code_buy'=>"Text", $alias_product_perentity.'.accountancy_code_buy_intra'=>"Text", $alias_product_perentity.'.accountancy_code_buy_export'=>"Text",
413 413
 				'p.note'=>"Text", 'p.note_public'=>"Text",
414 414
 				'p.weight'=>"Numeric", 'p.length'=>"Numeric", 'p.surface'=>"Numeric", 'p.volume'=>"Numeric", 'p.customcode'=>'Text',
415 415
 				'p.price_base_type'=>"Text", 'p.price'=>"Numeric", 'p.price_ttc'=>"Numeric", 'p.tva_tx'=>'Numeric', 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean",
@@ -424,8 +424,8 @@  discard block
 block discarded – undo
424 424
 			$this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('pa.qty'=>'Numeric'));
425 425
 			$this->export_entities_array[$r] = array(
426 426
 				'p.rowid'=>"virtualproduct", 'p.ref'=>"virtualproduct", 'p.label'=>"virtualproduct", 'p.description'=>"virtualproduct", 'p.url'=>"virtualproduct",
427
-				$alias_product_perentity . '.accountancy_code_sell'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_sell_intra'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_sell_export'=>'virtualproduct',
428
-				$alias_product_perentity . '.accountancy_code_buy'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_buy_intra'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_buy_export'=>'virtualproduct',
427
+				$alias_product_perentity.'.accountancy_code_sell'=>'virtualproduct', $alias_product_perentity.'.accountancy_code_sell_intra'=>'virtualproduct', $alias_product_perentity.'.accountancy_code_sell_export'=>'virtualproduct',
428
+				$alias_product_perentity.'.accountancy_code_buy'=>'virtualproduct', $alias_product_perentity.'.accountancy_code_buy_intra'=>'virtualproduct', $alias_product_perentity.'.accountancy_code_buy_export'=>'virtualproduct',
429 429
 				'p.note'=>"virtualproduct", 'p.length'=>"virtualproduct",
430 430
 				'p.surface'=>"virtualproduct", 'p.volume'=>"virtualproduct", 'p.weight'=>"virtualproduct", 'p.customcode'=>'virtualproduct',
431 431
 				'p.price_base_type'=>"virtualproduct", 'p.price'=>"virtualproduct", 'p.price_ttc'=>"virtualproduct", 'p.tva_tx'=>"virtualproduct",
@@ -445,11 +445,11 @@  discard block
 block discarded – undo
445 445
 			$this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p2.rowid'=>"Id", 'p2.ref'=>"Ref", 'p2.label'=>"Label", 'p2.description'=>"Description"));
446 446
 			$this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p2.rowid'=>"subproduct", 'p2.ref'=>"subproduct", 'p2.label'=>"subproduct", 'p2.description'=>"subproduct"));
447 447
 			$this->export_sql_start[$r] = 'SELECT DISTINCT ';
448
-			$this->export_sql_end[$r]  = ' FROM '.MAIN_DB_PREFIX.'product as p';
448
+			$this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p';
449 449
 			if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) {
450
-				$this->export_sql_end[$r] .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity);
450
+				$this->export_sql_end[$r] .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity);
451 451
 			}
452
-			$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra ON p.rowid = extra.fk_object,';
452
+			$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra ON p.rowid = extra.fk_object,';
453 453
 			$this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'product_association as pa, '.MAIN_DB_PREFIX.'product as p2';
454 454
 			$this->export_sql_end[$r] .= ' WHERE p.entity IN ('.getEntity('product').')'; // For product and service profile
455 455
 			$this->export_sql_end[$r] .= ' AND p.rowid = pa.fk_product_pere AND p2.rowid = pa.fk_product_fils';
Please login to merge, or discard this patch.
htdocs/accountancy/supplier/card.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
 	$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn_det as l";
112 112
 	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = l.fk_product";
113 113
 	if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) {
114
-		$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity);
114
+		$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity);
115 115
 	}
116 116
 	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON l.fk_code_ventilation = aa.rowid";
117 117
 	$sql .= " INNER JOIN ".MAIN_DB_PREFIX."facture_fourn as f ON f.rowid = l.fk_facture_fourn ";
Please login to merge, or discard this patch.
htdocs/accountancy/customer/card.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
 	$sql .= " FROM ".MAIN_DB_PREFIX."facturedet as l";
111 111
 	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = l.fk_product";
112 112
 	if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) {
113
-		$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity);
113
+		$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity);
114 114
 	}
115 115
 	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON l.fk_code_ventilation = aa.rowid";
116 116
 	$sql .= " INNER JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = l.fk_facture";
Please login to merge, or discard this patch.
htdocs/knowledgemanagement/class/knowledgerecord.class.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -820,7 +820,9 @@
 block discarded – undo
820 820
 		}
821 821
 
822 822
 		$statusType = 'status'.$status;
823
-		if ($status == self::STATUS_VALIDATED) $statusType = 'status4';
823
+		if ($status == self::STATUS_VALIDATED) {
824
+			$statusType = 'status4';
825
+		}
824 826
 		if ($status == self::STATUS_CANCELED) {
825 827
 			$statusType = 'status6';
826 828
 		}
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
 	/**
100 100
 	 * @var array  Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
101 101
 	 */
102
-	public $fields=array(
102
+	public $fields = array(
103 103
 		'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
104 104
 		'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'default'=>'(PROV)', 'visible'=>5, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", "csslist"=>"nowraponall", "showoncombobox"=>1),
105 105
 		'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>20, 'index'=>1),
Please login to merge, or discard this patch.