Completed
Branch develop (049fe9)
by
unknown
25:12
created
dev/build/generate_filelist_xml.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
  */
25 25
 
26 26
 if (!defined('NOREQUIREDB')) {
27
-	define('NOREQUIREDB', '1');	// Do not create database handler $db
27
+	define('NOREQUIREDB', '1'); // Do not create database handler $db
28 28
 }
29 29
 
30 30
 $sapi_type = php_sapi_name();
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 $result = array();
70 70
 while ($i < $argc) {
71 71
 	if (!empty($argv[$i])) {
72
-		parse_str($argv[$i], $result);	// set all params $release, $includecustom, $includeconstant, $buildzip ...
72
+		parse_str($argv[$i], $result); // set all params $release, $includecustom, $includeconstant, $buildzip ...
73 73
 	}
74 74
 	if (!empty($result["release"])) {
75 75
 		$release = $result["release"];
@@ -78,9 +78,9 @@  discard block
 block discarded – undo
78 78
 		$includecustom = $result["includecustom"];
79 79
 	}
80 80
 	if (preg_match('/includeconstant=/', strval($argv[$i]))) {
81
-		$tmp = explode(':', $result['includeconstant'], 3);			// $includeconstant has been set with previous parse_str()
81
+		$tmp = explode(':', $result['includeconstant'], 3); // $includeconstant has been set with previous parse_str()
82 82
 		if (count($tmp) != 3) {
83
-			print "Error: Bad parameter includeconstant=".$result['includeconstant'] ."\n";
83
+			print "Error: Bad parameter includeconstant=".$result['includeconstant']."\n";
84 84
 			exit(1);
85 85
 		}
86 86
 		$includeconstants[$tmp[0]][$tmp[1]] = $tmp[2];
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 }
159 159
 
160 160
 $gitcommit = 'seetag';
161
-$branchname = preg_replace('/^(\d+\.\d+)\..*$/', '\1', $release);	// Keep only x.y into x.y.z
161
+$branchname = preg_replace('/^(\d+\.\d+)\..*$/', '\1', $release); // Keep only x.y into x.y.z
162 162
 $fileforgit = dirname(dirname(dirname(__FILE__))).'/.git/refs/heads/'.$branchname;
163 163
 print "Try to get last commit ID from file ".$fileforgit."\n";
164 164
 $fileforgitcontent = '';
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 
190 190
 // Define qualified files (must be same than into generate_filelist_xml.php and in api_setup.class.php)
191 191
 $regextoinclude = '\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|bak|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
192
-$regextoexclude = '('.($includecustom ? '' : 'custom|').'documents|escpos-php\/doc|escpos-php\/example|escpos-php\/test|conf|install|dejavu-fonts-ttf-.*|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$';  // Exclude dirs
192
+$regextoexclude = '('.($includecustom ? '' : 'custom|').'documents|escpos-php\/doc|escpos-php\/example|escpos-php\/test|conf|install|dejavu-fonts-ttf-.*|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
193 193
 $files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
194 194
 
195 195
 $dir = '';
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 fputs($fp, '<dolibarr_script_dir version="'.$release.'">'."\n");
233 233
 
234 234
 $regextoinclude = '\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
235
-$regextoexclude = '(custom|documents|conf|install)$';  // Exclude dirs
235
+$regextoexclude = '(custom|documents|conf|install)$'; // Exclude dirs
236 236
 $files = dol_dir_list(dirname(__FILE__).'/../../scripts/', 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
237 237
 $dir = '';
238 238
 foreach ($files as $filetmp) {
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 fputs($fp, '<dolibarr_unalterable_files version="'.$release.'">'."\n");
274 274
 
275 275
 $regextoinclude = '(\.php|\.sql)$';
276
-$regextoexclude = '';  // Exclude dirs
276
+$regextoexclude = ''; // Exclude dirs
277 277
 $files = dol_dir_list(dirname(__FILE__).'/../../htdocs/blockedlog', 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
278 278
 $dir = '';
279 279
 foreach ($files as $filetmp) {
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 }
302 302
 // Add the SQL file
303 303
 $regextoinclude = 'llx_blockedlog.*(\.php|\.sql)$';
304
-$regextoexclude = '';  // Exclude dirs
304
+$regextoexclude = ''; // Exclude dirs
305 305
 $files = dol_dir_list(dirname(__FILE__).'/../../htdocs/install/mysql/tables', 'files', 0, $regextoinclude, $regextoexclude, 'fullname');
306 306
 foreach ($files as $filetmp) {
307 307
 	$file = $filetmp['fullname'];
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
 	$needtoclose = 1;
385 385
 }
386 386
 
387
-$needtoclose = 1;	// This is the last file
387
+$needtoclose = 1; // This is the last file
388 388
 if (filetype($file) == "file") {
389 389
 	$md5 = md5_file($file);
390 390
 	$checksumconcat[] = $md5;
Please login to merge, or discard this patch.
htdocs/admin/system/filecheck.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 	}
198 198
 }
199 199
 if (GETPOST('target') == 'remote') {
200
-	$xmlarray = getURLContent($xmlremote, 'GET', '', 1, array(), array('http', 'https'), 0);	// Accept http or https links on external remote server only. Same is used into api_setup.class.php.
200
+	$xmlarray = getURLContent($xmlremote, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only. Same is used into api_setup.class.php.
201 201
 
202 202
 	// Return array('content'=>response,'curl_error_no'=>errno,'curl_error_msg'=>errmsg...)
203 203
 	if (!$xmlarray['curl_error_no'] && $xmlarray['http_code'] != 400 && $xmlarray['http_code'] != 404) {
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
 						$out .= ' '.$form->textwithpicto('', $htmltext, 1, 'help', '', 0, 2, 'helprm'.$i);
422 422
 					}
423 423
 					$out .= '</td>'."\n";
424
-					$out .= '<td class="center">'.dol_escape_htmltag((string) $file['expectedmd5']).'</td>'."\n";  // @phan-suppress-current-line PhanTypeInvalidDimOffset
424
+					$out .= '<td class="center">'.dol_escape_htmltag((string) $file['expectedmd5']).'</td>'."\n"; // @phan-suppress-current-line PhanTypeInvalidDimOffset
425 425
 					$out .= '<td class="center">'.dol_escape_htmltag($file['md5']).'</td>'."\n";
426 426
 					$size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']);
427 427
 					$totalsize += $size;
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
 			$resultcode = 'ok';
492 492
 			$resultcomment = 'Success';
493 493
 			$outcurrentchecksum = '<span class="'.$resultcode.'" title="Checksum of all current checksums concatenated separated by a comma">'.$checksumget.'</span>';
494
-			$outcurrentchecksum.= '<br><br>'.img_picto('', 'tick').' <span class="'.$resultcode.'">'.$langs->trans($resultcomment).'</span>';
494
+			$outcurrentchecksum .= '<br><br>'.img_picto('', 'tick').' <span class="'.$resultcode.'">'.$langs->trans($resultcomment).'</span>';
495 495
 		}
496 496
 	} else {
497 497
 		$resultcode = 'error';
Please login to merge, or discard this patch.
htdocs/user/param_ihm.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 		$langs->trans($val['label']),
315 315
 		$val['picto'],
316 316
 		'class="pictofixedwidth"'
317
-	) . $langs->trans($val['label']);
317
+	).$langs->trans($val['label']);
318 318
 
319 319
 	$tmparray[$key]['label'] = $langs->trans($val['label']);
320 320
 }
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
 	print '<td>';
431 431
 	$s = picto_from_langcode(getDolGlobalString('MAIN_LANG_DEFAULT'));
432 432
 	print $s ? $s.' ' : '';
433
-	print (getDolGlobalString('MAIN_LANG_DEFAULT') == 'auto' ? $form->textwithpicto($langs->trans("Automatic"), $langs->trans("AutoDetectLang")) : $langs->trans("Language_" . getDolGlobalString('MAIN_LANG_DEFAULT')));
433
+	print (getDolGlobalString('MAIN_LANG_DEFAULT') == 'auto' ? $form->textwithpicto($langs->trans("Automatic"), $langs->trans("AutoDetectLang")) : $langs->trans("Language_".getDolGlobalString('MAIN_LANG_DEFAULT')));
434 434
 	print '</td>';
435 435
 	print '<td class="nowrap"><input class="oddeven" name="check_MAIN_LANG_DEFAULT" id="check_MAIN_LANG_DEFAULT" type="checkbox" '.(getDolGlobalString('MAIN_LANG_DEFAULT') ? " checked" : "");
436 436
 	print empty($dolibarr_main_demo) ? '' : ' disabled="disabled"'; // Disabled for demo
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
 
484 484
 	// Max size of short lists
485 485
 	print '<tr class="oddeven"><td>'.$langs->trans("MaxSizeShortList").'</td>';
486
-	print '<td>' . getDolGlobalString('MAIN_SIZE_SHORTLIST_LIMIT').'</td>';
486
+	print '<td>'.getDolGlobalString('MAIN_SIZE_SHORTLIST_LIMIT').'</td>';
487 487
 	print '<td class="nowrap" width="20%"><input class="oddeven" name="check_MAIN_SIZE_SHORTLIST_LIMIT" id="check_MAIN_SIZE_SHORTLIST_LIMIT" type="checkbox" '.(!empty($object->conf->MAIN_SIZE_SHORTLIST_LIMIT) ? " checked" : "");
488 488
 	print empty($dolibarr_main_demo) ? '' : ' disabled="disabled"'; // Disabled for demo
489 489
 	print '> <label for="check_MAIN_SIZE_SHORTLIST_LIMIT">'.$langs->trans("UsePersonalValue").'</label></td>';
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
 	print '<td>';
555 555
 	$s = picto_from_langcode(getDolGlobalString('MAIN_LANG_DEFAULT'));
556 556
 	print ($s ? $s.' ' : '');
557
-	print (getDolGlobalString('MAIN_LANG_DEFAULT') == 'auto' ? $form->textwithpicto($langs->trans("Automatic"), $langs->trans("AutoDetectLang")) : $langs->trans("Language_" . getDolGlobalString('MAIN_LANG_DEFAULT')));
557
+	print (getDolGlobalString('MAIN_LANG_DEFAULT') == 'auto' ? $form->textwithpicto($langs->trans("Automatic"), $langs->trans("AutoDetectLang")) : $langs->trans("Language_".getDolGlobalString('MAIN_LANG_DEFAULT')));
558 558
 	print '</td>';
559 559
 	print '<td class="nowrap"><input class="oddeven" type="checkbox" disabled '.(!empty($object->conf->MAIN_LANG_DEFAULT) ? " checked" : "").'> '.$langs->trans("UsePersonalValue").'</td>';
560 560
 	print '<td>';
Please login to merge, or discard this patch.
htdocs/core/modules/accountancy/doc/pdf_bookkeeping.modules.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 		$this->watermark = '';
112 112
 
113 113
 		if ($mysoc === null) {
114
-			dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'. getCallerInfoString(), LOG_ERR);
114
+			dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'.getCallerInfoString(), LOG_ERR);
115 115
 			return;
116 116
 		}
117 117
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 		$pdf->SetFont(pdf_getPDFFont($outputlangs));
216 216
 		// Set path to the background PDF File
217 217
 		if (!getDolGlobalString('MAIN_DISABLE_FPDI') && getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) {
218
-			$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
218
+			$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
219 219
 			$tplidx = $pdf->importPage(1);
220 220
 		}
221 221
 
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 		$pdf->SetDrawColor(128, 128, 128);
225 225
 
226 226
 		if (method_exists($pdf, 'AliasNbPages')) {
227
-			$pdf->AliasNbPages();  // @phan-suppress-current-line PhanUndeclaredMethod
227
+			$pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod
228 228
 		}
229 229
 
230 230
 		$pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 		$pdf->MultiCell(0, 3, ''); // Set interline to 3
251 251
 		$pdf->SetTextColor(0, 0, 0);
252 252
 
253
-		$tab_top = 40;	// position of top tab
253
+		$tab_top = 40; // position of top tab
254 254
 		$tab_top_newpage = (getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 10 : $tab_top);
255 255
 
256 256
 		$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 		$nbMonths = (((int) $toYear - (int) $fromYear) * 12) + ((int) $toMonth - (int) $fromMonth) + 1;
286 286
 		$datePlusOneMonth = strtotime("-1 month", $this->fromDate);
287 287
 		$dates = [];
288
-		for ($i = 0; $i  < $nbMonths; $i++) {
288
+		for ($i = 0; $i < $nbMonths; $i++) {
289 289
 			$datePlusOneMonth = strtotime("+1 month", $datePlusOneMonth);
290 290
 			$dates[$datePlusOneMonth] = dol_print_date($datePlusOneMonth, "%B %Y");
291 291
 		}
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
 		// Pagefoot
533 533
 		$this->_pagefoot($pdf, $object, $outputlangs);
534 534
 		if (method_exists($pdf, 'AliasNbPages')) {
535
-			$pdf->AliasNbPages();  // @phan-suppress-current-line PhanUndeclaredMethod
535
+			$pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod
536 536
 		}
537 537
 
538 538
 		$pdf->Close();
@@ -661,7 +661,7 @@  discard block
 block discarded – undo
661 661
 		$pdf->SetXY($this->marge_gauche + 2, $nexY);
662 662
 		$pdf->SetTextColor(0, 0, 60);
663 663
 		$textDateNow = $outputlangs->transnoentities("PrintDate");
664
-		$pdf->MultiCell($w / 3, 3, $textDateNow . " : " . date('d/m/Y', dol_now()), '', 'L');
664
+		$pdf->MultiCell($w / 3, 3, $textDateNow." : ".date('d/m/Y', dol_now()), '', 'L');
665 665
 		$nexY = max($pdf->GetY(), $nexY);
666 666
 
667 667
 		// Page title
@@ -679,7 +679,7 @@  discard block
 block discarded – undo
679 679
 
680 680
 		$fromDate = dol_print_date($this->fromDate, 'day');
681 681
 		$toDate = dol_print_date($this->toDate, 'day');
682
-		$textDate = $outputlangs->transnoentities("From") . " " . $fromDate . " " . $outputlangs->transnoentities("To") . " " . $toDate;
682
+		$textDate = $outputlangs->transnoentities("From")." ".$fromDate." ".$outputlangs->transnoentities("To")." ".$toDate;
683 683
 		$pdf->MultiCell($w / 3, 4, $textDate, 0, 'R');
684 684
 		$nexY = max($pdf->GetY(), $nexY);
685 685
 
@@ -956,7 +956,7 @@  discard block
 block discarded – undo
956 956
 
957 957
 		if ($this->getColumnStatus('balance')) {
958 958
 			$solde = $credit - $debit;
959
-			$soldeText = price(price2num(abs($solde), 'MT')) . ($solde >= 0 ? ' ' . $langs->trans('CreditShort') : ' ' . $langs->trans('DebitShort'));
959
+			$soldeText = price(price2num(abs($solde), 'MT')).($solde >= 0 ? ' '.$langs->trans('CreditShort') : ' '.$langs->trans('DebitShort'));
960 960
 			$this->printStdColumnContent($pdf, $curY, 'balance', $soldeText);
961 961
 			$nexY = max($pdf->GetY(), $nexY);
962 962
 		}
Please login to merge, or discard this patch.
htdocs/core/modules/accountancy/doc/pdf_ledger.modules.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 		$this->watermark = '';
102 102
 
103 103
 		if ($mysoc === null) {
104
-			dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'. getCallerInfoString(), LOG_ERR);
104
+			dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'.getCallerInfoString(), LOG_ERR);
105 105
 			return;
106 106
 		}
107 107
 
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 		$pdf->SetFont(pdf_getPDFFont($outputlangs));
206 206
 		// Set path to the background PDF File
207 207
 		if (!getDolGlobalString('MAIN_DISABLE_FPDI') && getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) {
208
-			$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
208
+			$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
209 209
 			$tplidx = $pdf->importPage(1);
210 210
 		}
211 211
 
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 		$pdf->SetDrawColor(128, 128, 128);
215 215
 
216 216
 		if (method_exists($pdf, 'AliasNbPages')) {
217
-			$pdf->AliasNbPages();  // @phan-suppress-current-line PhanUndeclaredMethod
217
+			$pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod
218 218
 		}
219 219
 
220 220
 		$pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 		$pdf->MultiCell(0, 3, ''); // Set interline to 3
241 241
 		$pdf->SetTextColor(0, 0, 0);
242 242
 
243
-		$tab_top = 40;	// position of top tab
243
+		$tab_top = 40; // position of top tab
244 244
 		$tab_top_newpage = (getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 10 : $tab_top);
245 245
 
246 246
 		$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 		$nbMonths = (((int) $toYear - (int) $fromYear) * 12) + ((int) $toMonth - (int) $fromMonth) + 1;
276 276
 		$datePlusOneMonth = strtotime("-1 month", $this->fromDate);
277 277
 		$dates = [];
278
-		for ($i = 0; $i  < $nbMonths; $i++) {
278
+		for ($i = 0; $i < $nbMonths; $i++) {
279 279
 			$datePlusOneMonth = strtotime("+1 month", $datePlusOneMonth);
280 280
 			$dates[$datePlusOneMonth] = dol_print_date($datePlusOneMonth, "%B %Y");
281 281
 		}
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
 					$nexY,
313 313
 					$default_font_size,
314 314
 					'piece_num',
315
-					$langs->transnoentities('AccountAccountingShort') . ' ' . length_accountg($accountingAccount->ref) . ' - ' . $accountingAccount->label,
315
+					$langs->transnoentities('AccountAccountingShort').' '.length_accountg($accountingAccount->ref).' - '.$accountingAccount->label,
316 316
 					$tab_top_newpage
317 317
 				);
318 318
 
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
 
430 430
 			if ($this->getColumnStatus('balance')) {
431 431
 				$solde = $object->lines[$i]->credit - $object->lines[$i]->debit;
432
-				$soldeText = price(price2num(abs($solde), 'MT')) . ($solde >= 0 ? ' ' . $langs->trans('CreditShort') : ' ' . $langs->trans('DebitShort'));
432
+				$soldeText = price(price2num(abs($solde), 'MT')).($solde >= 0 ? ' '.$langs->trans('CreditShort') : ' '.$langs->trans('DebitShort'));
433 433
 				$this->printStdColumnContent($pdf, $curY, 'balance', $soldeText);
434 434
 				$nexY = max($pdf->GetY(), $nexY);
435 435
 			}
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
 		// Pagefoot
534 534
 		$this->_pagefoot($pdf, $object, $outputlangs);
535 535
 		if (method_exists($pdf, 'AliasNbPages')) {
536
-			$pdf->AliasNbPages();  // @phan-suppress-current-line PhanUndeclaredMethod
536
+			$pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod
537 537
 		}
538 538
 
539 539
 		$pdf->Close();
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
 		$pdf->SetXY($this->marge_gauche + 2, $nexY);
663 663
 		$pdf->SetTextColor(0, 0, 60);
664 664
 		$textDateNow = $outputlangs->transnoentities("PrintDate");
665
-		$pdf->MultiCell($w / 3, 3, $textDateNow . " : " . date('d/m/Y', dol_now()), '', 'L');
665
+		$pdf->MultiCell($w / 3, 3, $textDateNow." : ".date('d/m/Y', dol_now()), '', 'L');
666 666
 		$nexY = max($pdf->GetY(), $nexY);
667 667
 
668 668
 		// Page title
@@ -680,7 +680,7 @@  discard block
 block discarded – undo
680 680
 
681 681
 		$fromDate = dol_print_date($this->fromDate, 'day');
682 682
 		$toDate = dol_print_date($this->toDate, 'day');
683
-		$textDate = $outputlangs->transnoentities("From") . " " . $fromDate . " " . $outputlangs->transnoentities("To") . " " . $toDate;
683
+		$textDate = $outputlangs->transnoentities("From")." ".$fromDate." ".$outputlangs->transnoentities("To")." ".$toDate;
684 684
 		$pdf->MultiCell($w / 3, 4, $textDate, 0, 'R');
685 685
 		$nexY = max($pdf->GetY(), $nexY);
686 686
 
@@ -977,7 +977,7 @@  discard block
 block discarded – undo
977 977
 
978 978
 		if ($this->getColumnStatus('balance')) {
979 979
 			$solde = $credit - $debit;
980
-			$soldeText = price(price2num(abs($solde), 'MT')) . ($solde >= 0 ? ' ' . $langs->trans('CreditShort') : ' ' . $langs->trans('DebitShort'));
980
+			$soldeText = price(price2num(abs($solde), 'MT')).($solde >= 0 ? ' '.$langs->trans('CreditShort') : ' '.$langs->trans('DebitShort'));
981 981
 			$this->printStdColumnContent($pdf, $curY, 'balance', $soldeText);
982 982
 			$nexY = max($pdf->GetY(), $nexY);
983 983
 		}
Please login to merge, or discard this patch.
htdocs/core/modules/accountancy/doc/pdf_balance.modules.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 		$this->watermark = '';
117 117
 
118 118
 		if ($mysoc === null) {
119
-			dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'. getCallerInfoString(), LOG_ERR);
119
+			dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'.getCallerInfoString(), LOG_ERR);
120 120
 			return;
121 121
 		}
122 122
 
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 		$pdf->SetFont(pdf_getPDFFont($outputlangs));
221 221
 		// Set path to the background PDF File
222 222
 		if (!getDolGlobalString('MAIN_DISABLE_FPDI') && getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) {
223
-			$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
223
+			$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
224 224
 			$tplidx = $pdf->importPage(1);
225 225
 		}
226 226
 
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 		$pdf->SetDrawColor(128, 128, 128);
230 230
 
231 231
 		if (method_exists($pdf, 'AliasNbPages')) {
232
-			$pdf->AliasNbPages();  // @phan-suppress-current-line PhanUndeclaredMethod
232
+			$pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod
233 233
 		}
234 234
 
235 235
 		$pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 		$pdf->MultiCell(0, 3, ''); // Set interline to 3
256 256
 		$pdf->SetTextColor(0, 0, 0);
257 257
 
258
-		$tab_top = 40;	// position of top tab
258
+		$tab_top = 40; // position of top tab
259 259
 		$tab_top_newpage = (getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 10 : $tab_top);
260 260
 
261 261
 		$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 		$nbMonths = (((int) $toYear - (int) $fromYear) * 12) + ((int) $toMonth - (int) $fromMonth) + 1;
290 290
 		$datePlusOneMonth = strtotime("-1 month", $this->fromDate);
291 291
 		$dates = [];
292
-		for ($i = 0; $i  < $nbMonths; $i++) {
292
+		for ($i = 0; $i < $nbMonths; $i++) {
293 293
 			$datePlusOneMonth = strtotime("+1 month", $datePlusOneMonth);
294 294
 			$dates[$datePlusOneMonth] = dol_print_date($datePlusOneMonth, "%B %Y");
295 295
 		}
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
 					$curY,
313 313
 					$nexY,
314 314
 					$default_font_size,
315
-					$langs->trans('Total') . ' ' . $langs->trans('AccountancyGroup' . $accountGroup),
315
+					$langs->trans('Total').' '.$langs->trans('AccountancyGroup'.$accountGroup),
316 316
 					$tab_top_newpage,
317 317
 					$groupDebit,
318 318
 					$groupCredit
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
 
417 417
 			if ($this->getColumnStatus('balance')) {
418 418
 				$solde = $object->lines[$i]->credit - $object->lines[$i]->debit;
419
-				$soldeText = price(price2num(abs($solde), 'MT')) . ($solde >= 0 ? ' ' . $langs->trans('CreditShort') : ' ' . $langs->trans('DebitShort'));
419
+				$soldeText = price(price2num(abs($solde), 'MT')).($solde >= 0 ? ' '.$langs->trans('CreditShort') : ' '.$langs->trans('DebitShort'));
420 420
 				$this->printStdColumnContent($pdf, $curY, 'balance', $soldeText);
421 421
 				$nexY = max($pdf->GetY(), $nexY);
422 422
 			}
@@ -482,19 +482,19 @@  discard block
 block discarded – undo
482 482
 				$this->addDashLine($pdf, $pdf->getPage(), $nexY);
483 483
 			}
484 484
 			// check if translation for AccountancyGroupXXX exists
485
-			$translationKey = 'AccountancyGroup' . $accountingAccount->pcg_type;
485
+			$translationKey = 'AccountancyGroup'.$accountingAccount->pcg_type;
486 486
 			$translation = $langs->transnoentitiesnoconv($translationKey);
487 487
 			if ($translation !== $translationKey) {
488
-				$output = $langs->transnoentitiesnoconv('Total') . ' ' . $translation;
488
+				$output = $langs->transnoentitiesnoconv('Total').' '.$translation;
489 489
 			} else {
490
-				$output = $langs->transnoentitiesnoconv('Total') . ' ' . $langs->transnoentitiesnoconv('AccountancyGroup') . ' ' . $accountingAccount->pcg_type;
490
+				$output = $langs->transnoentitiesnoconv('Total').' '.$langs->transnoentitiesnoconv('AccountancyGroup').' '.$accountingAccount->pcg_type;
491 491
 			}
492 492
 			$this->addTotalLine(
493 493
 				$pdf,
494 494
 				$curY,
495 495
 				$nexY,
496 496
 				$default_font_size,
497
-				$langs->transnoentitiesnoconv('Total') . ' ' . $langs->trans('AccountancyGroup' . $accountingAccount->pcg_type),
497
+				$langs->transnoentitiesnoconv('Total').' '.$langs->trans('AccountancyGroup'.$accountingAccount->pcg_type),
498 498
 				$tab_top_newpage,
499 499
 				$groupDebit,
500 500
 				$groupCredit
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
 		// Pagefoot
531 531
 		$this->_pagefoot($pdf, $object, $outputlangs);
532 532
 		if (method_exists($pdf, 'AliasNbPages')) {
533
-			$pdf->AliasNbPages();  // @phan-suppress-current-line PhanUndeclaredMethod
533
+			$pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod
534 534
 		}
535 535
 
536 536
 		$pdf->Close();
@@ -659,7 +659,7 @@  discard block
 block discarded – undo
659 659
 		$pdf->SetXY($this->marge_gauche + 2, $nexY);
660 660
 		$pdf->SetTextColor(0, 0, 60);
661 661
 		$textDateNow = $outputlangs->transnoentities("PrintDate");
662
-		$pdf->MultiCell($w / 3, 3, $textDateNow . " : " . date('d/m/Y', dol_now()), '', 'L');
662
+		$pdf->MultiCell($w / 3, 3, $textDateNow." : ".date('d/m/Y', dol_now()), '', 'L');
663 663
 		$nexY = max($pdf->GetY(), $nexY);
664 664
 
665 665
 		// Page title
@@ -677,7 +677,7 @@  discard block
 block discarded – undo
677 677
 
678 678
 		$fromDate = dol_print_date($this->fromDate, 'day');
679 679
 		$toDate = dol_print_date($this->toDate, 'day');
680
-		$textDate = $outputlangs->transnoentities("From") . " " . $fromDate . " " . $outputlangs->transnoentities("To") . " " . $toDate;
680
+		$textDate = $outputlangs->transnoentities("From")." ".$fromDate." ".$outputlangs->transnoentities("To")." ".$toDate;
681 681
 		$pdf->MultiCell($w / 3, 4, $textDate, 0, 'R');
682 682
 		$nexY = max($pdf->GetY(), $nexY);
683 683
 
@@ -917,7 +917,7 @@  discard block
 block discarded – undo
917 917
 
918 918
 		if ($this->getColumnStatus('balance')) {
919 919
 			$solde = $credit - $debit;
920
-			$soldeText = price(price2num(abs($solde), 'MT')) . ($solde >= 0 ? ' ' . $langs->trans('CreditShort') : ' ' . $langs->trans('DebitShort'));
920
+			$soldeText = price(price2num(abs($solde), 'MT')).($solde >= 0 ? ' '.$langs->trans('CreditShort') : ' '.$langs->trans('DebitShort'));
921 921
 			$this->printStdColumnContent($pdf, $curY, 'balance', $soldeText);
922 922
 			$nexY = max($pdf->GetY(), $nexY);
923 923
 		}
Please login to merge, or discard this patch.
htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 		$this->option_draft_watermark = 0; // Support add of a watermark on drafts
86 86
 
87 87
 		if ($mysoc === null) {
88
-			dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'. getCallerInfoString(), LOG_ERR);
88
+			dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'.getCallerInfoString(), LOG_ERR);
89 89
 			return;
90 90
 		}
91 91
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 		$maxfilesizearray = getMaxFileSizeArray();
181 181
 		$maxmin = $maxfilesizearray['maxmin'];
182 182
 		if ($maxmin > 0) {
183
-			$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">';	// MAX_FILE_SIZE must precede the field type=file
183
+			$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
184 184
 		}
185 185
 		$texte .= ' <input type="file" name="uploadfile">';
186 186
 		$texte .= '<input type="hidden" value="FACTURE_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 				if (getDolGlobalString('MAIN_ODT_AS_PDF_OMIT_TEMPLATE_NAME')) {
274 274
 					$newfiletmp = $objectref;
275 275
 				} else {
276
-					$newfiletmp = $objectref . '_' . $newfiletmp;
276
+					$newfiletmp = $objectref.'_'.$newfiletmp;
277 277
 				}
278 278
 
279 279
 				// Get extension (ods or odt)
@@ -283,11 +283,11 @@  discard block
 block discarded – undo
283 283
 					if ($format == '1') {
284 284
 						$format = '%Y%m%d%H%M%S';
285 285
 					}
286
-					$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
286
+					$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
287 287
 				} else {
288
-					$filename = $newfiletmp . '.' . $newfileformat;
288
+					$filename = $newfiletmp.'.'.$newfileformat;
289 289
 				}
290
-				$file = $dir . '/' . $filename;
290
+				$file = $dir.'/'.$filename;
291 291
 				//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
292 292
 				//print "newdir=".$dir;
293 293
 				//print "newfile=".$newfile;
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 				dol_mkdir($conf->facture->dir_temp);
298 298
 				if (!is_writable($conf->facture->dir_temp)) {
299 299
 					$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->facture->dir_temp);
300
-					dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
300
+					dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
301 301
 					return -1;
302 302
 				}
303 303
 
@@ -419,10 +419,10 @@  discard block
 block discarded – undo
419 419
 				}
420 420
 
421 421
 				// Define substitution array
422
-				$substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object);	// Set tags __...__
422
+				$substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object); // Set tags __...__
423 423
 				$array_object_from_properties = $this->get_substitutionarray_each_var_object($object, $outputlangs);
424
-				$array_objet = $this->get_substitutionarray_object($object, $outputlangs);			// Set tags object_...
425
-				$array_user = $this->get_substitutionarray_user($user, $outputlangs);				// Set tags myuser_...
424
+				$array_objet = $this->get_substitutionarray_object($object, $outputlangs); // Set tags object_...
425
+				$array_user = $this->get_substitutionarray_user($user, $outputlangs); // Set tags myuser_...
426 426
 				$array_soc = $this->get_substitutionarray_mysoc($mysoc, $outputlangs);
427 427
 				$array_thirdparty = $this->get_substitutionarray_thirdparty($socobject, $outputlangs);
428 428
 				$array_propal = is_object($propal_object) ? $this->get_substitutionarray_object($propal_object, $outputlangs, 'propal') : array();
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
 				$tmparray['object_PREVIOUS_YEAR'] = dol_print_date(dol_time_plus_duree($object->date, -1, 'y'), '%Y');
451 451
 				$tmparray['object_YEAR'] = dol_print_date($object->date, '%Y');
452 452
 				$tmparray['object_NEXT_YEAR'] = dol_print_date(dol_time_plus_duree($object->date, 1, 'y'), '%Y');
453
-				$tmparray['object_productorservice_operation'] = $outputlangs->transnoentities("MentionCategoryOfOperations" . $categoryOfOperation);
453
+				$tmparray['object_productorservice_operation'] = $outputlangs->transnoentities("MentionCategoryOfOperations".$categoryOfOperation);
454 454
 
455 455
 
456 456
 				// Call the ODTSubstitution hook
Please login to merge, or discard this patch.
htdocs/accountancy/supplier/list.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -56,14 +56,14 @@  discard block
 block discarded – undo
56 56
 $action = GETPOST('action', 'aZ09');
57 57
 $massaction = GETPOST('massaction', 'alpha');
58 58
 $confirm = GETPOST('confirm', 'alpha');
59
-$toselect = GETPOST('toselect', 'array:aZ09');	// Value can be 'X_Y'
59
+$toselect = GETPOST('toselect', 'array:aZ09'); // Value can be 'X_Y'
60 60
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'accountancysupplierlist'; // To manage different context of search
61 61
 $optioncss = GETPOST('optioncss', 'alpha');
62 62
 
63 63
 $default_account = GETPOSTINT('default_account');
64 64
 
65 65
 // Search Getpost
66
-$search_lineid = GETPOST('search_lineid', 'alpha');		// Can be '> 100'
66
+$search_lineid = GETPOST('search_lineid', 'alpha'); // Can be '> 100'
67 67
 $search_societe = GETPOST('search_societe', 'alpha');
68 68
 $search_ref = GETPOST('search_ref', 'alpha');
69 69
 $search_ref_supplier = GETPOST('search_ref_supplier', 'alpha');
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 $search_date_endday = GETPOSTINT('search_date_endday');
80 80
 $search_date_endmonth = GETPOSTINT('search_date_endmonth');
81 81
 $search_date_endyear = GETPOSTINT('search_date_endyear');
82
-$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);	// Use tzserver
82
+$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
83 83
 $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
84 84
 $search_country = GETPOST('search_country', 'aZ09');
85 85
 $search_tvaintra = GETPOST('search_tvaintra', 'alpha');
@@ -126,19 +126,19 @@  discard block
 block discarded – undo
126 126
 }
127 127
 
128 128
 $arrayfields = array(
129
-	'l.rowid'               => array('label' => "LineId",                           'position' => 1, 'checked' => '1', 'enabled' => '1'),
130
-	'f.ref'                 => array('label' => "Invoice",                          'position' => 1, 'checked' => '1', 'enabled' => '1'),
131
-	'f.libelle'             => array('label' => "InvoiceLabel",                     'position' => 1, 'checked' => '-1', 'enabled' => '1'),
132
-	'f.datef'               => array('label' => "Date",                             'position' => 1, 'checked' => '1', 'enabled' => '1'), // f.datef, f.ref, l.rowid
133
-	'p.ref'                 => array('label' => "ProductRef",                       'position' => 1, 'checked' => '1', 'enabled' => '1'),
134
-	'l.description'         => array('label' => "ProductDescription",       		'position' => 1, 'checked' => '-1', 'enabled' => '1'),
135
-	'l.total_ht'            => array('label' => "Amount",                           'position' => 1, 'checked' => '1', 'enabled' => '1'),
136
-	'l.tva_tx'              => array('label' => "VATRate",                          'position' => 1, 'checked' => '1', 'enabled' => '1'),
137
-	's.nom'                 => array('label' => "ThirdParty",                       'position' => 1, 'checked' => '1', 'enabled' => '1'),
138
-	'co.label'              => array('label' => "Country",                          'position' => 1, 'checked' => '1', 'enabled' => '1'),
139
-	's.tva_intra'           => array('label' => "VATIntraShort",                    'position' => 1, 'checked' => '1', 'enabled' => '1'),
140
-	'aa.data_suggest'       => array('label' => "DataUsedToSuggestAccount",         'position' => 1, 'checked' => '1', 'enabled' => '1'), // Seems not used in search.
141
-	'aa.account_number'     => array('label' => "AccountAccountingSuggest",         'position' => 1, 'checked' => '1', 'enabled' => '1'),
129
+	'l.rowid'               => array('label' => "LineId", 'position' => 1, 'checked' => '1', 'enabled' => '1'),
130
+	'f.ref'                 => array('label' => "Invoice", 'position' => 1, 'checked' => '1', 'enabled' => '1'),
131
+	'f.libelle'             => array('label' => "InvoiceLabel", 'position' => 1, 'checked' => '-1', 'enabled' => '1'),
132
+	'f.datef'               => array('label' => "Date", 'position' => 1, 'checked' => '1', 'enabled' => '1'), // f.datef, f.ref, l.rowid
133
+	'p.ref'                 => array('label' => "ProductRef", 'position' => 1, 'checked' => '1', 'enabled' => '1'),
134
+	'l.description'         => array('label' => "ProductDescription", 'position' => 1, 'checked' => '-1', 'enabled' => '1'),
135
+	'l.total_ht'            => array('label' => "Amount", 'position' => 1, 'checked' => '1', 'enabled' => '1'),
136
+	'l.tva_tx'              => array('label' => "VATRate", 'position' => 1, 'checked' => '1', 'enabled' => '1'),
137
+	's.nom'                 => array('label' => "ThirdParty", 'position' => 1, 'checked' => '1', 'enabled' => '1'),
138
+	'co.label'              => array('label' => "Country", 'position' => 1, 'checked' => '1', 'enabled' => '1'),
139
+	's.tva_intra'           => array('label' => "VATIntraShort", 'position' => 1, 'checked' => '1', 'enabled' => '1'),
140
+	'aa.data_suggest'       => array('label' => "DataUsedToSuggestAccount", 'position' => 1, 'checked' => '1', 'enabled' => '1'), // Seems not used in search.
141
+	'aa.account_number'     => array('label' => "AccountAccountingSuggest", 'position' => 1, 'checked' => '1', 'enabled' => '1'),
142 142
 );
143 143
 // @phpstan-ignore-next-line
144 144
 $arrayfields = dol_sort_array($arrayfields, 'position');
@@ -305,20 +305,20 @@  discard block
 block discarded – undo
305 305
 $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f";
306 306
 $sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc";
307 307
 if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) {
308
-	$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity);
308
+	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = ".((int) $conf->entity);
309 309
 }
310 310
 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as co ON co.rowid = s.fk_pays ";
311 311
 $sql .= " INNER JOIN ".MAIN_DB_PREFIX."facture_fourn_det as l ON f.rowid = l.fk_facture_fourn";
312 312
 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = l.fk_product";
313 313
 if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) {
314
-	$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity);
314
+	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity);
315 315
 }
316 316
 $alias_societe_perentity = !getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED') ? "s" : "spe";
317 317
 $alias_product_perentity = !getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED') ? "p" : "ppe";
318
-$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa  ON " . $alias_product_perentity . ".accountancy_code_buy = aa.account_number         AND aa.active = 1  AND aa.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa.entity = ".$conf->entity;
319
-$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa2 ON " . $alias_product_perentity . ".accountancy_code_buy_intra = aa2.account_number  AND aa2.active = 1 AND aa2.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa2.entity = ".$conf->entity;
320
-$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa3 ON " . $alias_product_perentity . ".accountancy_code_buy_export = aa3.account_number AND aa3.active = 1 AND aa3.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa3.entity = ".$conf->entity;
321
-$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa4 ON " . $alias_societe_perentity . ".accountancy_code_buy = aa4.account_number        AND aa4.active = 1 AND aa4.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa4.entity = ".$conf->entity;
318
+$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa  ON ".$alias_product_perentity.".accountancy_code_buy = aa.account_number         AND aa.active = 1  AND aa.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa.entity = ".$conf->entity;
319
+$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa2 ON ".$alias_product_perentity.".accountancy_code_buy_intra = aa2.account_number  AND aa2.active = 1 AND aa2.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa2.entity = ".$conf->entity;
320
+$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa3 ON ".$alias_product_perentity.".accountancy_code_buy_export = aa3.account_number AND aa3.active = 1 AND aa3.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa3.entity = ".$conf->entity;
321
+$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa4 ON ".$alias_societe_perentity.".accountancy_code_buy = aa4.account_number        AND aa4.active = 1 AND aa4.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa4.entity = ".$conf->entity;
322 322
 // Add table from hooks
323 323
 $parameters = array();
324 324
 $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
 	$moreforfilter = '';
535 535
 
536 536
 	$varpage = $contextpage;
537
-	$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, $conf->main_checkbox_left_column);  // This also change content of $arrayfields with user setup
537
+	$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, $conf->main_checkbox_left_column); // This also change content of $arrayfields with user setup
538 538
 	$selectedfields = $htmlofselectarray;
539 539
 	$selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
540 540
 
@@ -759,7 +759,7 @@  discard block
 block discarded – undo
759 759
 		$thirdpartystatic->email = $objp->email;
760 760
 		$thirdpartystatic->country_code = $objp->country_code;
761 761
 		$thirdpartystatic->tva_intra = $objp->tva_intra;
762
-		$thirdpartystatic->code_compta_product = $objp->company_code_buy;		// The accounting account for product stored on thirdparty object (for level3 suggestion)
762
+		$thirdpartystatic->code_compta_product = $objp->company_code_buy; // The accounting account for product stored on thirdparty object (for level3 suggestion)
763 763
 
764 764
 		$product_static->ref = $objp->product_ref;
765 765
 		$product_static->id = $objp->product_id;
@@ -837,7 +837,7 @@  discard block
 block discarded – undo
837 837
 		if ($conf->main_checkbox_left_column) {
838 838
 			print '<td class="nowrap center actioncolumn">';
839 839
 			$selected = in_array($objp->rowid."_".$i, $toselect);
840
-			print '<input type="checkbox" class="flat checkforselect checkforselect'.$facturefourn_static_det->id.'" name="toselect[]" value="'.$facturefourn_static_det->id."_".$i.'"'.($selected ? " checked" : "").'/>';            print '</td>';
840
+			print '<input type="checkbox" class="flat checkforselect checkforselect'.$facturefourn_static_det->id.'" name="toselect[]" value="'.$facturefourn_static_det->id."_".$i.'"'.($selected ? " checked" : "").'/>'; print '</td>';
841 841
 			if (!$i) {
842 842
 				$totalarray['nbfield']++;
843 843
 			}
Please login to merge, or discard this patch.
htdocs/accountancy/customer/list.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 $action = GETPOST('action', 'aZ09');
55 55
 $massaction = GETPOST('massaction', 'alpha');
56 56
 $confirm = GETPOST('confirm', 'alpha');
57
-$toselect = GETPOST('toselect', 'array:aZ09');	// Value can be 'X_Y'
57
+$toselect = GETPOST('toselect', 'array:aZ09'); // Value can be 'X_Y'
58 58
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'accountancycustomerlist'; // To manage different context of search
59 59
 $optioncss = GETPOST('optioncss', 'alpha');
60 60
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
 // Search Getpost
64 64
 $search_societe = GETPOST('search_societe', 'alpha');
65
-$search_lineid = GETPOST('search_lineid', 'alpha');		// Can be '> 100'
65
+$search_lineid = GETPOST('search_lineid', 'alpha'); // Can be '> 100'
66 66
 $search_ref = GETPOST('search_ref', 'alpha');
67 67
 $search_invoice = GETPOST('search_invoice', 'alpha');
68 68
 $search_label = GETPOST('search_label', 'alpha');
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 $search_date_endday = GETPOSTINT('search_date_endday');
77 77
 $search_date_endmonth = GETPOSTINT('search_date_endmonth');
78 78
 $search_date_endyear = GETPOSTINT('search_date_endyear');
79
-$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);	// Use tzserver
79
+$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
80 80
 $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
81 81
 $search_country = GETPOST('search_country', 'aZ09');
82 82
 $search_tvaintra = GETPOST('search_tvaintra', 'alpha');
@@ -128,18 +128,18 @@  discard block
 block discarded – undo
128 128
 }
129 129
 
130 130
 $arrayfields = array(
131
-	'l.rowid'               => array('label' => "LineId",                           'position' => 1, 'checked' => '1', 'enabled' => '1'),
132
-	'f.ref'                 => array('label' => "Invoice",                          'position' => 1, 'checked' => '1', 'enabled' => '1'),
133
-	'f.datef'               => array('label' => "Date",                             'position' => 1, 'checked' => '1', 'enabled' => '1'), // f.datef, f.ref, l.rowid
134
-	'p.ref'                 => array('label' => "ProductRef",                       'position' => 1, 'checked' => '1', 'enabled' => '1'),
135
-	'l.description'         => array('label' => "ProductDescription",       		'position' => 1, 'checked' => '-1', 'enabled' => '1'),
136
-	'l.total_ht'            => array('label' => "Amount",                           'position' => 1, 'checked' => '1', 'enabled' => '1'),
137
-	'l.tva_tx'              => array('label' => "VATRate",                          'position' => 1, 'checked' => '1', 'enabled' => '1'),
138
-	's.nom'                 => array('label' => "ThirdParty",                       'position' => 1, 'checked' => '1', 'enabled' => '1'),
139
-	'co.label'              => array('label' => "Country",                          'position' => 1, 'checked' => '1', 'enabled' => '1'),
140
-	's.tva_intra'           => array('label' => "VATIntraShort",                    'position' => 1, 'checked' => '1', 'enabled' => '1'),
141
-	'aa.data_suggest'       => array('label' => "DataUsedToSuggestAccount",         'position' => 1, 'checked' => '1', 'enabled' => '1'), // Seems not used in search.
142
-	'aa.account_number'     => array('label' => "AccountAccountingSuggest",         'position' => 1, 'checked' => '1', 'enabled' => '1'),
131
+	'l.rowid'               => array('label' => "LineId", 'position' => 1, 'checked' => '1', 'enabled' => '1'),
132
+	'f.ref'                 => array('label' => "Invoice", 'position' => 1, 'checked' => '1', 'enabled' => '1'),
133
+	'f.datef'               => array('label' => "Date", 'position' => 1, 'checked' => '1', 'enabled' => '1'), // f.datef, f.ref, l.rowid
134
+	'p.ref'                 => array('label' => "ProductRef", 'position' => 1, 'checked' => '1', 'enabled' => '1'),
135
+	'l.description'         => array('label' => "ProductDescription", 'position' => 1, 'checked' => '-1', 'enabled' => '1'),
136
+	'l.total_ht'            => array('label' => "Amount", 'position' => 1, 'checked' => '1', 'enabled' => '1'),
137
+	'l.tva_tx'              => array('label' => "VATRate", 'position' => 1, 'checked' => '1', 'enabled' => '1'),
138
+	's.nom'                 => array('label' => "ThirdParty", 'position' => 1, 'checked' => '1', 'enabled' => '1'),
139
+	'co.label'              => array('label' => "Country", 'position' => 1, 'checked' => '1', 'enabled' => '1'),
140
+	's.tva_intra'           => array('label' => "VATIntraShort", 'position' => 1, 'checked' => '1', 'enabled' => '1'),
141
+	'aa.data_suggest'       => array('label' => "DataUsedToSuggestAccount", 'position' => 1, 'checked' => '1', 'enabled' => '1'), // Seems not used in search.
142
+	'aa.account_number'     => array('label' => "AccountAccountingSuggest", 'position' => 1, 'checked' => '1', 'enabled' => '1'),
143 143
 );
144 144
 // @phpstan-ignore-next-line
145 145
 $arrayfields = dol_sort_array($arrayfields, 'position');
@@ -298,20 +298,20 @@  discard block
 block discarded – undo
298 298
 $sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
299 299
 $sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc";
300 300
 if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) {
301
-	$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity);
301
+	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = ".((int) $conf->entity);
302 302
 }
303 303
 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as co ON co.rowid = s.fk_pays ";
304 304
 $sql .= " INNER JOIN ".MAIN_DB_PREFIX."facturedet as l ON f.rowid = l.fk_facture";
305 305
 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = l.fk_product";
306 306
 if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) {
307
-	$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity);
307
+	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity);
308 308
 }
309 309
 $alias_societe_perentity = !getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED') ? "s" : "spe";
310 310
 $alias_product_perentity = !getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED') ? "p" : "ppe";
311
-$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa  ON " . $alias_product_perentity . ".accountancy_code_sell = aa.account_number         AND aa.active = 1  AND aa.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa.entity = ".$conf->entity;
312
-$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa2 ON " . $alias_product_perentity . ".accountancy_code_sell_intra = aa2.account_number  AND aa2.active = 1 AND aa2.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa2.entity = ".$conf->entity;
313
-$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa3 ON " . $alias_product_perentity . ".accountancy_code_sell_export = aa3.account_number AND aa3.active = 1 AND aa3.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa3.entity = ".$conf->entity;
314
-$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa4 ON " . $alias_societe_perentity . ".accountancy_code_sell = aa4.account_number        AND aa4.active = 1 AND aa4.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa4.entity = ".$conf->entity;
311
+$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa  ON ".$alias_product_perentity.".accountancy_code_sell = aa.account_number         AND aa.active = 1  AND aa.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa.entity = ".$conf->entity;
312
+$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa2 ON ".$alias_product_perentity.".accountancy_code_sell_intra = aa2.account_number  AND aa2.active = 1 AND aa2.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa2.entity = ".$conf->entity;
313
+$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa3 ON ".$alias_product_perentity.".accountancy_code_sell_export = aa3.account_number AND aa3.active = 1 AND aa3.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa3.entity = ".$conf->entity;
314
+$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa4 ON ".$alias_societe_perentity.".accountancy_code_sell = aa4.account_number        AND aa4.active = 1 AND aa4.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa4.entity = ".$conf->entity;
315 315
 // Add table from hooks
316 316
 $parameters = array();
317 317
 $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
@@ -521,7 +521,7 @@  discard block
 block discarded – undo
521 521
 	$moreforfilter = '';
522 522
 
523 523
 	$varpage = $contextpage;
524
-	$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, $conf->main_checkbox_left_column);  // This also change content of $arrayfields with user setup
524
+	$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, $conf->main_checkbox_left_column); // This also change content of $arrayfields with user setup
525 525
 	$selectedfields = $htmlofselectarray;
526 526
 	$selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
527 527
 
@@ -713,7 +713,7 @@  discard block
 block discarded – undo
713 713
 
714 714
 
715 715
 	$accountingaccount_codetotid_cache = array();
716
-	$suggestedaccountingaccountfor = '';  // Initialise (for static analysis)
716
+	$suggestedaccountingaccountfor = ''; // Initialise (for static analysis)
717 717
 	$suggestedaccountingaccountbydefaultfor = '';
718 718
 
719 719
 	while ($i < min($num_lines, $limit)) {
@@ -731,14 +731,14 @@  discard block
 block discarded – undo
731 731
 		$thirdpartystatic->client = $objp->client;
732 732
 		$thirdpartystatic->fournisseur = $objp->fournisseur;
733 733
 		$thirdpartystatic->code_client = $objp->code_client;
734
-		$thirdpartystatic->code_compta = $objp->code_compta_client;		// For backward compatibility
734
+		$thirdpartystatic->code_compta = $objp->code_compta_client; // For backward compatibility
735 735
 		$thirdpartystatic->code_compta_client = $objp->code_compta_client;
736 736
 		$thirdpartystatic->code_fournisseur = $objp->code_fournisseur;
737 737
 		$thirdpartystatic->code_compta_fournisseur = $objp->code_compta_fournisseur;
738 738
 		$thirdpartystatic->email = $objp->email;
739 739
 		$thirdpartystatic->country_code = $objp->country_code;
740 740
 		$thirdpartystatic->tva_intra = $objp->tva_intra;
741
-		$thirdpartystatic->code_compta_product = $objp->company_code_sell;		// The accounting account for product stored on thirdparty object (for level3 suggestion)
741
+		$thirdpartystatic->code_compta_product = $objp->company_code_sell; // The accounting account for product stored on thirdparty object (for level3 suggestion)
742 742
 
743 743
 		$product_static->ref = $objp->product_ref;
744 744
 		$product_static->id = $objp->product_id;
Please login to merge, or discard this patch.