@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | $this->situationinvoice = false; |
176 | 176 | |
177 | 177 | if ($mysoc === null) { |
178 | - dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'. getCallerInfoString(), LOG_ERR); |
|
178 | + dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'.getCallerInfoString(), LOG_ERR); |
|
179 | 179 | return; |
180 | 180 | } |
181 | 181 | |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | if (!empty($conf->mycompany->multidir_output[$object->entity])) { |
338 | 338 | $logodir = $conf->mycompany->multidir_output[$object->entity]; |
339 | 339 | } |
340 | - $pagecount = $pdf->setSourceFile($logodir.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
340 | + $pagecount = $pdf->setSourceFile($logodir.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
341 | 341 | $tplidx = $pdf->importPage(1); |
342 | 342 | } |
343 | 343 | |
@@ -451,7 +451,7 @@ discard block |
||
451 | 451 | // $pdf->GetY() here can't be used. It is bottom of the second address box but first one may be higher |
452 | 452 | |
453 | 453 | // $tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks) |
454 | - $tab_top = 90 + $top_shift; // top_shift is an addition for linked objects or addons (0 in most cases) |
|
454 | + $tab_top = 90 + $top_shift; // top_shift is an addition for linked objects or addons (0 in most cases) |
|
455 | 455 | $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); |
456 | 456 | |
457 | 457 | // You can add more thing under header here, if you increase $extra_under_address_shift too. |
@@ -794,11 +794,11 @@ discard block |
||
794 | 794 | if (!isset($this->tva[$vatrate])) { |
795 | 795 | $this->tva[$vatrate] = 0; |
796 | 796 | } |
797 | - $this->tva[$vatrate] += $tvaligne; // ->tva is abandoned, we use now ->tva_array that is more complete |
|
797 | + $this->tva[$vatrate] += $tvaligne; // ->tva is abandoned, we use now ->tva_array that is more complete |
|
798 | 798 | $vatcode = $object->lines[$i]->vat_src_code; |
799 | 799 | if (getDolGlobalInt('PDF_INVOICE_SHOW_VAT_ANALYSIS')) { |
800 | 800 | if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['tot_ht'])) { |
801 | - $this->tva_array[$vatrate . ($vatcode ? ' (' . $vatcode . ')' : '')]['tot_ht'] = 0; |
|
801 | + $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['tot_ht'] = 0; |
|
802 | 802 | } |
803 | 803 | $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate' => $vatrate, 'vatcode' => $vatcode, 'amount' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne, 'tot_ht' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['tot_ht'] + $object->lines[$i]->total_ht); |
804 | 804 | } else { |
@@ -888,7 +888,7 @@ discard block |
||
888 | 888 | // Pagefoot |
889 | 889 | $this->_pagefoot($pdf, $object, $outputlangs, 0, $this->getHeightForQRInvoice($pdf->getPage(), $object, $langs)); |
890 | 890 | if (method_exists($pdf, 'AliasNbPages')) { |
891 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
891 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
892 | 892 | } |
893 | 893 | |
894 | 894 | // Add terms to sale |
@@ -1205,7 +1205,7 @@ discard block |
||
1205 | 1205 | foreach ($this->tva_array as $tvakey => $tvaval) { |
1206 | 1206 | $pdf->SetFont('', '', $default_font_size - 2); |
1207 | 1207 | $pdf->SetXY($this->marge_gauche, $posy); |
1208 | - $titre = round((float) $tvakey, 2) . "%"; |
|
1208 | + $titre = round((float) $tvakey, 2)."%"; |
|
1209 | 1209 | $pdf->MultiCell(25, 4, $titre, 0, 'L'); |
1210 | 1210 | |
1211 | 1211 | $pdf->SetFont('', '', $default_font_size - 2); |
@@ -1247,7 +1247,7 @@ discard block |
||
1247 | 1247 | } |
1248 | 1248 | |
1249 | 1249 | $posxval = 52; |
1250 | - $posxend = 110; // End of x for text on left side |
|
1250 | + $posxend = 110; // End of x for text on left side |
|
1251 | 1251 | if ($this->page_largeur < 210) { // To work with US executive format |
1252 | 1252 | $posxend -= 10; |
1253 | 1253 | } |
@@ -1265,7 +1265,7 @@ discard block |
||
1265 | 1265 | $lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement); |
1266 | 1266 | $pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L'); |
1267 | 1267 | |
1268 | - $posy = $pdf->GetY() + 3; // We need spaces for 2 lines payment conditions |
|
1268 | + $posy = $pdf->GetY() + 3; // We need spaces for 2 lines payment conditions |
|
1269 | 1269 | } |
1270 | 1270 | |
1271 | 1271 | // Show category of operations |
@@ -1277,7 +1277,7 @@ discard block |
||
1277 | 1277 | |
1278 | 1278 | $pdf->SetFont('', '', $default_font_size - 2); |
1279 | 1279 | $pdf->SetXY($posxval, $posy); |
1280 | - $categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation); |
|
1280 | + $categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation); |
|
1281 | 1281 | $pdf->MultiCell($posxend - $posxval, 4, $categoryOfOperationLabel, 0, 'L'); |
1282 | 1282 | |
1283 | 1283 | $posy = $pdf->GetY() + 3; // for 2 lines |
@@ -1428,7 +1428,7 @@ discard block |
||
1428 | 1428 | include_once DOL_DOCUMENT_ROOT.'/core/lib/functions_be.lib.php'; |
1429 | 1429 | $invoicePaymentKey = dolBECalculateStructuredCommunication($object->ref, $object->type); |
1430 | 1430 | |
1431 | - $pdf->MultiCell(100, 3, $outputlangs->transnoentities('StructuredCommunication').": " . $outputlangs->convToOutputCharset($invoicePaymentKey), 0, 'L', 0); |
|
1431 | + $pdf->MultiCell(100, 3, $outputlangs->transnoentities('StructuredCommunication').": ".$outputlangs->convToOutputCharset($invoicePaymentKey), 0, 'L', 0); |
|
1432 | 1432 | } |
1433 | 1433 | } |
1434 | 1434 | } |
@@ -1874,7 +1874,7 @@ discard block |
||
1874 | 1874 | if (empty($hidetop)) { |
1875 | 1875 | // Show category of operations |
1876 | 1876 | if (getDolGlobalInt('INVOICE_CATEGORY_OF_OPERATION') == 1 && $this->categoryOfOperation >= 0) { |
1877 | - $categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations") . ' : ' . $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation); |
|
1877 | + $categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations").' : '.$outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation); |
|
1878 | 1878 | $pdf->SetXY($this->marge_gauche, $tab_top - 4); |
1879 | 1879 | $pdf->MultiCell(($pdf->GetStringWidth($categoryOfOperations)) + 4, 2, $categoryOfOperations); |
1880 | 1880 | } |
@@ -2043,7 +2043,7 @@ discard block |
||
2043 | 2043 | } |
2044 | 2044 | if ($this->situationinvoice) { |
2045 | 2045 | $langs->loadLangs(array("other")); |
2046 | - $title = $outputlangs->transnoentities("PDFInvoiceSituation") . " " . $outputlangs->transnoentities("NumberingShort") . $object->situation_counter . " -"; |
|
2046 | + $title = $outputlangs->transnoentities("PDFInvoiceSituation")." ".$outputlangs->transnoentities("NumberingShort").$object->situation_counter." -"; |
|
2047 | 2047 | } |
2048 | 2048 | if (getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE') && is_object($outputlangsbis)) { |
2049 | 2049 | $title .= ' - '; |
@@ -2278,7 +2278,7 @@ discard block |
||
2278 | 2278 | |
2279 | 2279 | $carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs); |
2280 | 2280 | |
2281 | - $mode = 'target'; |
|
2281 | + $mode = 'target'; |
|
2282 | 2282 | $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), ($usecontact ? 1 : 0), $mode, $object); |
2283 | 2283 | |
2284 | 2284 | // Show recipient |
@@ -2333,7 +2333,7 @@ discard block |
||
2333 | 2333 | if (!empty($carac_client_shipping)) { |
2334 | 2334 | $posy += $hautcadre; |
2335 | 2335 | |
2336 | - $hautcadre -= 10; // Height for the shipping address does not need to be as high as main box |
|
2336 | + $hautcadre -= 10; // Height for the shipping address does not need to be as high as main box |
|
2337 | 2337 | |
2338 | 2338 | // Show shipping frame |
2339 | 2339 | $pdf->SetXY($posx + 2, $posy - 5); |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | $this->atleastonediscount = 0; |
161 | 161 | |
162 | 162 | if ($mysoc === null) { |
163 | - dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'. getCallerInfoString(), LOG_ERR); |
|
163 | + dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'.getCallerInfoString(), LOG_ERR); |
|
164 | 164 | return; |
165 | 165 | } |
166 | 166 | |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | if (!empty($conf->mycompany->multidir_output[$object->entity])) { |
330 | 330 | $logodir = $conf->mycompany->multidir_output[$object->entity]; |
331 | 331 | } |
332 | - $pagecount = $pdf->setSourceFile($logodir.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
332 | + $pagecount = $pdf->setSourceFile($logodir.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
333 | 333 | $tplidx = $pdf->importPage(1); |
334 | 334 | } |
335 | 335 | |
@@ -762,7 +762,7 @@ discard block |
||
762 | 762 | // Pied de page |
763 | 763 | $this->_pagefoot($pdf, $object, $outputlangs); |
764 | 764 | if (method_exists($pdf, 'AliasNbPages')) { |
765 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
765 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
766 | 766 | } |
767 | 767 | |
768 | 768 | // Add terms to sale |
@@ -1767,7 +1767,7 @@ discard block |
||
1767 | 1767 | |
1768 | 1768 | $carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs); |
1769 | 1769 | |
1770 | - $mode = 'target'; |
|
1770 | + $mode = 'target'; |
|
1771 | 1771 | $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), ($usecontact ? 1 : 0), $mode, $object); |
1772 | 1772 | |
1773 | 1773 | // Show recipient |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $this->atleastonediscount = 0; |
137 | 137 | |
138 | 138 | if ($mysoc === null) { |
139 | - dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'. getCallerInfoString(), LOG_ERR); |
|
139 | + dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'.getCallerInfoString(), LOG_ERR); |
|
140 | 140 | return; |
141 | 141 | } |
142 | 142 | |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | if (!empty($conf->mycompany->multidir_output[$object->entity])) { |
309 | 309 | $logodir = $conf->mycompany->multidir_output[$object->entity]; |
310 | 310 | } |
311 | - $pagecount = $pdf->setSourceFile($logodir.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
311 | + $pagecount = $pdf->setSourceFile($logodir.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
312 | 312 | $tplidx = $pdf->importPage(1); |
313 | 313 | } |
314 | 314 | |
@@ -883,7 +883,7 @@ discard block |
||
883 | 883 | |
884 | 884 | // Add number of pages in footer |
885 | 885 | if (method_exists($pdf, 'AliasNbPages')) { |
886 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
886 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
887 | 887 | } |
888 | 888 | |
889 | 889 | // Add terms to sale |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | $this->atleastonediscount = 0; |
159 | 159 | |
160 | 160 | if ($mysoc === null) { |
161 | - dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'. getCallerInfoString(), LOG_ERR); |
|
161 | + dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'.getCallerInfoString(), LOG_ERR); |
|
162 | 162 | return; |
163 | 163 | } |
164 | 164 | |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | if (!empty($conf->mycompany->multidir_output[$object->entity])) { |
279 | 279 | $logodir = $conf->mycompany->multidir_output[$object->entity]; |
280 | 280 | } |
281 | - $pagecount = $pdf->setSourceFile($logodir.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
281 | + $pagecount = $pdf->setSourceFile($logodir.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
282 | 282 | $tplidx = $pdf->importPage(1); |
283 | 283 | } |
284 | 284 | |
@@ -637,7 +637,7 @@ discard block |
||
637 | 637 | // Pied de page |
638 | 638 | $this->_pagefoot($pdf, $object, $outputlangs); |
639 | 639 | if (method_exists($pdf, 'AliasNbPages')) { |
640 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
640 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
641 | 641 | } |
642 | 642 | |
643 | 643 | // Add terms to sale |
@@ -1554,7 +1554,7 @@ discard block |
||
1554 | 1554 | |
1555 | 1555 | $carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs); |
1556 | 1556 | |
1557 | - $mode = 'target'; |
|
1557 | + $mode = 'target'; |
|
1558 | 1558 | $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), ($usecontact ? 1 : 0), $mode, $object); |
1559 | 1559 | |
1560 | 1560 | // Show recipient |
@@ -1609,7 +1609,7 @@ discard block |
||
1609 | 1609 | if (!empty($carac_client_shipping)) { |
1610 | 1610 | $posy += $hautcadre; |
1611 | 1611 | |
1612 | - $hautcadre -= 10; // Height for the shipping address does not need to be as high as main box |
|
1612 | + $hautcadre -= 10; // Height for the shipping address does not need to be as high as main box |
|
1613 | 1613 | |
1614 | 1614 | // Show shipping frame |
1615 | 1615 | $pdf->SetXY($posx + 2, $posy - 5); |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | $this->watermark = ''; |
130 | 130 | |
131 | 131 | if ($mysoc === null) { |
132 | - dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'. getCallerInfoString(), LOG_ERR); |
|
132 | + dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'.getCallerInfoString(), LOG_ERR); |
|
133 | 133 | return; |
134 | 134 | } |
135 | 135 | |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | } |
278 | 278 | |
279 | 279 | if ($dir === null) { |
280 | - dol_syslog(get_class($this).'::'.__METHOD__."Target directory should not be null.". getCallerInfoString(), LOG_ERR); |
|
280 | + dol_syslog(get_class($this).'::'.__METHOD__."Target directory should not be null.".getCallerInfoString(), LOG_ERR); |
|
281 | 281 | $this->error = $langs->transnoentities("ErrorCanNotCreateDir", "Null dir"); |
282 | 282 | return 0; |
283 | 283 | } |
@@ -860,7 +860,7 @@ discard block |
||
860 | 860 | |
861 | 861 | // Add number of pages in footer |
862 | 862 | if (method_exists($pdf, 'AliasNbPages')) { |
863 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
863 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
864 | 864 | } |
865 | 865 | |
866 | 866 | // Add terms to sale |
@@ -1750,7 +1750,7 @@ discard block |
||
1750 | 1750 | $carac_client_name = ''; |
1751 | 1751 | } |
1752 | 1752 | |
1753 | - $mode = 'target'; |
|
1753 | + $mode = 'target'; |
|
1754 | 1754 | $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), ($usecontact ? 1 : 0), $mode, $object); |
1755 | 1755 | |
1756 | 1756 | // Show recipient |
@@ -1805,7 +1805,7 @@ discard block |
||
1805 | 1805 | if (!empty($carac_client_shipping)) { |
1806 | 1806 | $posy += $hautcadre; |
1807 | 1807 | |
1808 | - $hautcadre -= 10; // Height for the shipping address does not need to be as high as main box |
|
1808 | + $hautcadre -= 10; // Height for the shipping address does not need to be as high as main box |
|
1809 | 1809 | |
1810 | 1810 | // Show shipping frame |
1811 | 1811 | $pdf->SetXY($posx + 2, $posy - 5); |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $this->posxdesc = $this->marge_gauche + 1; |
125 | 125 | |
126 | 126 | if ($mysoc === null) { |
127 | - dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'. getCallerInfoString(), LOG_ERR); |
|
127 | + dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'.getCallerInfoString(), LOG_ERR); |
|
128 | 128 | return; |
129 | 129 | } |
130 | 130 | |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | } |
193 | 193 | |
194 | 194 | if ($dir === null) { |
195 | - dol_syslog(get_class($this).'::'.__METHOD__."Target directory should not be null.". getCallerInfoString(), LOG_ERR); |
|
195 | + dol_syslog(get_class($this).'::'.__METHOD__."Target directory should not be null.".getCallerInfoString(), LOG_ERR); |
|
196 | 196 | $this->error = $langs->transnoentities("ErrorCanNotCreateDir", "Null dir"); |
197 | 197 | return 0; |
198 | 198 | } |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | if (!empty($conf->mycompany->multidir_output[$object->entity])) { |
242 | 242 | $logodir = $conf->mycompany->multidir_output[$object->entity]; |
243 | 243 | } |
244 | - $pagecount = $pdf->setSourceFile($logodir.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
244 | + $pagecount = $pdf->setSourceFile($logodir.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
245 | 245 | $tplidx = $pdf->importPage(1); |
246 | 246 | } |
247 | 247 | |
@@ -367,10 +367,10 @@ discard block |
||
367 | 367 | $desc = dol_htmlentitiesbr($objectligne->desc, 1); // Desc (not empty for free lines) |
368 | 368 | $txt = ''; |
369 | 369 | if (!getDolGlobalString('CONTRACT_HIDE_QTY_ON_PDF')) { |
370 | - $txt .= $outputlangs->transnoentities("Quantity") . ' : <strong>' . $objectligne->qty . '</strong>'; |
|
370 | + $txt .= $outputlangs->transnoentities("Quantity").' : <strong>'.$objectligne->qty.'</strong>'; |
|
371 | 371 | } |
372 | 372 | if (!getDolGlobalString('CONTRACT_HIDE_PRICE_ON_PDF')) { |
373 | - $txt .= ' - ' . $outputlangs->transnoentities("UnitPrice") . ' : <strong>' . price($objectligne->subprice) . '</strong>'; |
|
373 | + $txt .= ' - '.$outputlangs->transnoentities("UnitPrice").' : <strong>'.price($objectligne->subprice).'</strong>'; |
|
374 | 374 | } |
375 | 375 | if (!getDolGlobalString('CONTRACT_HIDE_PLANNED_DATE_ON_PDF')) { |
376 | 376 | $txt .= '<br>'; |
@@ -487,7 +487,7 @@ discard block |
||
487 | 487 | |
488 | 488 | $this->_pagefoot($pdf, $object, $outputlangs); |
489 | 489 | if (method_exists($pdf, 'AliasNbPages')) { |
490 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
490 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
491 | 491 | } |
492 | 492 | |
493 | 493 | $pdf->Close(); |
@@ -75,11 +75,11 @@ discard block |
||
75 | 75 | /** |
76 | 76 | * @var float |
77 | 77 | */ |
78 | - public $posxcomm; // For customer comment column |
|
78 | + public $posxcomm; // For customer comment column |
|
79 | 79 | /** |
80 | 80 | * @var float |
81 | 81 | */ |
82 | - public $posxweightvol; // For weight or volume |
|
82 | + public $posxweightvol; // For weight or volume |
|
83 | 83 | /** |
84 | 84 | * @var float |
85 | 85 | */ |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | |
120 | 120 | // Define position of columns |
121 | 121 | $this->posxdesc = $this->marge_gauche + 1; |
122 | - $this->posxcomm = 112; // customer comment |
|
122 | + $this->posxcomm = 112; // customer comment |
|
123 | 123 | //$this->posxtva=112; |
124 | 124 | //$this->posxup=126; |
125 | 125 | $this->posxqty = 165; |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | } |
137 | 137 | |
138 | 138 | if ($mysoc === null) { |
139 | - dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'. getCallerInfoString(), LOG_ERR); |
|
139 | + dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'.getCallerInfoString(), LOG_ERR); |
|
140 | 140 | return; |
141 | 141 | } |
142 | 142 | |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | $pdf->SetFont(pdf_getPDFFont($outputlangs)); |
228 | 228 | // Set path to the background PDF File |
229 | 229 | if (getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) { |
230 | - $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
230 | + $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
231 | 231 | $tplidx = $pdf->importPage(1); |
232 | 232 | } |
233 | 233 | |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | $this->_pagefoot($pdf, $object, $outputlangs); |
506 | 506 | |
507 | 507 | if (method_exists($pdf, 'AliasNbPages')) { |
508 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
508 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
509 | 509 | } |
510 | 510 | |
511 | 511 | // Check product remaining to be delivered |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | |
214 | 214 | $filetoread = realpath(dol_osencode($file)); // Chemin canonique absolu de l'image |
215 | 215 | |
216 | - $infoImg = getimagesize($filetoread); // Get data about src image |
|
216 | + $infoImg = getimagesize($filetoread); // Get data about src image |
|
217 | 217 | $imgWidth = $infoImg[0]; // Largeur de l'image |
218 | 218 | $imgHeight = $infoImg[1]; // Hauteur de l'image |
219 | 219 | |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | } |
339 | 339 | |
340 | 340 | // Set transparent color according to image extension |
341 | - $trans_colour = -1; // By default, undefined |
|
341 | + $trans_colour = -1; // By default, undefined |
|
342 | 342 | switch ($newExt) { |
343 | 343 | case 'gif': // Gif |
344 | 344 | $trans_colour = imagecolorallocate($imgTarget, 255, 255, 255); // The method is different for the GIF format |
@@ -559,8 +559,8 @@ discard block |
||
559 | 559 | } |
560 | 560 | |
561 | 561 | $infoImg = getimagesize($filetoread); // Get information like size and real format of image. Warning real format may be png when extension is .jpg |
562 | - $imgWidth = $infoImg[0]; // Width of image |
|
563 | - $imgHeight = $infoImg[1]; // Height of image |
|
562 | + $imgWidth = $infoImg[0]; // Width of image |
|
563 | + $imgHeight = $infoImg[1]; // Height of image |
|
564 | 564 | |
565 | 565 | // TODO LDR |
566 | 566 | //if $infoImg[2] != extension of file $file, return a string 'Error: content of file has a format that differs of the format of its extension |
@@ -811,7 +811,7 @@ discard block |
||
811 | 811 | imagejpeg($imgThumb, $imgThumbName, $newquality); // @phan-suppress-current-line PhanTypeMismatchArgumentNullableInternal,PhanPossiblyUndeclaredVariable |
812 | 812 | break; |
813 | 813 | case IMAGETYPE_PNG: // 3 |
814 | - imagepng($imgThumb, $imgThumbName, !is_numeric($newquality) ? -1 : (int) $newquality); // @phan-suppress-current-line PhanPossiblyUndeclaredVariable |
|
814 | + imagepng($imgThumb, $imgThumbName, !is_numeric($newquality) ? -1 : (int) $newquality); // @phan-suppress-current-line PhanPossiblyUndeclaredVariable |
|
815 | 815 | break; |
816 | 816 | case IMAGETYPE_BMP: // 6 |
817 | 817 | // Not supported by PHP GD |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | */ |
34 | 34 | function dolStripPhpCode($str, $replacewith = '') |
35 | 35 | { |
36 | - $str = str_replace('<?=', '<?php echo', $str); // replace a bad practive |
|
36 | + $str = str_replace('<?=', '<?php echo', $str); // replace a bad practive |
|
37 | 37 | |
38 | 38 | $newstr = ''; |
39 | 39 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | { |
80 | 80 | $str = str_replace('<?=', '<?php echo', $str); |
81 | 81 | $str = str_replace('<?php', '__LTINTPHP__', $str); |
82 | - $str = str_replace('<?', '<?php', $str); // replace the short_open_tag. It is recommended to set this to Off in php.ini |
|
82 | + $str = str_replace('<?', '<?php', $str); // replace the short_open_tag. It is recommended to set this to Off in php.ini |
|
83 | 83 | $str = str_replace('__LTINTPHP__', '<?php', $str); |
84 | 84 | |
85 | 85 | $newstr = ''; |
@@ -332,9 +332,9 @@ discard block |
||
332 | 332 | // at end we replace the '!~!~!~' only if we are in final parent page. |
333 | 333 | $content = preg_replace('/(href=")\/?([^:\"\!]*)\.php\?([^#\"<>]*)(#[^\"<>]*)?\"/', '\1!~!~!~'.DOL_URL_ROOT.'/public/website/index.php?website='.$website->ref.'&pageref=\2&\3\4"', $content, -1, $nbrep); |
334 | 334 | // Replace occurrence like _service_XXX.php with dolibarr URL |
335 | - $content = preg_replace('/([\'"])_service_([^\'"]+)\.php\1/', '\1!~!~!~' . DOL_URL_ROOT . '/public/website/index.php?website=' . $website->ref . '&pageref=_service_\2\1', $content, -1, $nbrep); |
|
335 | + $content = preg_replace('/([\'"])_service_([^\'"]+)\.php\1/', '\1!~!~!~'.DOL_URL_ROOT.'/public/website/index.php?website='.$website->ref.'&pageref=_service_\2\1', $content, -1, $nbrep); |
|
336 | 336 | // Replace occurrence like _library_XXX.php with dolibarr URL |
337 | - $content = preg_replace('/([\'"])_library_([^\'"]+)\.php\1/', '\1!~!~!~' . DOL_URL_ROOT . '/public/website/index.php?website=' . $website->ref . '&pageref=_library_\2\1', $content, -1, $nbrep); |
|
337 | + $content = preg_replace('/([\'"])_library_([^\'"]+)\.php\1/', '\1!~!~!~'.DOL_URL_ROOT.'/public/website/index.php?website='.$website->ref.'&pageref=_library_\2\1', $content, -1, $nbrep); |
|
338 | 338 | // Replace relative link without .php like /xxx#aaa or /xxx with dolibarr URL: ...href="....php" |
339 | 339 | $content = preg_replace('/(href=")\/?([a-zA-Z0-9\-_#]+)(\"|\?)/', '\1!~!~!~'.DOL_URL_ROOT.'/public/website/index.php?website='.$website->ref.'&pageref=\2\3', $content, -1, $nbrep); |
340 | 340 | |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | } |
433 | 433 | |
434 | 434 | if (getDolGlobalString('WEBSITE_ADD_CSS_TO_BODY')) { |
435 | - $content = str_replace('<body id="bodywebsite" class="bodywebsite', '<body id="bodywebsite" class="bodywebsite ' . getDolGlobalString('WEBSITE_ADD_CSS_TO_BODY'), $content); |
|
435 | + $content = str_replace('<body id="bodywebsite" class="bodywebsite', '<body id="bodywebsite" class="bodywebsite '.getDolGlobalString('WEBSITE_ADD_CSS_TO_BODY'), $content); |
|
436 | 436 | } |
437 | 437 | |
438 | 438 | $content = dolReplaceSmileyCodeWithUTF8($content); |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | $sql .= " WHERE rowid = ".((int) $websiteid); |
470 | 470 | |
471 | 471 | $resql = $db->query($sql); |
472 | - if (! $resql) { |
|
472 | + if (!$resql) { |
|
473 | 473 | return -1; |
474 | 474 | } |
475 | 475 | } |
@@ -557,7 +557,7 @@ discard block |
||
557 | 557 | unset($tmpwebsitepage); |
558 | 558 | } |
559 | 559 | if ($result > 0) { |
560 | - $currenturi = $_SERVER["REQUEST_URI"]; // Example: /public/website/index.php?website=mywebsite.com&pageref=mywebsite-home&nocache=1708177483 |
|
560 | + $currenturi = $_SERVER["REQUEST_URI"]; // Example: /public/website/index.php?website=mywebsite.com&pageref=mywebsite-home&nocache=1708177483 |
|
561 | 561 | $regtmp = array(); |
562 | 562 | if (preg_match('/&pageref=([^&]+)/', $currenturi, $regtmp)) { |
563 | 563 | if ($regtmp[0] == $containerref) { |
@@ -578,7 +578,7 @@ discard block |
||
578 | 578 | if ($newurl) { |
579 | 579 | if (!empty($parameters)) { |
580 | 580 | $separator = (parse_url($newurl, PHP_URL_QUERY) == null) ? '?' : '&'; |
581 | - $newurl = $newurl . $separator . http_build_query($parameters); |
|
581 | + $newurl = $newurl.$separator.http_build_query($parameters); |
|
582 | 582 | } |
583 | 583 | if ($permanent) { |
584 | 584 | header("Status: 301 Moved Permanently", false, 301); |
@@ -619,7 +619,7 @@ discard block |
||
619 | 619 | $fullpathcache = ''; |
620 | 620 | // If we ask to use the cache delay |
621 | 621 | if ($cachedelay > 0 && !getDolGlobalString("WEBSITE_DISABLE_CACHE_OF_CONTAINERS")) { |
622 | - $fullpathcache = DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/website/temp/'.$websitekey.'-'.$websitepage->id.'-'.$containerref.($cachekey ? '-'.$cachekey: '').'.cache'; |
|
622 | + $fullpathcache = DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/website/temp/'.$websitekey.'-'.$websitepage->id.'-'.$containerref.($cachekey ? '-'.$cachekey : '').'.cache'; |
|
623 | 623 | } |
624 | 624 | |
625 | 625 | if (empty($includehtmlcontentopened)) { |
@@ -635,7 +635,7 @@ discard block |
||
635 | 635 | |
636 | 636 | // We don't print info messages for pages of type library or service |
637 | 637 | if (!empty($websitepage->type_container) && !in_array($websitepage->type_container, array('library', 'service'))) { |
638 | - print "\n".'<!-- include '.$websitekey.'/'.$containerref.($cachekey ? ' '.$cachekey: '').(is_object($websitepage) ? ' parent id='.$websitepage->id : '').' level='.$includehtmlcontentopened.' -->'."\n"; |
|
638 | + print "\n".'<!-- include '.$websitekey.'/'.$containerref.($cachekey ? ' '.$cachekey : '').(is_object($websitepage) ? ' parent id='.$websitepage->id : '').' level='.$includehtmlcontentopened.' -->'."\n"; |
|
639 | 639 | } |
640 | 640 | |
641 | 641 | $tmpoutput = ''; |
@@ -939,7 +939,7 @@ discard block |
||
939 | 939 | $hashtags = trim(implode(' #', array_map('trim', explode(',', $websitepage->keywords)))); |
940 | 940 | |
941 | 941 | // Open Graph |
942 | - $out .= '<meta name="og:type" content="website">'."\n"; // TODO If blogpost, use type article |
|
942 | + $out .= '<meta name="og:type" content="website">'."\n"; // TODO If blogpost, use type article |
|
943 | 943 | $out .= '<meta name="og:title" content="'.$websitepage->title.'">'."\n"; |
944 | 944 | if ($websitepage->image) { |
945 | 945 | $out .= '<meta name="og:image" content="'.$website->virtualhost.$image.'">'."\n"; |
@@ -1051,9 +1051,9 @@ discard block |
||
1051 | 1051 | $sql = "SELECT COUNT(rowid) as nb"; |
1052 | 1052 | $sql .= " FROM ".MAIN_DB_PREFIX."ecm_files"; |
1053 | 1053 | $sql .= " WHERE entity IN (".getEntity($object->element).")"; |
1054 | - $sql .= " AND src_object_type = '".$db->escape($object->element)."' AND src_object_id = ".((int) $object->id); // Filter on object |
|
1054 | + $sql .= " AND src_object_type = '".$db->escape($object->element)."' AND src_object_id = ".((int) $object->id); // Filter on object |
|
1055 | 1055 | $sql .= " AND ".$db->regexpsql('filename', $regexforimg, 1); |
1056 | - $sql .= " AND share IS NOT NULL"; // Only image that are public |
|
1056 | + $sql .= " AND share IS NOT NULL"; // Only image that are public |
|
1057 | 1057 | |
1058 | 1058 | $resql = $db->query($sql); |
1059 | 1059 | if ($resql) { |
@@ -1089,7 +1089,7 @@ discard block |
||
1089 | 1089 | $sql = "SELECT rowid, ref, share, filename, cover, position"; |
1090 | 1090 | $sql .= " FROM ".MAIN_DB_PREFIX."ecm_files"; |
1091 | 1091 | $sql .= " WHERE entity IN (".getEntity($object->element).")"; |
1092 | - $sql .= " AND src_object_type = '".$db->escape($object->element)."' AND src_object_id = ".((int) $object->id); // Filter on object |
|
1092 | + $sql .= " AND src_object_type = '".$db->escape($object->element)."' AND src_object_id = ".((int) $object->id); // Filter on object |
|
1093 | 1093 | $sql .= " AND ".$db->regexpsql('filename', $regexforimg, 1); |
1094 | 1094 | $sql .= $db->order("cover,position,rowid", "ASC,ASC,ASC"); |
1095 | 1095 | |
@@ -1381,7 +1381,7 @@ discard block |
||
1381 | 1381 | { |
1382 | 1382 | $dom = new DOMDocument(); |
1383 | 1383 | |
1384 | - libxml_use_internal_errors(false); // Avoid to fill memory with xml errors |
|
1384 | + libxml_use_internal_errors(false); // Avoid to fill memory with xml errors |
|
1385 | 1385 | if (LIBXML_VERSION < 20900) { |
1386 | 1386 | // Avoid load of external entities (security problem). |
1387 | 1387 | // Required only if LIBXML_VERSION < 20900 |