Completed
Branch develop (404fac)
by
unknown
20:18
created
doctemplates/websites/website_template-corporate/containers/service-s.php 1 patch
Braces   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 // File generated to wrap the alias page - DO NOT MODIFY - It is just a wrapper to real page
3 3
 global $dolibarr_main_data_root;
4
-if (empty($dolibarr_main_data_root)) require './page196.tpl.php'; else require $dolibarr_main_data_root.'/website/'.$website->ref.'/page196.tpl.php';
4
+if (empty($dolibarr_main_data_root)) {
5
+	require './page196.tpl.php';
6
+} else {
7
+	require $dolibarr_main_data_root.'/website/'.$website->ref.'/page196.tpl.php';
8
+}
5 9
 ?>
Please login to merge, or discard this patch.
websites/website_template-homesubmenu/containers/page202.tpl.php 1 patch
Braces   +7 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php // BEGIN PHP
2
-$websitekey=basename(__DIR__); if (empty($websitepagefile)) $websitepagefile=__FILE__;
2
+$websitekey=basename(__DIR__); if (empty($websitepagefile)) {
3
+	$websitepagefile=__FILE__;
4
+}
3 5
 if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) {
4 6
 	$pathdepth = count(explode('/', $_SERVER['SCRIPT_NAME'])) - 2;
5 7
 	require_once ($pathdepth ? str_repeat('../', $pathdepth) : './').'master.inc.php';
@@ -26,7 +28,10 @@  discard block
 block discarded – undo
26 28
 <!-- Include link to JS file -->
27 29
 <script async src="/javascript.js.php"></script>
28 30
 <!-- Include HTML header from common file -->
29
-<?php if (file_exists(DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html")) include DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html"; ?>
31
+<?php if (file_exists(DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html")) {
32
+	include DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html";
33
+}
34
+?>
30 35
 <!-- Include HTML header from page header block -->
31 36
 <script
32 37
     src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
Please login to merge, or discard this patch.
doctemplates/websites/website_template-homesubmenu/containers/index.php 1 patch
Braces   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 // File generated to wrap the alias page - DO NOT MODIFY - It is just a wrapper to real page
3 3
 global $dolibarr_main_data_root;
4
-if (empty($dolibarr_main_data_root)) require './page202.tpl.php'; else require $dolibarr_main_data_root.'/website/'.$website->ref.'/page202.tpl.php';
4
+if (empty($dolibarr_main_data_root)) {
5
+	require './page202.tpl.php';
6
+} else {
7
+	require $dolibarr_main_data_root.'/website/'.$website->ref.'/page202.tpl.php';
8
+}
5 9
 ?>
Please login to merge, or discard this patch.
websites/website_template-onepageblackpurple/containers/index.php 1 patch
Braces   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 // File generated to wrap the alias page - DO NOT MODIFY - It is just a wrapper to real page
3 3
 global $dolibarr_main_data_root;
4
-if (empty($dolibarr_main_data_root)) require './page148.tpl.php'; else require $dolibarr_main_data_root.'/website/'.$website->ref.'/page148.tpl.php';
4
+if (empty($dolibarr_main_data_root)) {
5
+	require './page148.tpl.php';
6
+} else {
7
+	require $dolibarr_main_data_root.'/website/'.$website->ref.'/page148.tpl.php';
8
+}
Please login to merge, or discard this patch.
htdocs/install/inc.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -134,10 +134,12 @@  discard block
 block discarded – undo
134 134
 	$rest_index = 0;
135 135
 	$opts = getopt($short_options, $long_options, $rest_index);
136 136
 
137
-	foreach ($opts as $opt => $arg) switch ($opt) {
137
+	foreach ($opts as $opt => $arg) {
138
+		switch ($opt) {
138 139
 		case 'c':
139 140
 		case 'config':
140 141
 			$conffile = $arg;
142
+	}
141 143
 			$conffiletoshow = $arg;
142 144
 			break;
143 145
 		case 'h':
@@ -151,8 +153,9 @@  discard block
 block discarded – undo
151 153
 		return strlen($arg) >= 2 && $arg[0] == '-';
152 154
 	});
153 155
 	$parsed_options = array_map(function ($arg) {
154
-		if (strlen($arg) > 1)
155
-			return "--" . $arg;
156
+		if (strlen($arg) > 1) {
157
+					return "--" . $arg;
158
+		}
156 159
 		return "-" . $arg;
157 160
 	}, array_keys($opts));
158 161
 
Please login to merge, or discard this patch.
htdocs/partnership/partnership_card.php 1 patch
Braces   +20 added lines, -7 removed lines patch added patch discarded remove patch
@@ -93,8 +93,12 @@  discard block
 block discarded – undo
93 93
 if (!$permissiontoread) {
94 94
 	accessforbidden();
95 95
 }
96
-if ($object->id > 0 && !($object->fk_member > 0) && $managedfor == 'member') accessforbidden();
97
-if ($object->id > 0 && !($object->fk_soc > 0) && $managedfor == 'thirdparty') accessforbidden();
96
+if ($object->id > 0 && !($object->fk_member > 0) && $managedfor == 'member') {
97
+	accessforbidden();
98
+}
99
+if ($object->id > 0 && !($object->fk_soc > 0) && $managedfor == 'thirdparty') {
100
+	accessforbidden();
101
+}
98 102
 
99 103
 
100 104
 /*
@@ -252,7 +256,9 @@  discard block
 block discarded – undo
252 256
 	}
253 257
 }
254 258
 
255
-if ($object->id > 0 && $object->status == $object::STATUS_REFUSED) $object->fields['reason_decline_or_cancel']['visible'] = 3;
259
+if ($object->id > 0 && $object->status == $object::STATUS_REFUSED) {
260
+	$object->fields['reason_decline_or_cancel']['visible'] = 3;
261
+}
256 262
 
257 263
 
258 264
 
@@ -448,7 +454,11 @@  discard block
 block discarded – undo
448 454
 		$npfilter = "";
449 455
 	}
450 456
 
451
-	if ($managedfor == 'member') $npfilter .= " AND te.fk_member > 0 "; else $npfilter .= " AND te.fk_soc > 0 ";
457
+	if ($managedfor == 'member') {
458
+		$npfilter .= " AND te.fk_member > 0 ";
459
+	} else {
460
+		$npfilter .= " AND te.fk_soc > 0 ";
461
+	}
452 462
 	$object->next_prev_filter = $npfilter;
453 463
 
454 464
 	dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
@@ -539,9 +549,12 @@  discard block
 block discarded – undo
539 549
 
540 550
 				$parameters = array();
541 551
 				$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
542
-				if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
543
-				if (empty($reshook))
544
-					$object->formAddObjectLine(1, $mysoc, $soc);
552
+				if ($reshook < 0) {
553
+					setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
554
+				}
555
+				if (empty($reshook)) {
556
+									$object->formAddObjectLine(1, $mysoc, $soc);
557
+				}
545 558
 			}
546 559
 		}
547 560
 
Please login to merge, or discard this patch.
htdocs/core/lib/pdf.lib.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2484,12 +2484,16 @@
 block discarded – undo
2484 2484
 
2485 2485
 				if (! is_object($order)) {
2486 2486
 					$linkedobjects[$objecttype]['ref_title'] = $outputlangs->transnoentities("RefSending");
2487
-					if (!empty($linkedobjects[$objecttype]['ref_value'])) $linkedobjects[$objecttype]['ref_value'] .= ' / ';
2487
+					if (!empty($linkedobjects[$objecttype]['ref_value'])) {
2488
+						$linkedobjects[$objecttype]['ref_value'] .= ' / ';
2489
+					}
2488 2490
 					$linkedobjects[$objecttype]['ref_value'] .= $outputlangs->transnoentities($elementobject->ref);
2489 2491
 					$linkedobjects[$objecttype]['date_value'] = dol_print_date(empty($elementobject->date_shipping) ? $elementobject->date_delivery : $elementobject->date_shipping, 'day', '', $outputlangs);
2490 2492
 				} else {
2491 2493
 					$linkedobjects[$objecttype]['ref_title'] = $outputlangs->transnoentities("RefOrder").' / '.$outputlangs->transnoentities("RefSending");
2492
-					if (empty($linkedobjects[$objecttype]['ref_value'])) $linkedobjects[$objecttype]['ref_value'] = $outputlangs->convToOutputCharset($order->ref).($order->ref_client ? ' ('.$order->ref_client.')' : '');
2494
+					if (empty($linkedobjects[$objecttype]['ref_value'])) {
2495
+						$linkedobjects[$objecttype]['ref_value'] = $outputlangs->convToOutputCharset($order->ref).($order->ref_client ? ' ('.$order->ref_client.')' : '');
2496
+					}
2493 2497
 					$linkedobjects[$objecttype]['ref_value'] .= ' / '.$outputlangs->transnoentities($elementobject->ref);
2494 2498
 					$linkedobjects[$objecttype]['date_value'] = dol_print_date(empty($elementobject->date_shipping) ? $elementobject->date_delivery : $elementobject->date_shipping, 'day', '', $outputlangs);
2495 2499
 				}
Please login to merge, or discard this patch.
htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php 1 patch
Braces   +126 added lines, -46 removed lines patch added patch discarded remove patch
@@ -116,7 +116,10 @@  discard block
 block discarded – undo
116 116
 
117 117
 		// Get source company
118 118
 		$this->emetteur = $mysoc;
119
-		if (empty($this->emetteur->country_code)) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if was not defined
119
+		if (empty($this->emetteur->country_code)) {
120
+			$this->emetteur->country_code = substr($langs->defaultlang, -2);
121
+		}
122
+		// By default, if was not defined
120 123
 
121 124
 		// Define position of columns
122 125
 		$this->posxdesc = $this->marge_gauche + 1;
@@ -148,9 +151,13 @@  discard block
 block discarded – undo
148 151
 		// phpcs:enable
149 152
 		global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblines;
150 153
 
151
-		if (!is_object($outputlangs)) $outputlangs = $langs;
154
+		if (!is_object($outputlangs)) {
155
+			$outputlangs = $langs;
156
+		}
152 157
 		// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
153
-		if (!empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output = 'ISO-8859-1';
158
+		if (!empty($conf->global->MAIN_USE_FPDF)) {
159
+			$outputlangs->charset_output = 'ISO-8859-1';
160
+		}
154 161
 
155 162
 		// Load translation files required by the page
156 163
 		$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries"));
@@ -176,7 +183,9 @@  discard block
 block discarded – undo
176 183
 			$objphoto = new Product($this->db);
177 184
 
178 185
 			for ($i = 0; $i < $nblines; $i++) {
179
-				if (empty($object->lines[$i]->fk_product)) continue;
186
+				if (empty($object->lines[$i]->fk_product)) {
187
+					continue;
188
+				}
180 189
 
181 190
 				$objphoto->fetch($object->lines[$i]->fk_product);
182 191
 				//var_dump($objphoto->ref);exit;
@@ -211,7 +220,9 @@  discard block
 block discarded – undo
211 220
 					}
212 221
 				}
213 222
 
214
-				if ($realpath && $arephoto) $realpatharray[$i] = $realpath;
223
+				if ($realpath && $arephoto) {
224
+					$realpatharray[$i] = $realpath;
225
+				}
215 226
 			}
216 227
 		}
217 228
 
@@ -296,7 +307,9 @@  discard block
 block discarded – undo
296 307
 
297 308
 				// New page
298 309
 				$pdf->AddPage();
299
-				if (!empty($tplidx)) $pdf->useTemplate($tplidx);
310
+				if (!empty($tplidx)) {
311
+					$pdf->useTemplate($tplidx);
312
+				}
300 313
 				$pagenb++;
301 314
 				$top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs);
302 315
 				$pdf->SetFont('', '', $default_font_size - 1);
@@ -334,7 +347,9 @@  discard block
 block discarded – undo
334 347
 						$salereparray = $object->thirdparty->getSalesRepresentatives($user);
335 348
 						$salerepobj = new User($this->db);
336 349
 						$salerepobj->fetch($salereparray[0]['id']);
337
-						if (!empty($salerepobj->signature)) $notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature);
350
+						if (!empty($salerepobj->signature)) {
351
+							$notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature);
352
+						}
338 353
 					}
339 354
 				}
340 355
 
@@ -371,8 +386,12 @@  discard block
 block discarded – undo
371 386
 						while ($pagenb < $pageposafternote) {
372 387
 							$pdf->AddPage();
373 388
 							$pagenb++;
374
-							if (!empty($tplidx)) $pdf->useTemplate($tplidx);
375
-							if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
389
+							if (!empty($tplidx)) {
390
+								$pdf->useTemplate($tplidx);
391
+							}
392
+							if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
393
+								$this->_pagehead($pdf, $object, 0, $outputlangs);
394
+							}
376 395
 							// $this->_pagefoot($pdf,$object,$outputlangs,1);
377 396
 							$pdf->setTopMargin($tab_top_newpage);
378 397
 							// The only function to edit the bottom margin of current page to set it.
@@ -425,8 +444,12 @@  discard block
 block discarded – undo
425 444
 
426 445
 						// apply note frame to last page
427 446
 						$pdf->setPage($pageposafternote);
428
-						if (!empty($tplidx)) $pdf->useTemplate($tplidx);
429
-						if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
447
+						if (!empty($tplidx)) {
448
+							$pdf->useTemplate($tplidx);
449
+						}
450
+						if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
451
+							$this->_pagehead($pdf, $object, 0, $outputlangs);
452
+						}
430 453
 						$height_note = $posyafter - $tab_top_newpage;
431 454
 						$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
432 455
 					} else // No pagebreak
@@ -443,8 +466,12 @@  discard block
 block discarded – undo
443 466
 							$pagenb++;
444 467
 							$pageposafternote++;
445 468
 							$pdf->setPage($pageposafternote);
446
-							if (!empty($tplidx)) $pdf->useTemplate($tplidx);
447
-							if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
469
+							if (!empty($tplidx)) {
470
+								$pdf->useTemplate($tplidx);
471
+							}
472
+							if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
473
+								$this->_pagehead($pdf, $object, 0, $outputlangs);
474
+							}
448 475
 
449 476
 							$posyafter = $tab_top_newpage;
450 477
 						}
@@ -477,7 +504,9 @@  discard block
 block discarded – undo
477 504
 
478 505
 					// Define size of image if we need it
479 506
 					$imglinesize = array();
480
-					if (!empty($realpatharray[$i])) $imglinesize = pdf_getSizeForImage($realpatharray[$i]);
507
+					if (!empty($realpatharray[$i])) {
508
+						$imglinesize = pdf_getSizeForImage($realpatharray[$i]);
509
+					}
481 510
 
482 511
 					$pdf->setTopMargin($tab_top_newpage);
483 512
 					$pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext + $heightforinfotot); // The only function to edit the bottom margin of current page to set it.
@@ -491,15 +520,19 @@  discard block
 block discarded – undo
491 520
 						// We start with Photo of product line
492 521
 						if (isset($imglinesize['width']) && isset($imglinesize['height']) && ($curY + $imglinesize['height']) > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) {	// If photo too high, we moved completely on new page
493 522
 							$pdf->AddPage('', '', true);
494
-							if (!empty($tplidx)) $pdf->useTemplate($tplidx);
523
+							if (!empty($tplidx)) {
524
+								$pdf->useTemplate($tplidx);
525
+							}
495 526
 							$pdf->setPage($pageposbefore + 1);
496 527
 
497 528
 							$curY = $tab_top_newpage;
498 529
 
499 530
 							// Allows data in the first page if description is long enough to break in multiples pages
500
-							if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
501
-								$showpricebeforepagebreak = 1;
502
-							else $showpricebeforepagebreak = 0;
531
+							if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) {
532
+															$showpricebeforepagebreak = 1;
533
+							} else {
534
+								$showpricebeforepagebreak = 0;
535
+							}
503 536
 						}
504 537
 
505 538
 						if (!empty($this->cols['photo']) && isset($imglinesize['width']) && isset($imglinesize['height'])) {
@@ -534,16 +567,20 @@  discard block
 block discarded – undo
534 567
 							if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) {	// There is no space left for total+free text
535 568
 								if ($i == ($nblines - 1)) {	// No more lines, and no space left to show total, so we create a new page
536 569
 									$pdf->AddPage('', '', true);
537
-									if (!empty($tplidx)) $pdf->useTemplate($tplidx);
570
+									if (!empty($tplidx)) {
571
+										$pdf->useTemplate($tplidx);
572
+									}
538 573
 									//if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
539 574
 									$pdf->setPage($pageposafter + 1);
540 575
 								}
541 576
 							} else {
542 577
 								// We found a page break
543 578
 								// Allows data in the first page if description is long enough to break in multiples pages
544
-								if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
545
-									$showpricebeforepagebreak = 1;
546
-								else $showpricebeforepagebreak = 0;
579
+								if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) {
580
+																	$showpricebeforepagebreak = 1;
581
+								} else {
582
+									$showpricebeforepagebreak = 0;
583
+								}
547 584
 							}
548 585
 						} else // No pagebreak
549 586
 						{
@@ -637,8 +674,11 @@  discard block
 block discarded – undo
637 674
 
638 675
 
639 676
 					// Collection of totals by value of vat in $this->tva["rate"] = total_tva
640
-					if (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva;
641
-					else $tvaligne = $object->lines[$i]->total_tva;
677
+					if (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) {
678
+						$tvaligne = $object->lines[$i]->multicurrency_total_tva;
679
+					} else {
680
+						$tvaligne = $object->lines[$i]->total_tva;
681
+					}
642 682
 
643 683
 					$localtax1ligne = $object->lines[$i]->total_localtax1;
644 684
 					$localtax2ligne = $object->lines[$i]->total_localtax2;
@@ -678,8 +718,12 @@  discard block
 block discarded – undo
678 718
 						}
679 719
 					}
680 720
 
681
-					if (($object->lines[$i]->info_bits & 0x01) == 0x01) $vatrate .= '*';
682
-					if (!isset($this->tva[$vatrate])) 				$this->tva[$vatrate] = 0;
721
+					if (($object->lines[$i]->info_bits & 0x01) == 0x01) {
722
+						$vatrate .= '*';
723
+					}
724
+					if (!isset($this->tva[$vatrate])) {
725
+						$this->tva[$vatrate] = 0;
726
+					}
683 727
 					$this->tva[$vatrate] += $tvaligne;
684 728
 
685 729
 					// Add line
@@ -704,7 +748,9 @@  discard block
 block discarded – undo
704 748
 						$pagenb++;
705 749
 						$pdf->setPage($pagenb);
706 750
 						$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
707
-						if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
751
+						if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
752
+							$this->_pagehead($pdf, $object, 0, $outputlangs);
753
+						}
708 754
 					}
709 755
 					if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
710 756
 						if ($pagenb == $pageposafter) {
@@ -715,16 +761,22 @@  discard block
 block discarded – undo
715 761
 						$this->_pagefoot($pdf, $object, $outputlangs, 1);
716 762
 						// New page
717 763
 						$pdf->AddPage();
718
-						if (!empty($tplidx)) $pdf->useTemplate($tplidx);
764
+						if (!empty($tplidx)) {
765
+							$pdf->useTemplate($tplidx);
766
+						}
719 767
 						$pagenb++;
720
-						if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
768
+						if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
769
+							$this->_pagehead($pdf, $object, 0, $outputlangs);
770
+						}
721 771
 					}
722 772
 				}
723 773
 
724 774
 				// Show square
725
-				if ($pagenb == $pageposbeforeprintlines)
726
-					$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, $hidetop, 0, $object->multicurrency_code);
727
-				else $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0, $object->multicurrency_code);
775
+				if ($pagenb == $pageposbeforeprintlines) {
776
+									$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, $hidetop, 0, $object->multicurrency_code);
777
+				} else {
778
+					$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0, $object->multicurrency_code);
779
+				}
728 780
 				$bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
729 781
 
730 782
 				// Affiche zone infos
@@ -744,7 +796,9 @@  discard block
 block discarded – undo
744 796
 
745 797
 				// Pied de page
746 798
 				$this->_pagefoot($pdf, $object, $outputlangs);
747
-				if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages();
799
+				if (method_exists($pdf, 'AliasNbPages')) {
800
+					$pdf->AliasNbPages();
801
+				}
748 802
 
749 803
 				$pdf->Close();
750 804
 
@@ -943,7 +997,10 @@  discard block
 block discarded – undo
943 997
 		if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') {
944 998
 			if (!empty($object->fk_account) || !empty($object->fk_bank) || getDolGlobalInt('FACTURE_RIB_NUMBER')) {
945 999
 				$bankid = (empty($object->fk_account) ? $conf->global->FACTURE_RIB_NUMBER : $object->fk_account);
946
-				if (!empty($object->fk_bank)) $bankid = $object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank
1000
+				if (!empty($object->fk_bank)) {
1001
+					$bankid = $object->fk_bank;
1002
+				}
1003
+				// For backward compatibility when object->fk_account is forced with object->fk_bank
947 1004
 				$account = new Account($this->db);
948 1005
 				$account->fetch($bankid);
949 1006
 
@@ -1029,7 +1086,9 @@  discard block
 block discarded – undo
1029 1086
 		//$depositsamount=$object->getSumDepositsUsed();
1030 1087
 		//print "x".$creditnoteamount."-".$depositsamount;exit;
1031 1088
 		$resteapayer = price2num($total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 'MT');
1032
-		if (!empty($object->paye)) $resteapayer = 0;
1089
+		if (!empty($object->paye)) {
1090
+			$resteapayer = 0;
1091
+		}
1033 1092
 
1034 1093
 		if ($deja_regle > 0) {
1035 1094
 			// Already paid + Deposits
@@ -1077,7 +1136,9 @@  discard block
 block discarded – undo
1077 1136
 
1078 1137
 		// Force to disable hidetop and hidebottom
1079 1138
 		$hidebottom = 0;
1080
-		if ($hidetop) $hidetop = -1;
1139
+		if ($hidetop) {
1140
+			$hidetop = -1;
1141
+		}
1081 1142
 
1082 1143
 		$currency = !empty($currency) ? $currency : $conf->currency;
1083 1144
 		$default_font_size = pdf_getPDFFontSize($outputlangs);
@@ -1152,7 +1213,9 @@  discard block
 block discarded – undo
1152 1213
 		if (!getDolGlobalInt('PDF_DISABLE_MYCOMPANY_LOGO')) {
1153 1214
 			if ($this->emetteur->logo) {
1154 1215
 				$logodir = $conf->mycompany->dir_output;
1155
-				if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
1216
+				if (!empty($conf->mycompany->multidir_output[$object->entity])) {
1217
+					$logodir = $conf->mycompany->multidir_output[$object->entity];
1218
+				}
1156 1219
 				if (!getDolGlobalInt('MAIN_PDF_USE_LARGE_LOGO')) {
1157 1220
 					$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
1158 1221
 				} else {
@@ -1293,18 +1356,28 @@  discard block
 block discarded – undo
1293 1356
 				$result = $object->fetch_contact($arrayidcontact[0]);
1294 1357
 			}
1295 1358
 
1296
-			if ($usecontact) $thirdparty = $object->contact;
1297
-			else $thirdparty = $this->emetteur;
1359
+			if ($usecontact) {
1360
+				$thirdparty = $object->contact;
1361
+			} else {
1362
+				$thirdparty = $this->emetteur;
1363
+			}
1298 1364
 
1299
-			if (!empty($thirdparty)) $carac_emetteur_name = pdfBuildThirdpartyName($thirdparty, $outputlangs);
1365
+			if (!empty($thirdparty)) {
1366
+				$carac_emetteur_name = pdfBuildThirdpartyName($thirdparty, $outputlangs);
1367
+			}
1300 1368
 
1301
-			if ($usecontact) $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, $object->contact, 1, 'targetwithdetails', $object);
1302
-			else $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object);
1369
+			if ($usecontact) {
1370
+				$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, $object->contact, 1, 'targetwithdetails', $object);
1371
+			} else {
1372
+				$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object);
1373
+			}
1303 1374
 
1304 1375
 			// Show sender
1305 1376
 			$posy = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42;
1306 1377
 			$posx = $this->marge_gauche;
1307
-			if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->page_largeur - $this->marge_droite - 80;
1378
+			if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) {
1379
+				$posx = $this->page_largeur - $this->marge_droite - 80;
1380
+			}
1308 1381
 
1309 1382
 			$hautcadre = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 38 : 40;
1310 1383
 			$widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 82;
@@ -1348,16 +1421,23 @@  discard block
 block discarded – undo
1348 1421
 				$thirdparty = $object->thirdparty;
1349 1422
 			}
1350 1423
 
1351
-			if (!empty($thirdparty)) $carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs);
1424
+			if (!empty($thirdparty)) {
1425
+				$carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs);
1426
+			}
1352 1427
 
1353 1428
 			$carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, (!empty($object->contact) ? $object->contact : null), $usecontact, 'targetwithdetails', $object);
1354 1429
 
1355 1430
 			// Show recipient
1356 1431
 			$widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 100;
1357
-			if ($this->page_largeur < 210) $widthrecbox = 84; // To work with US executive format
1432
+			if ($this->page_largeur < 210) {
1433
+				$widthrecbox = 84;
1434
+			}
1435
+			// To work with US executive format
1358 1436
 			$posy = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42;
1359 1437
 			$posx = $this->page_largeur - $this->marge_droite - $widthrecbox;
1360
-			if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->marge_gauche;
1438
+			if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) {
1439
+				$posx = $this->marge_gauche;
1440
+			}
1361 1441
 
1362 1442
 			// Show recipient frame
1363 1443
 			$pdf->SetTextColor(0, 0, 0);
Please login to merge, or discard this patch.
htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1414,7 +1414,9 @@
 block discarded – undo
1414 1414
 		global $conf, $langs, $hookmanager, $mysoc;
1415 1415
 
1416 1416
 		$ltrdirection = 'L';
1417
-		if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R';
1417
+		if ($outputlangs->trans("DIRECTION") == 'rtl') {
1418
+			$ltrdirection = 'R';
1419
+		}
1418 1420
 
1419 1421
 		// Load traductions files required by page
1420 1422
 		$outputlangs->loadLangs(array("main", "bills", "propal", "orders", "companies"));
Please login to merge, or discard this patch.