@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | if (!empty($conf->mycompany->multidir_output[$object->entity])) { |
357 | 357 | $logodir = $conf->mycompany->multidir_output[$object->entity]; |
358 | 358 | } |
359 | - $pagecount = $pdf->setSourceFile($logodir.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
359 | + $pagecount = $pdf->setSourceFile($logodir.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
360 | 360 | $tplidx = $pdf->importPage(1); |
361 | 361 | } |
362 | 362 | |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | // $pdf->GetY() here can't be used. It is bottom of the second address box but first one may be higher |
454 | 454 | |
455 | 455 | // $this->tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks) |
456 | - $this->tab_top = 90 + $top_shift + $shipp_shift; // top_shift is an addition for linked objects or addons (0 in most cases) |
|
456 | + $this->tab_top = 90 + $top_shift + $shipp_shift; // top_shift is an addition for linked objects or addons (0 in most cases) |
|
457 | 457 | $this->tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); |
458 | 458 | |
459 | 459 | // You can add more thing under header here, if you increase $extra_under_address_shift too. |
@@ -706,7 +706,7 @@ discard block |
||
706 | 706 | } |
707 | 707 | |
708 | 708 | $pdf->setTopMargin($this->tab_top_newpage); |
709 | - $page_bottom_margin = $this->heightforfooter + $this->heightforfreetext + $this->heightforinfotot + $this->getHeightForQRInvoice($pdf->getPage(), $object, $langs); |
|
709 | + $page_bottom_margin = $this->heightforfooter + $this->heightforfreetext + $this->heightforinfotot + $this->getHeightForQRInvoice($pdf->getPage(), $object, $langs); |
|
710 | 710 | $pdf->setPageOrientation('', 1, $page_bottom_margin); |
711 | 711 | $pageposbefore = $pdf->getPage(); |
712 | 712 | |
@@ -952,7 +952,7 @@ discard block |
||
952 | 952 | if (!isset($this->tva[$vatrate])) { |
953 | 953 | $this->tva[$vatrate] = 0; |
954 | 954 | } |
955 | - $this->tva[$vatrate] += $tvaligne; // ->tva is abandoned, we use now ->tva_array that is more complete |
|
955 | + $this->tva[$vatrate] += $tvaligne; // ->tva is abandoned, we use now ->tva_array that is more complete |
|
956 | 956 | $vatcode = $object->lines[$i]->vat_src_code; |
957 | 957 | if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) { |
958 | 958 | $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0; |
@@ -1035,7 +1035,7 @@ discard block |
||
1035 | 1035 | // Pagefoot |
1036 | 1036 | $this->_pagefoot($pdf, $object, $outputlangs, 0, $this->getHeightForQRInvoice($pdf->getPage(), $object, $langs)); |
1037 | 1037 | if (method_exists($pdf, 'AliasNbPages')) { |
1038 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
1038 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
1039 | 1039 | } |
1040 | 1040 | |
1041 | 1041 | if (getDolGlobalString('INVOICE_ADD_SWISS_QR_CODE') == 'bottom') { |
@@ -1244,8 +1244,8 @@ discard block |
||
1244 | 1244 | $posy = $pdf->GetY() + 4; |
1245 | 1245 | } |
1246 | 1246 | |
1247 | - $posxval = 52; // Position of values of properties shown on left side |
|
1248 | - $posxend = 110; // End of x for text on left side |
|
1247 | + $posxval = 52; // Position of values of properties shown on left side |
|
1248 | + $posxend = 110; // End of x for text on left side |
|
1249 | 1249 | if ($this->page_largeur < 210) { // To work with US executive format |
1250 | 1250 | $posxend -= 10; |
1251 | 1251 | } |
@@ -1275,7 +1275,7 @@ discard block |
||
1275 | 1275 | |
1276 | 1276 | $pdf->SetFont('', '', $default_font_size - 2); |
1277 | 1277 | $pdf->SetXY($posxval, $posy); |
1278 | - $categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation); |
|
1278 | + $categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation); |
|
1279 | 1279 | $pdf->MultiCell($posxend - $posxval, 4, $categoryOfOperationLabel, 0, 'L'); |
1280 | 1280 | |
1281 | 1281 | $posy = $pdf->GetY() + 3; // for 2 lines |
@@ -2058,7 +2058,7 @@ discard block |
||
2058 | 2058 | if (empty($hidetop)) { |
2059 | 2059 | // Show category of operations |
2060 | 2060 | if (getDolGlobalInt('INVOICE_CATEGORY_OF_OPERATION') == 1 && $this->categoryOfOperation >= 0) { |
2061 | - $categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations") . ' : ' . $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation); |
|
2061 | + $categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations").' : '.$outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation); |
|
2062 | 2062 | $pdf->SetXY($this->marge_gauche, $tab_top - 4); |
2063 | 2063 | $pdf->MultiCell(($pdf->GetStringWidth($categoryOfOperations)) + 4, 2, $categoryOfOperations); |
2064 | 2064 | } |
@@ -2174,7 +2174,7 @@ discard block |
||
2174 | 2174 | } |
2175 | 2175 | if ($this->situationinvoice) { |
2176 | 2176 | $langs->loadLangs(array("other")); |
2177 | - $title = $outputlangs->transnoentities("PDFInvoiceSituation") . " " . $outputlangs->transnoentities("NumberingShort") . $object->situation_counter . " -"; |
|
2177 | + $title = $outputlangs->transnoentities("PDFInvoiceSituation")." ".$outputlangs->transnoentities("NumberingShort").$object->situation_counter." -"; |
|
2178 | 2178 | } |
2179 | 2179 | if (getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE') && is_object($outputlangsbis)) { |
2180 | 2180 | $title .= ' - '; |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | if (!empty($conf->mycompany->multidir_output[$object->entity])) { |
331 | 331 | $logodir = $conf->mycompany->multidir_output[$object->entity]; |
332 | 332 | } |
333 | - $pagecount = $pdf->setSourceFile($logodir.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
333 | + $pagecount = $pdf->setSourceFile($logodir.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
334 | 334 | $tplidx = $pdf->importPage(1); |
335 | 335 | } |
336 | 336 | |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | // $pdf->GetY() here can't be used. It is bottom of the second address box but first one may be higher |
445 | 445 | |
446 | 446 | // $tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks) |
447 | - $tab_top = 90 + $top_shift; // top_shift is an addition for linked objects or addons (0 in most cases) |
|
447 | + $tab_top = 90 + $top_shift; // top_shift is an addition for linked objects or addons (0 in most cases) |
|
448 | 448 | $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); |
449 | 449 | |
450 | 450 | // You can add more thing under header here, if you increase $extra_under_address_shift too. |
@@ -787,7 +787,7 @@ discard block |
||
787 | 787 | if (!isset($this->tva[$vatrate])) { |
788 | 788 | $this->tva[$vatrate] = 0; |
789 | 789 | } |
790 | - $this->tva[$vatrate] += $tvaligne; // ->tva is abandoned, we use now ->tva_array that is more complete |
|
790 | + $this->tva[$vatrate] += $tvaligne; // ->tva is abandoned, we use now ->tva_array that is more complete |
|
791 | 791 | $vatcode = $object->lines[$i]->vat_src_code; |
792 | 792 | if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) { |
793 | 793 | $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0; |
@@ -873,7 +873,7 @@ discard block |
||
873 | 873 | // Pagefoot |
874 | 874 | $this->_pagefoot($pdf, $object, $outputlangs, 0, $this->getHeightForQRInvoice($pdf->getPage(), $object, $langs)); |
875 | 875 | if (method_exists($pdf, 'AliasNbPages')) { |
876 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
876 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
877 | 877 | } |
878 | 878 | |
879 | 879 | if (getDolGlobalString('INVOICE_ADD_SWISS_QR_CODE') == 'bottom') { |
@@ -1148,7 +1148,7 @@ discard block |
||
1148 | 1148 | } |
1149 | 1149 | |
1150 | 1150 | $posxval = 52; |
1151 | - $posxend = 110; // End of x for text on left side |
|
1151 | + $posxend = 110; // End of x for text on left side |
|
1152 | 1152 | if ($this->page_largeur < 210) { // To work with US executive format |
1153 | 1153 | $posxend -= 10; |
1154 | 1154 | } |
@@ -1166,7 +1166,7 @@ discard block |
||
1166 | 1166 | $lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement); |
1167 | 1167 | $pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L'); |
1168 | 1168 | |
1169 | - $posy = $pdf->GetY() + 3; // We need spaces for 2 lines payment conditions |
|
1169 | + $posy = $pdf->GetY() + 3; // We need spaces for 2 lines payment conditions |
|
1170 | 1170 | } |
1171 | 1171 | |
1172 | 1172 | // Show category of operations |
@@ -1178,7 +1178,7 @@ discard block |
||
1178 | 1178 | |
1179 | 1179 | $pdf->SetFont('', '', $default_font_size - 2); |
1180 | 1180 | $pdf->SetXY($posxval, $posy); |
1181 | - $categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation); |
|
1181 | + $categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation); |
|
1182 | 1182 | $pdf->MultiCell($posxend - $posxval, 4, $categoryOfOperationLabel, 0, 'L'); |
1183 | 1183 | |
1184 | 1184 | $posy = $pdf->GetY() + 3; // for 2 lines |
@@ -1725,7 +1725,7 @@ discard block |
||
1725 | 1725 | if (empty($hidetop)) { |
1726 | 1726 | // Show category of operations |
1727 | 1727 | if (getDolGlobalInt('INVOICE_CATEGORY_OF_OPERATION') == 1 && $this->categoryOfOperation >= 0) { |
1728 | - $categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations") . ' : ' . $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation); |
|
1728 | + $categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations").' : '.$outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation); |
|
1729 | 1729 | $pdf->SetXY($this->marge_gauche, $tab_top - 4); |
1730 | 1730 | $pdf->MultiCell(($pdf->GetStringWidth($categoryOfOperations)) + 4, 2, $categoryOfOperations); |
1731 | 1731 | } |
@@ -1895,7 +1895,7 @@ discard block |
||
1895 | 1895 | } |
1896 | 1896 | if ($this->situationinvoice) { |
1897 | 1897 | $langs->loadLangs(array("other")); |
1898 | - $title = $outputlangs->transnoentities("PDFInvoiceSituation") . " " . $outputlangs->transnoentities("NumberingShort") . $object->situation_counter . " -"; |
|
1898 | + $title = $outputlangs->transnoentities("PDFInvoiceSituation")." ".$outputlangs->transnoentities("NumberingShort").$object->situation_counter." -"; |
|
1899 | 1899 | } |
1900 | 1900 | if (getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE') && is_object($outputlangsbis)) { |
1901 | 1901 | $title .= ' - '; |
@@ -2121,7 +2121,7 @@ discard block |
||
2121 | 2121 | |
2122 | 2122 | $carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs); |
2123 | 2123 | |
2124 | - $mode = 'target'; |
|
2124 | + $mode = 'target'; |
|
2125 | 2125 | $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), ($usecontact ? 1 : 0), $mode, $object); |
2126 | 2126 | |
2127 | 2127 | // Show recipient |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | * Dolibarr version of the loaded document |
78 | 78 | * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' |
79 | 79 | */ |
80 | - public $version = 'disabled'; // Disabled by default. Enabled in constructor if option INVOICE_USE_SITUATION is 2. |
|
80 | + public $version = 'disabled'; // Disabled by default. Enabled in constructor if option INVOICE_USE_SITUATION is 2. |
|
81 | 81 | |
82 | 82 | /** |
83 | 83 | * @var int height for info total |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | $outputlangsbis->loadLangs(array("main", "bills", "products", "dict", "companies")); |
292 | 292 | } |
293 | 293 | |
294 | - if (empty($object) || ($object->type != Facture::TYPE_SITUATION && ($object->type != Facture::TYPE_CREDIT_NOTE && !empty($object->situation_cycle_ref)))) { |
|
294 | + if (empty($object) || ($object->type != Facture::TYPE_SITUATION && ($object->type != Facture::TYPE_CREDIT_NOTE && !empty($object->situation_cycle_ref)))) { |
|
295 | 295 | setEventMessage($langs->trans('WarningsObjectIsNotASituation'), 'warnings'); |
296 | 296 | return 1; |
297 | 297 | } |
@@ -410,15 +410,15 @@ discard block |
||
410 | 410 | $pdf->SetAutoPageBreak(1, 0); |
411 | 411 | |
412 | 412 | // compute height for situation invoices |
413 | - $this->heightforinfotot = 45; // Height reserved to output the info and total part and payment part |
|
413 | + $this->heightforinfotot = 45; // Height reserved to output the info and total part and payment part |
|
414 | 414 | if (!getDolGlobalString('INVOICE_NO_PAYMENT_DETAILS') && $nbpayments > 0) { |
415 | 415 | $this->heightforinfotot += 4 * ($nbpayments + 3); |
416 | 416 | } |
417 | 417 | if ($nbprevsituation > 0) { |
418 | 418 | $this->heightforinfotot += 4 * ($nbprevsituation + 3); |
419 | 419 | } |
420 | - $this->heightforfreetext = (getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5)); // Height reserved to output the free text on last page |
|
421 | - $this->heightforfooter = $this->marge_basse + (!getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS') ? 12 : 22); // Height reserved to output the footer (value include bottom margin) |
|
420 | + $this->heightforfreetext = (getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5)); // Height reserved to output the free text on last page |
|
421 | + $this->heightforfooter = $this->marge_basse + (!getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS') ? 12 : 22); // Height reserved to output the footer (value include bottom margin) |
|
422 | 422 | |
423 | 423 | if (class_exists('TCPDF')) { |
424 | 424 | $pdf->setPrintHeader(false); |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | if (!empty($conf->mycompany->multidir_output[$object->entity])) { |
433 | 433 | $logodir = $conf->mycompany->multidir_output[$object->entity]; |
434 | 434 | } |
435 | - $pagecount = $pdf->setSourceFile($logodir.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
435 | + $pagecount = $pdf->setSourceFile($logodir.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
436 | 436 | $this->tplidx = $pdf->importPage(1); |
437 | 437 | } |
438 | 438 | |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | // $pdf->GetY() here can't be used. It is bottom of the second address box but first one may be higher |
525 | 525 | |
526 | 526 | // $this->tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks) |
527 | - $this->tab_top = 90 + $top_shift + $shipp_shift; // top_shift is an addition for linked objects or addons (0 in most cases) |
|
527 | + $this->tab_top = 90 + $top_shift + $shipp_shift; // top_shift is an addition for linked objects or addons (0 in most cases) |
|
528 | 528 | $this->tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); |
529 | 529 | |
530 | 530 | // You can add more thing under header here, if you increase $extra_under_address_shift too. |
@@ -1034,7 +1034,7 @@ discard block |
||
1034 | 1034 | if (!isset($this->tva[$vatrate])) { |
1035 | 1035 | $this->tva[$vatrate] = 0; |
1036 | 1036 | } |
1037 | - $this->tva[$vatrate] += $tvaligne; // ->tva is abandoned, we use now ->tva_array that is more complete |
|
1037 | + $this->tva[$vatrate] += $tvaligne; // ->tva is abandoned, we use now ->tva_array that is more complete |
|
1038 | 1038 | $vatcode = $object->lines[$i]->vat_src_code; |
1039 | 1039 | if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) { |
1040 | 1040 | $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0; |
@@ -1122,7 +1122,7 @@ discard block |
||
1122 | 1122 | // Pagefoot |
1123 | 1123 | $this->_pagefoot($pdf, $object, $outputlangs); |
1124 | 1124 | if (method_exists($pdf, 'AliasNbPages')) { |
1125 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
1125 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
1126 | 1126 | } |
1127 | 1127 | |
1128 | 1128 | $this->resumeLastPage($pdf, $object, 0, $tab_top, $outputlangs, $outputlangsbis); |
@@ -1334,8 +1334,8 @@ discard block |
||
1334 | 1334 | $posy = $pdf->GetY() + 4; |
1335 | 1335 | } |
1336 | 1336 | |
1337 | - $posxval = 52; // Position of values of properties shown on left side |
|
1338 | - $posxend = 110; // End of x for text on left side |
|
1337 | + $posxval = 52; // Position of values of properties shown on left side |
|
1338 | + $posxend = 110; // End of x for text on left side |
|
1339 | 1339 | if ($this->page_largeur < 210) { // To work with US executive format |
1340 | 1340 | $posxend -= 10; |
1341 | 1341 | } |
@@ -1365,7 +1365,7 @@ discard block |
||
1365 | 1365 | |
1366 | 1366 | $pdf->SetFont('', '', $default_font_size - 2); |
1367 | 1367 | $pdf->SetXY($posxval, $posy); |
1368 | - $categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation); |
|
1368 | + $categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation); |
|
1369 | 1369 | $pdf->MultiCell($posxend - $posxval, 4, $categoryOfOperationLabel, 0, 'L'); |
1370 | 1370 | |
1371 | 1371 | $posy = $pdf->GetY() + 3; // for 2 lines |
@@ -1699,7 +1699,7 @@ discard block |
||
1699 | 1699 | if (($object->lines[$i]->info_bits & 0x01) == 0x01) { |
1700 | 1700 | $vatrate .= '*'; |
1701 | 1701 | } |
1702 | - if (! isset($tvas[$vatrate])) { |
|
1702 | + if (!isset($tvas[$vatrate])) { |
|
1703 | 1703 | $tvas[$vatrate] = 0; |
1704 | 1704 | } |
1705 | 1705 | $tvas[$vatrate] += $tvaligne; |
@@ -1967,7 +1967,7 @@ discard block |
||
1967 | 1967 | if (empty($hidetop)) { |
1968 | 1968 | // Show category of operations |
1969 | 1969 | if (getDolGlobalInt('INVOICE_CATEGORY_OF_OPERATION') == 1 && $this->categoryOfOperation >= 0) { |
1970 | - $categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations") . ' : ' . $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation); |
|
1970 | + $categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations").' : '.$outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation); |
|
1971 | 1971 | $pdf->SetXY($this->marge_gauche, $tab_top - 4); |
1972 | 1972 | $pdf->MultiCell(($pdf->GetStringWidth($categoryOfOperations)) + 4, 2, $categoryOfOperations); |
1973 | 1973 | } |
@@ -1987,7 +1987,7 @@ discard block |
||
1987 | 1987 | $pdf->SetFont('', '', $default_font_size - 1); |
1988 | 1988 | |
1989 | 1989 | // Output Rect |
1990 | - $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param |
|
1990 | + $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param |
|
1991 | 1991 | |
1992 | 1992 | // situation invoice |
1993 | 1993 | $pdf->SetFont('', '', $default_font_size - 2); |
@@ -2027,7 +2027,7 @@ discard block |
||
2027 | 2027 | $pdf->SetFont('', '', $default_font_size - 1); |
2028 | 2028 | |
2029 | 2029 | if (empty($hidetop)) { |
2030 | - $pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5); // line prend une position y en 2eme param et 4eme param |
|
2030 | + $pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5); // line prend une position y en 2eme param et 4eme param |
|
2031 | 2031 | } |
2032 | 2032 | } |
2033 | 2033 | |
@@ -2597,7 +2597,7 @@ discard block |
||
2597 | 2597 | 'overtitle' => array( |
2598 | 2598 | 'textkey' => 'Chantier', // use lang key is useful in somme case with module |
2599 | 2599 | 'align' => 'C', |
2600 | - 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left |
|
2600 | + 'padding' => array(0.5, 0.5, 0.5, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left |
|
2601 | 2601 | 'width' => 18 |
2602 | 2602 | ), |
2603 | 2603 | ); |
@@ -2622,13 +2622,13 @@ discard block |
||
2622 | 2622 | ), |
2623 | 2623 | 'border-left' => true, // add left line separator |
2624 | 2624 | 'overtitle' => array( |
2625 | - 'textkey' => 'S'.$derniere_situation->situation_counter . ' - ' . dol_print_date($derniere_situation->date, "%d/%m/%Y"), |
|
2625 | + 'textkey' => 'S'.$derniere_situation->situation_counter.' - '.dol_print_date($derniere_situation->date, "%d/%m/%Y"), |
|
2626 | 2626 | 'align' => 'C', |
2627 | - 'padding' => array(0.5,0.2,0.5,0.2), // Like css 0 => top, 1 => right, 2 => bottom, 3 => left |
|
2627 | + 'padding' => array(0.5, 0.2, 0.5, 0.2), // Like css 0 => top, 1 => right, 2 => bottom, 3 => left |
|
2628 | 2628 | 'width' => 10 + 15 //current width + amount cell width |
2629 | 2629 | ), |
2630 | 2630 | ); |
2631 | - if ($this->situationinvoice && ! empty($this->TDataSituation['date_derniere_situation'])) { |
|
2631 | + if ($this->situationinvoice && !empty($this->TDataSituation['date_derniere_situation'])) { |
|
2632 | 2632 | $this->cols['prev_progress']['status'] = true; |
2633 | 2633 | } |
2634 | 2634 | |
@@ -2643,7 +2643,7 @@ discard block |
||
2643 | 2643 | ), |
2644 | 2644 | 'border-left' => true, // add left line separator |
2645 | 2645 | ); |
2646 | - if ($this->situationinvoice && ! empty($this->TDataSituation['date_derniere_situation'])) { |
|
2646 | + if ($this->situationinvoice && !empty($this->TDataSituation['date_derniere_situation'])) { |
|
2647 | 2647 | $this->cols['prev_progress_amount']['status'] = true; |
2648 | 2648 | } |
2649 | 2649 | |
@@ -2658,9 +2658,9 @@ discard block |
||
2658 | 2658 | ), |
2659 | 2659 | 'border-left' => true, // add left line separator |
2660 | 2660 | 'overtitle' => array( |
2661 | - 'textkey' => 'S'.$object->situation_counter . ' - ' . dol_print_date($object->date, "%d/%m/%Y"), |
|
2661 | + 'textkey' => 'S'.$object->situation_counter.' - '.dol_print_date($object->date, "%d/%m/%Y"), |
|
2662 | 2662 | 'align' => 'C', |
2663 | - 'padding' => array(0.5,0.2,0.5,0.2), // Like css 0 => top, 1 => right, 2 => bottom, 3 => left |
|
2663 | + 'padding' => array(0.5, 0.2, 0.5, 0.2), // Like css 0 => top, 1 => right, 2 => bottom, 3 => left |
|
2664 | 2664 | 'width' => 10 + 15 |
2665 | 2665 | ), |
2666 | 2666 | ); |
@@ -2783,7 +2783,7 @@ discard block |
||
2783 | 2783 | |
2784 | 2784 | // Output Rect |
2785 | 2785 | // KEEPTHIS => Affiche les bords extérieurs |
2786 | - $this->printRectBtp($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param |
|
2786 | + $this->printRectBtp($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param |
|
2787 | 2787 | |
2788 | 2788 | $pdf->line($this->posx_cumul_anterieur - 1, $tab_top, $this->posx_cumul_anterieur - 1, $tab_top + $tab_height); |
2789 | 2789 | if (empty($hidetop)) { |
@@ -2840,7 +2840,7 @@ discard block |
||
2840 | 2840 | $pdf->SetXY($this->marge_gauche + 10, $tab_top + 24 + $i); |
2841 | 2841 | $pdf->MultiCell(80, 2, $outputlangs->transnoentities("TotalHT").' '.$TVatInfo['label'], '', 'L'); |
2842 | 2842 | |
2843 | - if (! empty($this->TDataSituation['current'][$tva_tx_formated]['TVA'])) { |
|
2843 | + if (!empty($this->TDataSituation['current'][$tva_tx_formated]['TVA'])) { |
|
2844 | 2844 | $pdf->SetXY($this->marge_gauche + 10, $tab_top + 28 + $i); |
2845 | 2845 | $pdf->MultiCell(80, 2, $outputlangs->transnoentities("VAT").' '.$TVatInfo['label'], '', 'L'); |
2846 | 2846 | } else { |
@@ -2904,7 +2904,7 @@ discard block |
||
2904 | 2904 | $pdf->MultiCell(32, 2, price($this->TDataSituation[$col][$tva_tx_formated]['HT'], 0, '', 1, -1, 2), '', 'R'); |
2905 | 2905 | |
2906 | 2906 | // Total TVA |
2907 | - if (! empty($this->TDataSituation['current'][$tva_tx_formated]['TVA'])) { |
|
2907 | + if (!empty($this->TDataSituation['current'][$tva_tx_formated]['TVA'])) { |
|
2908 | 2908 | $pdf->SetXY($x, $tab_top + 28 + $i); |
2909 | 2909 | $pdf->MultiCell(32, 2, price($this->TDataSituation[$col][$tva_tx_formated]['TVA'], 0, '', 1, -1, 2), '', 'R'); |
2910 | 2910 | } else { |
@@ -2984,7 +2984,7 @@ discard block |
||
2984 | 2984 | |
2985 | 2985 | $TDataSituation = array(); |
2986 | 2986 | |
2987 | - if (! empty($facDerniereSituation)) { |
|
2987 | + if (!empty($facDerniereSituation)) { |
|
2988 | 2988 | $TDataSituation['derniere_situation'] = $facDerniereSituation; |
2989 | 2989 | $TDataSituation['date_derniere_situation'] = $facDerniereSituation->date; |
2990 | 2990 | } |
@@ -2993,9 +2993,9 @@ discard block |
||
2993 | 2993 | $retenue_garantie_anterieure = 0; |
2994 | 2994 | // Init tous les champs à 0 |
2995 | 2995 | $TDataSituation['cumul_anterieur'] = array( |
2996 | - 'HT' => 0, //montant HT normal |
|
2997 | - 'TVA' => 0, //montant de la TVA sur le HTnet |
|
2998 | - 'TTC' => 0, //montant TTC (HTnet + TVA) |
|
2996 | + 'HT' => 0, //montant HT normal |
|
2997 | + 'TVA' => 0, //montant de la TVA sur le HTnet |
|
2998 | + 'TTC' => 0, //montant TTC (HTnet + TVA) |
|
2999 | 2999 | 'retenue_garantie' => 0, |
3000 | 3000 | 'travaux_sup' => 0, |
3001 | 3001 | 'HTnet' => 0, //montant HT |
@@ -3025,7 +3025,7 @@ discard block |
||
3025 | 3025 | $isFirstSituation = false; |
3026 | 3026 | if (!empty($l->fk_prev_id)) { |
3027 | 3027 | $prevSituationPercent = $l->get_prev_progress($previousInvoice->id, true); |
3028 | - } elseif (! array_key_exists($i + 1, $TPreviousInvoices)) { |
|
3028 | + } elseif (!array_key_exists($i + 1, $TPreviousInvoices)) { |
|
3029 | 3029 | $isFirstSituation = true; |
3030 | 3030 | } |
3031 | 3031 | |
@@ -3035,7 +3035,7 @@ discard block |
||
3035 | 3035 | |
3036 | 3036 | //1ere ligne |
3037 | 3037 | $amounttva = $calc_ht * ($ltvatx / 100); |
3038 | - if (! isset($TDataSituation['cumul_anterieur'][$ltvatx])) { |
|
3038 | + if (!isset($TDataSituation['cumul_anterieur'][$ltvatx])) { |
|
3039 | 3039 | $TDataSituation['cumul_anterieur'][$ltvatx]['HT'] = $calc_ht; |
3040 | 3040 | $TDataSituation['cumul_anterieur'][$ltvatx]['TVA'] = $amounttva; |
3041 | 3041 | } else { |
@@ -3047,14 +3047,14 @@ discard block |
||
3047 | 3047 | //le grand total de TVA |
3048 | 3048 | // $TDataSituation['cumul_anterieur']['TVA'] += $amounttva; |
3049 | 3049 | |
3050 | - if (empty($l->fk_prev_id) && ! $isFirstSituation) { |
|
3050 | + if (empty($l->fk_prev_id) && !$isFirstSituation) { |
|
3051 | 3051 | // TODO: à clarifier, mais pour moi, un facture de situation précédente qui a des progressions à 0% c'est pas logique |
3052 | 3052 | $TDataSituation['cumul_anterieur']['travaux_sup'] += $calc_ht; |
3053 | 3053 | } |
3054 | 3054 | } |
3055 | 3055 | } |
3056 | 3056 | |
3057 | - if (! empty($previousInvoice->retained_warranty) && !getDolGlobalString('USE_RETAINED_WARRANTY_ONLY_FOR_SITUATION_FINAL')) { |
|
3057 | + if (!empty($previousInvoice->retained_warranty) && !getDolGlobalString('USE_RETAINED_WARRANTY_ONLY_FOR_SITUATION_FINAL')) { |
|
3058 | 3058 | $retenue_garantie_anterieure += $previousInvoice->getRetainedWarrantyAmount(); |
3059 | 3059 | } |
3060 | 3060 | |
@@ -3068,7 +3068,7 @@ discard block |
||
3068 | 3068 | // print json_encode($facDerniereSituation->lines);exit; |
3069 | 3069 | $TDataSituation['current'] = $this->btpGetInvoiceAmounts($object->id); |
3070 | 3070 | |
3071 | - if (! empty($facDerniereSituation->lines)) { |
|
3071 | + if (!empty($facDerniereSituation->lines)) { |
|
3072 | 3072 | $TFacLinesKey = array_keys($facDerniereSituation->lines); |
3073 | 3073 | $TObjectLinesKey = array_keys($object->lines); |
3074 | 3074 | $TDiffKey = array_diff($TObjectLinesKey, $TFacLinesKey); |
@@ -3234,7 +3234,7 @@ discard block |
||
3234 | 3234 | */ |
3235 | 3235 | public function btpGetInvoiceAmounts($id, $forceReadFromDB = false) |
3236 | 3236 | { |
3237 | - global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; |
|
3237 | + global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblignes; |
|
3238 | 3238 | |
3239 | 3239 | $object = new Facture($db); |
3240 | 3240 | $object->fetch($id); |
@@ -3252,16 +3252,16 @@ discard block |
||
3252 | 3252 | $facDerniereSituation = $TPreviousInvoices[0]; |
3253 | 3253 | |
3254 | 3254 | $ret = array( |
3255 | - 'HT' => 0, //montant HT normal |
|
3255 | + 'HT' => 0, //montant HT normal |
|
3256 | 3256 | 'HTnet' => 0, //montant HT |
3257 | - 'TVA' => 0, //montant de la TVA sur le HTnet |
|
3258 | - 'TTC' => 0, //montant TTC (HTnet + TVA) |
|
3257 | + 'TVA' => 0, //montant de la TVA sur le HTnet |
|
3258 | + 'TTC' => 0, //montant TTC (HTnet + TVA) |
|
3259 | 3259 | 'retenue_garantie' => 0, |
3260 | 3260 | 'travaux_sup' => 0, |
3261 | 3261 | 'total_a_payer' => 0 //montant "a payer" sur la facture |
3262 | 3262 | ); |
3263 | 3263 | |
3264 | - if (! empty($facDerniereSituation)) { |
|
3264 | + if (!empty($facDerniereSituation)) { |
|
3265 | 3265 | $ret['derniere_situation'] = $facDerniereSituation; |
3266 | 3266 | $ret['date_derniere_situation'] = $facDerniereSituation->date; |
3267 | 3267 | } |
@@ -3393,14 +3393,14 @@ discard block |
||
3393 | 3393 | $label = $outputlangs->transnoentities("SituationInvoiceTotalProposal"); |
3394 | 3394 | $pdf->MultiCell($this->page_largeur - ($this->marge_droite + $this->marge_gauche), 3, $label, 0, 'L', 0, 1, $posx, $posy + 1); |
3395 | 3395 | |
3396 | - $amount = price($sign * ($total_ht + (! empty($propal->remise) ? $propal->remise : 0))); |
|
3396 | + $amount = price($sign * ($total_ht + (!empty($propal->remise) ? $propal->remise : 0))); |
|
3397 | 3397 | $pdf->MultiCell($width2, 3, $amount, 0, 'R', 0, 1, $posx + $width, $posy + 1); |
3398 | 3398 | |
3399 | 3399 | $pdf->SetFont('', '', $default_font_size - 1); |
3400 | 3400 | |
3401 | 3401 | // Output Rect |
3402 | 3402 | $pdf->SetDrawColor(128, 128, 128); |
3403 | - $this->printRect($pdf, $posx, $posy, $this->page_largeur - $this->marge_gauche - $this->marge_droite, 6); // Rect prend une longueur en 3eme param et 4eme param |
|
3403 | + $this->printRect($pdf, $posx, $posy, $this->page_largeur - $this->marge_gauche - $this->marge_droite, 6); // Rect prend une longueur en 3eme param et 4eme param |
|
3404 | 3404 | |
3405 | 3405 | $posy += 4; |
3406 | 3406 | } elseif (count($orders)) { |
@@ -3435,7 +3435,7 @@ discard block |
||
3435 | 3435 | |
3436 | 3436 | $force_to_zero = false; |
3437 | 3437 | |
3438 | - $idinv = 0;//count($previousinvoices); |
|
3438 | + $idinv = 0; //count($previousinvoices); |
|
3439 | 3439 | while ($idinv < count($previousinvoices)) { |
3440 | 3440 | $invoice = $previousinvoices[$idinv]; |
3441 | 3441 | |
@@ -3457,7 +3457,7 @@ discard block |
||
3457 | 3457 | $force_to_zero = true; |
3458 | 3458 | } |
3459 | 3459 | |
3460 | - $ref .= ' - '. $invoice->ref; |
|
3460 | + $ref .= ' - '.$invoice->ref; |
|
3461 | 3461 | $ref .= ' ('.dol_print_date($invoice->date, "%d/%m/%Y", false, $outputlangs).')'; |
3462 | 3462 | $pdf->MultiCell($this->page_largeur - ($this->marge_droite + $this->marge_gauche), 3, $ref, 0, 'L', 0); |
3463 | 3463 | |
@@ -3488,7 +3488,7 @@ discard block |
||
3488 | 3488 | if (($invoice->lines[$i]->info_bits & 0x01) == 0x01) { |
3489 | 3489 | $vatrate .= '*'; |
3490 | 3490 | } |
3491 | - if (! isset($tvas[$vatrate])) { |
|
3491 | + if (!isset($tvas[$vatrate])) { |
|
3492 | 3492 | $tvas[$vatrate] = 0; |
3493 | 3493 | } |
3494 | 3494 | $tvas[$vatrate] += $tvaligne; |
@@ -3666,7 +3666,7 @@ discard block |
||
3666 | 3666 | $pdf->SetXY($posx + $width4, $posy + $height * $index + $y); |
3667 | 3667 | $pdf->MultiCell($width4, $height - 1, price($sign * $payment['amount'], 0, $outputlangs), 0, 'L', 0); |
3668 | 3668 | $pdf->SetXY($posx + $width4 * 2, $posy + $height * $index + $y); |
3669 | - $oper = $outputlangs->transnoentitiesnoconv("PaymentTypeShort" . $payment['type']); |
|
3669 | + $oper = $outputlangs->transnoentitiesnoconv("PaymentTypeShort".$payment['type']); |
|
3670 | 3670 | |
3671 | 3671 | $pdf->MultiCell($width4, $height - 1, $oper, 0, 'L', 0); |
3672 | 3672 | $pdf->SetXY($posx + $width4 * 3, $posy + $height * $index + $y); |
@@ -3696,7 +3696,7 @@ discard block |
||
3696 | 3696 | $this->_pagehead($pdf, $object, 0, $outputlangs); |
3697 | 3697 | } |
3698 | 3698 | $pdf->setPage($pageposafter + 1); |
3699 | - $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. |
|
3699 | + $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. |
|
3700 | 3700 | |
3701 | 3701 | $posy = $this->tab_top_newpage + 1; |
3702 | 3702 | } else { |
@@ -3728,7 +3728,7 @@ discard block |
||
3728 | 3728 | |
3729 | 3729 | $posy += 10; |
3730 | 3730 | |
3731 | - $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. |
|
3731 | + $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. |
|
3732 | 3732 | |
3733 | 3733 | $pdf->SetTextColor(0, 0, 60); |
3734 | 3734 | $pdf->SetFont('', '', $default_font_size - 1); |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | $pdf->SetFont(pdf_getPDFFont($outputlangs)); |
202 | 202 | // Set path to the background PDF File |
203 | 203 | if (!getDolGlobalString('MAIN_DISABLE_FPDI') && getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) { |
204 | - $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
204 | + $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
205 | 205 | $tplidx = $pdf->importPage(1); |
206 | 206 | } |
207 | 207 | |
@@ -540,7 +540,7 @@ discard block |
||
540 | 540 | // Pied de page |
541 | 541 | $this->_pagefoot($pdf, $object, $outputlangs); |
542 | 542 | if (method_exists($pdf, 'AliasNbPages')) { |
543 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
543 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
544 | 544 | } |
545 | 545 | |
546 | 546 | $pdf->Close(); |
@@ -619,7 +619,7 @@ discard block |
||
619 | 619 | $pdf->SetFont('', 'B', $default_font_size - 3); |
620 | 620 | |
621 | 621 | // Output Rect |
622 | - $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter |
|
622 | + $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter |
|
623 | 623 | |
624 | 624 | $pdf->SetLineStyle(array('dash' => '0', 'color' => array(200, 200, 200))); |
625 | 625 | $pdf->SetDrawColor(200, 200, 200); |
@@ -630,7 +630,7 @@ discard block |
||
630 | 630 | |
631 | 631 | |
632 | 632 | if (empty($hidetop)) { |
633 | - $pdf->line($this->marge_gauche, $tab_top + 11, $this->page_largeur - $this->marge_droite, $tab_top + 11); // line takes a position y in 2nd parameter and 4th parameter |
|
633 | + $pdf->line($this->marge_gauche, $tab_top + 11, $this->page_largeur - $this->marge_droite, $tab_top + 11); // line takes a position y in 2nd parameter and 4th parameter |
|
634 | 634 | $pdf->SetXY($this->posxdesc - 1, $tab_top + 1); |
635 | 635 | $pdf->MultiCell($this->wref, 3, $outputlangs->transnoentities("Ref"), '', 'L'); |
636 | 636 | } |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | |
170 | 170 | // Set approval_prompt. Note: A refresh token will be provided only if prompt is done. |
171 | 171 | if ($forlogin) { |
172 | - $approval_prompt = getDolGlobalString('OAUTH_GOOGLE_FORCE_PROMPT_ON_LOGIN', 'auto'); // Can be 'force' |
|
172 | + $approval_prompt = getDolGlobalString('OAUTH_GOOGLE_FORCE_PROMPT_ON_LOGIN', 'auto'); // Can be 'force' |
|
173 | 173 | $apiService->setApprouvalPrompt($approval_prompt); |
174 | 174 | } else { |
175 | 175 | $apiService->setApprouvalPrompt('force'); |
@@ -317,10 +317,10 @@ discard block |
||
317 | 317 | $entitytosearchuser = (isset($tmparray['entity']) ? $tmparray['entity'] : -1); |
318 | 318 | |
319 | 319 | // Delete the old token |
320 | - $storage->clearToken('Google'); // Delete the token called ("Google-".$storage->keyforprovider) |
|
320 | + $storage->clearToken('Google'); // Delete the token called ("Google-".$storage->keyforprovider) |
|
321 | 321 | |
322 | 322 | $tmpuser = new User($db); |
323 | - $res = $tmpuser->fetch(0, '', '', 0, $entitytosearchuser, $useremail, 0, 1); // Load user. Can load with email_oauth2. |
|
323 | + $res = $tmpuser->fetch(0, '', '', 0, $entitytosearchuser, $useremail, 0, 1); // Load user. Can load with email_oauth2. |
|
324 | 324 | |
325 | 325 | if ($res > 0) { |
326 | 326 | $username = $tmpuser->login; |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | // access type needed to have oauth provider refreshing token |
142 | 142 | // also note that a refresh token is sent only after a prompt |
143 | 143 | if (method_exists($apiService, 'setAccessType')) { |
144 | - $apiService->setAccessType('offline'); // Most generic OAUTH provider does not provide AccessType online/offline. They are mostly offline. // @phan-suppress-current-line PhanUndeclaredMethod |
|
144 | + $apiService->setAccessType('offline'); // Most generic OAUTH provider does not provide AccessType online/offline. They are mostly offline. // @phan-suppress-current-line PhanUndeclaredMethod |
|
145 | 145 | } |
146 | 146 | |
147 | 147 | if (!getDolGlobalString($keyforparamid)) { |
@@ -184,13 +184,13 @@ discard block |
||
184 | 184 | |
185 | 185 | // Set approval_prompt. Note: A refresh token will be provided only if prompt is done. |
186 | 186 | if ($forlogin) { |
187 | - $approval_prompt = getDolGlobalString('OAUTH_'.$genericstring.'_FORCE_PROMPT_ON_LOGIN', 'auto'); // Can be 'force' |
|
187 | + $approval_prompt = getDolGlobalString('OAUTH_'.$genericstring.'_FORCE_PROMPT_ON_LOGIN', 'auto'); // Can be 'force' |
|
188 | 188 | if (method_exists($apiService, 'setApprouvalPrompt')) { |
189 | - $apiService->setApprouvalPrompt($approval_prompt); // @phan-suppress-current-line PhanUndeclaredMethod |
|
189 | + $apiService->setApprouvalPrompt($approval_prompt); // @phan-suppress-current-line PhanUndeclaredMethod |
|
190 | 190 | } |
191 | 191 | } else { |
192 | 192 | if (method_exists($apiService, 'setApprouvalPrompt')) { |
193 | - $apiService->setApprouvalPrompt('force'); // @phan-suppress-current-line PhanUndeclaredMethod |
|
193 | + $apiService->setApprouvalPrompt('force'); // @phan-suppress-current-line PhanUndeclaredMethod |
|
194 | 194 | } |
195 | 195 | } |
196 | 196 | |
@@ -328,10 +328,10 @@ discard block |
||
328 | 328 | $entitytosearchuser = (isset($tmparray['entity']) ? $tmparray['entity'] : -1); |
329 | 329 | |
330 | 330 | // Delete the old token |
331 | - $storage->clearToken($genericstring); // Delete the token called ("Generic-".$storage->keyforprovider) |
|
331 | + $storage->clearToken($genericstring); // Delete the token called ("Generic-".$storage->keyforprovider) |
|
332 | 332 | |
333 | 333 | $tmpuser = new User($db); |
334 | - $res = $tmpuser->fetch(0, '', '', 0, $entitytosearchuser, $useremail, 0, 1); // Load user. Can load with email_oauth2. |
|
334 | + $res = $tmpuser->fetch(0, '', '', 0, $entitytosearchuser, $useremail, 0, 1); // Load user. Can load with email_oauth2. |
|
335 | 335 | |
336 | 336 | if ($res > 0) { |
337 | 337 | $username = $tmpuser->login; |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $this->db = $db; |
91 | 91 | $this->name = "cornas"; |
92 | 92 | $this->description = $langs->trans('SuppliersCommandModel'); |
93 | - $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template |
|
93 | + $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template |
|
94 | 94 | |
95 | 95 | // Page size for A4 format |
96 | 96 | $this->type = 'pdf'; |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | $pdf->SetFont(pdf_getPDFFont($outputlangs)); |
280 | 280 | // Set path to the background PDF File |
281 | 281 | if (getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) { |
282 | - $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
282 | + $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
283 | 283 | $tplidx = $pdf->importPage(1); |
284 | 284 | } |
285 | 285 | |
@@ -791,7 +791,7 @@ discard block |
||
791 | 791 | // Pied de page |
792 | 792 | $this->_pagefoot($pdf, $object, $outputlangs); |
793 | 793 | if (method_exists($pdf, 'AliasNbPages')) { |
794 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
794 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
795 | 795 | } |
796 | 796 | |
797 | 797 | $pdf->Close(); |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | $pdf->SetFont(pdf_getPDFFont($outputlangs)); |
291 | 291 | // Set path to the background PDF File |
292 | 292 | if (getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) { |
293 | - $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
293 | + $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
294 | 294 | $tplidx = $pdf->importPage(1); |
295 | 295 | } |
296 | 296 | |
@@ -668,7 +668,7 @@ discard block |
||
668 | 668 | // Pied de page |
669 | 669 | $this->_pagefoot($pdf, $object, $outputlangs); |
670 | 670 | if (method_exists($pdf, 'AliasNbPages')) { |
671 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
671 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
672 | 672 | } |
673 | 673 | |
674 | 674 | $pdf->Close(); |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | $pdf->SetFont(pdf_getPDFFont($outputlangs)); |
192 | 192 | // Set path to the background PDF File |
193 | 193 | if (getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) { |
194 | - $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
194 | + $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
195 | 195 | $tplidx = $pdf->importPage(1); |
196 | 196 | } |
197 | 197 | |
@@ -298,20 +298,20 @@ discard block |
||
298 | 298 | $nexY = $pdf->GetY(); |
299 | 299 | } |
300 | 300 | if ($object->length) { |
301 | - $texttoshow = $langs->trans("Length") . ' x ' . $langs->trans("Width") . ' x ' . $langs->trans("Height") . ': ' . ($object->length != '' ? $object->length : '?') . ' x ' . ($object->width != '' ? $object->width : '?') . ' x ' . ($object->height != '' ? $object->height : '?'); |
|
302 | - $texttoshow .= ' ' . measuringUnitString(0, "size", $object->length_units); |
|
301 | + $texttoshow = $langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").': '.($object->length != '' ? $object->length : '?').' x '.($object->width != '' ? $object->width : '?').' x '.($object->height != '' ? $object->height : '?'); |
|
302 | + $texttoshow .= ' '.measuringUnitString(0, "size", $object->length_units); |
|
303 | 303 | $pdf->writeHTMLCell(190, 3, $this->marge_gauche, $nexY, $texttoshow, 0, 1); |
304 | 304 | $nexY = $pdf->GetY(); |
305 | 305 | } |
306 | 306 | if ($object->surface) { |
307 | - $texttoshow = $langs->trans("Surface") . ': ' . dol_htmlentitiesbr($object->surface); |
|
308 | - $texttoshow .= ' ' . measuringUnitString(0, "surface", $object->surface_units); |
|
307 | + $texttoshow = $langs->trans("Surface").': '.dol_htmlentitiesbr($object->surface); |
|
308 | + $texttoshow .= ' '.measuringUnitString(0, "surface", $object->surface_units); |
|
309 | 309 | $pdf->writeHTMLCell(190, 3, $this->marge_gauche, $nexY, $texttoshow, 0, 1); |
310 | 310 | $nexY = $pdf->GetY(); |
311 | 311 | } |
312 | 312 | if ($object->volume) { |
313 | - $texttoshow = $langs->trans("Volume") . ': ' . dol_htmlentitiesbr($object->volume); |
|
314 | - $texttoshow .= ' ' . measuringUnitString(0, "volume", $object->volume_units); |
|
313 | + $texttoshow = $langs->trans("Volume").': '.dol_htmlentitiesbr($object->volume); |
|
314 | + $texttoshow .= ' '.measuringUnitString(0, "volume", $object->volume_units); |
|
315 | 315 | $pdf->writeHTMLCell(190, 3, $this->marge_gauche, $nexY, $texttoshow, 0, 1); |
316 | 316 | $nexY = $pdf->GetY(); |
317 | 317 | } |
@@ -566,7 +566,7 @@ discard block |
||
566 | 566 | // Pied de page |
567 | 567 | $this->_pagefoot($pdf, $object, $outputlangs); |
568 | 568 | if (method_exists($pdf, 'AliasNbPages')) { |
569 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
569 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
570 | 570 | } |
571 | 571 | |
572 | 572 | $pdf->Close(); |