@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | if (!empty($conf->mycompany->multidir_output[$object->entity])) { |
333 | 333 | $logodir = $conf->mycompany->multidir_output[$object->entity]; |
334 | 334 | } |
335 | - $pagecount = $pdf->setSourceFile($logodir.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
335 | + $pagecount = $pdf->setSourceFile($logodir.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
336 | 336 | $tplidx = $pdf->importPage(1); |
337 | 337 | } |
338 | 338 | |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | // $pdf->GetY() here can't be used. It is bottom of the second address box but first one may be higher |
447 | 447 | |
448 | 448 | // $tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks) |
449 | - $tab_top = 90 + $top_shift; // top_shift is an addition for linked objects or addons (0 in most cases) |
|
449 | + $tab_top = 90 + $top_shift; // top_shift is an addition for linked objects or addons (0 in most cases) |
|
450 | 450 | $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); |
451 | 451 | |
452 | 452 | // You can add more thing under header here, if you increase $extra_under_address_shift too. |
@@ -789,7 +789,7 @@ discard block |
||
789 | 789 | if (!isset($this->tva[$vatrate])) { |
790 | 790 | $this->tva[$vatrate] = 0; |
791 | 791 | } |
792 | - $this->tva[$vatrate] += $tvaligne; // ->tva is abandoned, we use now ->tva_array that is more complete |
|
792 | + $this->tva[$vatrate] += $tvaligne; // ->tva is abandoned, we use now ->tva_array that is more complete |
|
793 | 793 | $vatcode = $object->lines[$i]->vat_src_code; |
794 | 794 | if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) { |
795 | 795 | $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0; |
@@ -876,7 +876,7 @@ discard block |
||
876 | 876 | // Pagefoot |
877 | 877 | $this->_pagefoot($pdf, $object, $outputlangs, 0, $this->getHeightForQRInvoice($pdf->getPage(), $object, $langs)); |
878 | 878 | if (method_exists($pdf, 'AliasNbPages')) { |
879 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
879 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
880 | 880 | } |
881 | 881 | |
882 | 882 | if (getDolGlobalString('INVOICE_ADD_SWISS_QR_CODE') == 'bottom') { |
@@ -1150,7 +1150,7 @@ discard block |
||
1150 | 1150 | } |
1151 | 1151 | |
1152 | 1152 | $posxval = 52; |
1153 | - $posxend = 110; // End of x for text on left side |
|
1153 | + $posxend = 110; // End of x for text on left side |
|
1154 | 1154 | if ($this->page_largeur < 210) { // To work with US executive format |
1155 | 1155 | $posxend -= 10; |
1156 | 1156 | } |
@@ -1168,7 +1168,7 @@ discard block |
||
1168 | 1168 | $lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement); |
1169 | 1169 | $pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L'); |
1170 | 1170 | |
1171 | - $posy = $pdf->GetY() + 3; // We need spaces for 2 lines payment conditions |
|
1171 | + $posy = $pdf->GetY() + 3; // We need spaces for 2 lines payment conditions |
|
1172 | 1172 | } |
1173 | 1173 | |
1174 | 1174 | // Show category of operations |
@@ -1180,7 +1180,7 @@ discard block |
||
1180 | 1180 | |
1181 | 1181 | $pdf->SetFont('', '', $default_font_size - 2); |
1182 | 1182 | $pdf->SetXY($posxval, $posy); |
1183 | - $categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation); |
|
1183 | + $categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation); |
|
1184 | 1184 | $pdf->MultiCell($posxend - $posxval, 4, $categoryOfOperationLabel, 0, 'L'); |
1185 | 1185 | |
1186 | 1186 | $posy = $pdf->GetY() + 3; // for 2 lines |
@@ -1331,7 +1331,7 @@ discard block |
||
1331 | 1331 | include_once DOL_DOCUMENT_ROOT.'/core/lib/functions_be.lib.php'; |
1332 | 1332 | $invoicePaymentKey = dolBECalculateStructuredCommunication($object->ref, $object->type); |
1333 | 1333 | |
1334 | - $pdf->MultiCell(100, 3, $outputlangs->transnoentities('StructuredCommunication').": " . $outputlangs->convToOutputCharset($invoicePaymentKey), 0, 'L', 0); |
|
1334 | + $pdf->MultiCell(100, 3, $outputlangs->transnoentities('StructuredCommunication').": ".$outputlangs->convToOutputCharset($invoicePaymentKey), 0, 'L', 0); |
|
1335 | 1335 | } |
1336 | 1336 | } |
1337 | 1337 | } |
@@ -1734,7 +1734,7 @@ discard block |
||
1734 | 1734 | if (empty($hidetop)) { |
1735 | 1735 | // Show category of operations |
1736 | 1736 | if (getDolGlobalInt('INVOICE_CATEGORY_OF_OPERATION') == 1 && $this->categoryOfOperation >= 0) { |
1737 | - $categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations") . ' : ' . $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation); |
|
1737 | + $categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations").' : '.$outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation); |
|
1738 | 1738 | $pdf->SetXY($this->marge_gauche, $tab_top - 4); |
1739 | 1739 | $pdf->MultiCell(($pdf->GetStringWidth($categoryOfOperations)) + 4, 2, $categoryOfOperations); |
1740 | 1740 | } |
@@ -1904,7 +1904,7 @@ discard block |
||
1904 | 1904 | } |
1905 | 1905 | if ($this->situationinvoice) { |
1906 | 1906 | $langs->loadLangs(array("other")); |
1907 | - $title = $outputlangs->transnoentities("PDFInvoiceSituation") . " " . $outputlangs->transnoentities("NumberingShort") . $object->situation_counter . " -"; |
|
1907 | + $title = $outputlangs->transnoentities("PDFInvoiceSituation")." ".$outputlangs->transnoentities("NumberingShort").$object->situation_counter." -"; |
|
1908 | 1908 | } |
1909 | 1909 | if (getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE') && is_object($outputlangsbis)) { |
1910 | 1910 | $title .= ' - '; |
@@ -2130,7 +2130,7 @@ discard block |
||
2130 | 2130 | |
2131 | 2131 | $carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs); |
2132 | 2132 | |
2133 | - $mode = 'target'; |
|
2133 | + $mode = 'target'; |
|
2134 | 2134 | $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), ($usecontact ? 1 : 0), $mode, $object); |
2135 | 2135 | |
2136 | 2136 | // Show recipient |
@@ -2185,7 +2185,7 @@ discard block |
||
2185 | 2185 | if (!empty($carac_client_shipping)) { |
2186 | 2186 | $posy += $hautcadre; |
2187 | 2187 | |
2188 | - $hautcadre -= 10; // Height for the shipping address does not need to be as high as main box |
|
2188 | + $hautcadre -= 10; // Height for the shipping address does not need to be as high as main box |
|
2189 | 2189 | |
2190 | 2190 | // Show shipping frame |
2191 | 2191 | $pdf->SetXY($posx + 2, $posy - 5); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | * Dolibarr version of the loaded document |
79 | 79 | * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' |
80 | 80 | */ |
81 | - public $version = 'disabled'; // Disabled by default. Enabled in constructor if option INVOICE_USE_SITUATION is 2. |
|
81 | + public $version = 'disabled'; // Disabled by default. Enabled in constructor if option INVOICE_USE_SITUATION is 2. |
|
82 | 82 | |
83 | 83 | /** |
84 | 84 | * @var int height for info total |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | $outputlangsbis->loadLangs(array("main", "bills", "products", "dict", "companies")); |
293 | 293 | } |
294 | 294 | |
295 | - if (empty($object) || ($object->type != Facture::TYPE_SITUATION && ($object->type != Facture::TYPE_CREDIT_NOTE && !empty($object->situation_cycle_ref)))) { |
|
295 | + if (empty($object) || ($object->type != Facture::TYPE_SITUATION && ($object->type != Facture::TYPE_CREDIT_NOTE && !empty($object->situation_cycle_ref)))) { |
|
296 | 296 | setEventMessage($langs->trans('WarningsObjectIsNotASituation'), 'warnings'); |
297 | 297 | return 1; |
298 | 298 | } |
@@ -411,15 +411,15 @@ discard block |
||
411 | 411 | $pdf->SetAutoPageBreak(1, 0); |
412 | 412 | |
413 | 413 | // compute height for situation invoices |
414 | - $this->heightforinfotot = 45; // Height reserved to output the info and total part and payment part |
|
414 | + $this->heightforinfotot = 45; // Height reserved to output the info and total part and payment part |
|
415 | 415 | if (!getDolGlobalString('INVOICE_NO_PAYMENT_DETAILS') && $nbpayments > 0) { |
416 | 416 | $this->heightforinfotot += 4 * ($nbpayments + 3); |
417 | 417 | } |
418 | 418 | if ($nbprevsituation > 0) { |
419 | 419 | $this->heightforinfotot += 4 * ($nbprevsituation + 3); |
420 | 420 | } |
421 | - $this->heightforfreetext = (getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5)); // Height reserved to output the free text on last page |
|
422 | - $this->heightforfooter = $this->marge_basse + (!getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS') ? 12 : 22); // Height reserved to output the footer (value include bottom margin) |
|
421 | + $this->heightforfreetext = (getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5)); // Height reserved to output the free text on last page |
|
422 | + $this->heightforfooter = $this->marge_basse + (!getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS') ? 12 : 22); // Height reserved to output the footer (value include bottom margin) |
|
423 | 423 | |
424 | 424 | if (class_exists('TCPDF')) { |
425 | 425 | $pdf->setPrintHeader(false); |
@@ -433,7 +433,7 @@ discard block |
||
433 | 433 | if (!empty($conf->mycompany->multidir_output[$object->entity])) { |
434 | 434 | $logodir = $conf->mycompany->multidir_output[$object->entity]; |
435 | 435 | } |
436 | - $pagecount = $pdf->setSourceFile($logodir.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
436 | + $pagecount = $pdf->setSourceFile($logodir.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
437 | 437 | $this->tplidx = $pdf->importPage(1); |
438 | 438 | } |
439 | 439 | |
@@ -525,7 +525,7 @@ discard block |
||
525 | 525 | // $pdf->GetY() here can't be used. It is bottom of the second address box but first one may be higher |
526 | 526 | |
527 | 527 | // $this->tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks) |
528 | - $this->tab_top = 90 + $top_shift + $shipp_shift; // top_shift is an addition for linked objects or addons (0 in most cases) |
|
528 | + $this->tab_top = 90 + $top_shift + $shipp_shift; // top_shift is an addition for linked objects or addons (0 in most cases) |
|
529 | 529 | $this->tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); |
530 | 530 | |
531 | 531 | // You can add more thing under header here, if you increase $extra_under_address_shift too. |
@@ -1035,7 +1035,7 @@ discard block |
||
1035 | 1035 | if (!isset($this->tva[$vatrate])) { |
1036 | 1036 | $this->tva[$vatrate] = 0; |
1037 | 1037 | } |
1038 | - $this->tva[$vatrate] += $tvaligne; // ->tva is abandoned, we use now ->tva_array that is more complete |
|
1038 | + $this->tva[$vatrate] += $tvaligne; // ->tva is abandoned, we use now ->tva_array that is more complete |
|
1039 | 1039 | $vatcode = $object->lines[$i]->vat_src_code; |
1040 | 1040 | if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) { |
1041 | 1041 | $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0; |
@@ -1124,7 +1124,7 @@ discard block |
||
1124 | 1124 | // Pagefoot |
1125 | 1125 | $this->_pagefoot($pdf, $object, $outputlangs); |
1126 | 1126 | if (method_exists($pdf, 'AliasNbPages')) { |
1127 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
1127 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
1128 | 1128 | } |
1129 | 1129 | |
1130 | 1130 | $this->resumeLastPage($pdf, $object, 0, $tab_top, $outputlangs, $outputlangsbis); |
@@ -1336,8 +1336,8 @@ discard block |
||
1336 | 1336 | $posy = $pdf->GetY() + 4; |
1337 | 1337 | } |
1338 | 1338 | |
1339 | - $posxval = 52; // Position of values of properties shown on left side |
|
1340 | - $posxend = 110; // End of x for text on left side |
|
1339 | + $posxval = 52; // Position of values of properties shown on left side |
|
1340 | + $posxend = 110; // End of x for text on left side |
|
1341 | 1341 | if ($this->page_largeur < 210) { // To work with US executive format |
1342 | 1342 | $posxend -= 10; |
1343 | 1343 | } |
@@ -1367,7 +1367,7 @@ discard block |
||
1367 | 1367 | |
1368 | 1368 | $pdf->SetFont('', '', $default_font_size - 2); |
1369 | 1369 | $pdf->SetXY($posxval, $posy); |
1370 | - $categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation); |
|
1370 | + $categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation); |
|
1371 | 1371 | $pdf->MultiCell($posxend - $posxval, 4, $categoryOfOperationLabel, 0, 'L'); |
1372 | 1372 | |
1373 | 1373 | $posy = $pdf->GetY() + 3; // for 2 lines |
@@ -1534,7 +1534,7 @@ discard block |
||
1534 | 1534 | include_once DOL_DOCUMENT_ROOT.'/core/lib/functions_be.lib.php'; |
1535 | 1535 | $invoicePaymentKey = dolBECalculateStructuredCommunication($object->ref, $object->type); |
1536 | 1536 | |
1537 | - $pdf->MultiCell(100, 3, $outputlangs->transnoentities('StructuredCommunication').": " . $outputlangs->convToOutputCharset($invoicePaymentKey), 0, 'L', 0); |
|
1537 | + $pdf->MultiCell(100, 3, $outputlangs->transnoentities('StructuredCommunication').": ".$outputlangs->convToOutputCharset($invoicePaymentKey), 0, 'L', 0); |
|
1538 | 1538 | } |
1539 | 1539 | } |
1540 | 1540 | } |
@@ -1709,7 +1709,7 @@ discard block |
||
1709 | 1709 | if (($object->lines[$i]->info_bits & 0x01) == 0x01) { |
1710 | 1710 | $vatrate .= '*'; |
1711 | 1711 | } |
1712 | - if (! isset($tvas[$vatrate])) { |
|
1712 | + if (!isset($tvas[$vatrate])) { |
|
1713 | 1713 | $tvas[$vatrate] = 0; |
1714 | 1714 | } |
1715 | 1715 | $tvas[$vatrate] += $tvaligne; |
@@ -1977,7 +1977,7 @@ discard block |
||
1977 | 1977 | if (empty($hidetop)) { |
1978 | 1978 | // Show category of operations |
1979 | 1979 | if (getDolGlobalInt('INVOICE_CATEGORY_OF_OPERATION') == 1 && $this->categoryOfOperation >= 0) { |
1980 | - $categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations") . ' : ' . $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation); |
|
1980 | + $categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations").' : '.$outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation); |
|
1981 | 1981 | $pdf->SetXY($this->marge_gauche, $tab_top - 4); |
1982 | 1982 | $pdf->MultiCell(($pdf->GetStringWidth($categoryOfOperations)) + 4, 2, $categoryOfOperations); |
1983 | 1983 | } |
@@ -1997,7 +1997,7 @@ discard block |
||
1997 | 1997 | $pdf->SetFont('', '', $default_font_size - 1); |
1998 | 1998 | |
1999 | 1999 | // Output Rect |
2000 | - $this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect prend une longueur en 3eme param et 4eme param |
|
2000 | + $this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect prend une longueur en 3eme param et 4eme param |
|
2001 | 2001 | |
2002 | 2002 | // situation invoice |
2003 | 2003 | $pdf->SetFont('', '', $default_font_size - 2); |
@@ -2037,7 +2037,7 @@ discard block |
||
2037 | 2037 | $pdf->SetFont('', '', $default_font_size - 1); |
2038 | 2038 | |
2039 | 2039 | if (empty($hidetop)) { |
2040 | - $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 |
|
2040 | + $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 |
|
2041 | 2041 | } |
2042 | 2042 | } |
2043 | 2043 | |
@@ -2607,7 +2607,7 @@ discard block |
||
2607 | 2607 | 'overtitle' => array( |
2608 | 2608 | 'textkey' => 'Chantier', // use lang key is useful in somme case with module |
2609 | 2609 | 'align' => 'C', |
2610 | - 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left |
|
2610 | + 'padding' => array(0.5, 0.5, 0.5, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left |
|
2611 | 2611 | 'width' => 18 |
2612 | 2612 | ), |
2613 | 2613 | ); |
@@ -2632,13 +2632,13 @@ discard block |
||
2632 | 2632 | ), |
2633 | 2633 | 'border-left' => true, // add left line separator |
2634 | 2634 | 'overtitle' => array( |
2635 | - 'textkey' => 'S'.$derniere_situation->situation_counter . ' - ' . dol_print_date($derniere_situation->date, "%d/%m/%Y"), |
|
2635 | + 'textkey' => 'S'.$derniere_situation->situation_counter.' - '.dol_print_date($derniere_situation->date, "%d/%m/%Y"), |
|
2636 | 2636 | 'align' => 'C', |
2637 | - 'padding' => array(0.5,0.2,0.5,0.2), // Like css 0 => top, 1 => right, 2 => bottom, 3 => left |
|
2637 | + 'padding' => array(0.5, 0.2, 0.5, 0.2), // Like css 0 => top, 1 => right, 2 => bottom, 3 => left |
|
2638 | 2638 | 'width' => 10 + 15 //current width + amount cell width |
2639 | 2639 | ), |
2640 | 2640 | ); |
2641 | - if ($this->situationinvoice && ! empty($this->TDataSituation['date_derniere_situation'])) { |
|
2641 | + if ($this->situationinvoice && !empty($this->TDataSituation['date_derniere_situation'])) { |
|
2642 | 2642 | $this->cols['prev_progress']['status'] = true; |
2643 | 2643 | } |
2644 | 2644 | |
@@ -2653,7 +2653,7 @@ discard block |
||
2653 | 2653 | ), |
2654 | 2654 | 'border-left' => true, // add left line separator |
2655 | 2655 | ); |
2656 | - if ($this->situationinvoice && ! empty($this->TDataSituation['date_derniere_situation'])) { |
|
2656 | + if ($this->situationinvoice && !empty($this->TDataSituation['date_derniere_situation'])) { |
|
2657 | 2657 | $this->cols['prev_progress_amount']['status'] = true; |
2658 | 2658 | } |
2659 | 2659 | |
@@ -2668,9 +2668,9 @@ discard block |
||
2668 | 2668 | ), |
2669 | 2669 | 'border-left' => true, // add left line separator |
2670 | 2670 | 'overtitle' => array( |
2671 | - 'textkey' => 'S'.$object->situation_counter . ' - ' . dol_print_date($object->date, "%d/%m/%Y"), |
|
2671 | + 'textkey' => 'S'.$object->situation_counter.' - '.dol_print_date($object->date, "%d/%m/%Y"), |
|
2672 | 2672 | 'align' => 'C', |
2673 | - 'padding' => array(0.5,0.2,0.5,0.2), // Like css 0 => top, 1 => right, 2 => bottom, 3 => left |
|
2673 | + 'padding' => array(0.5, 0.2, 0.5, 0.2), // Like css 0 => top, 1 => right, 2 => bottom, 3 => left |
|
2674 | 2674 | 'width' => 10 + 15 |
2675 | 2675 | ), |
2676 | 2676 | ); |
@@ -2795,7 +2795,7 @@ discard block |
||
2795 | 2795 | |
2796 | 2796 | // Output Rect |
2797 | 2797 | // KEEPTHIS => Affiche les bords extérieurs |
2798 | - $this->printRoundedRectBtp($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect prend une longueur en 3eme param et 4eme param |
|
2798 | + $this->printRoundedRectBtp($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect prend une longueur en 3eme param et 4eme param |
|
2799 | 2799 | |
2800 | 2800 | $pdf->line($this->posx_cumul_anterieur - 1, $tab_top, $this->posx_cumul_anterieur - 1, $tab_top + $tab_height); |
2801 | 2801 | if (empty($hidetop)) { |
@@ -2852,7 +2852,7 @@ discard block |
||
2852 | 2852 | $pdf->SetXY($this->marge_gauche + 10, $tab_top + 24 + $i); |
2853 | 2853 | $pdf->MultiCell(80, 2, $outputlangs->transnoentities("TotalHT").' '.$TVatInfo['label'], '', 'L'); |
2854 | 2854 | |
2855 | - if (! empty($this->TDataSituation['current'][$tva_tx_formated]['TVA'])) { |
|
2855 | + if (!empty($this->TDataSituation['current'][$tva_tx_formated]['TVA'])) { |
|
2856 | 2856 | $pdf->SetXY($this->marge_gauche + 10, $tab_top + 28 + $i); |
2857 | 2857 | $pdf->MultiCell(80, 2, $outputlangs->transnoentities("VAT").' '.$TVatInfo['label'], '', 'L'); |
2858 | 2858 | } else { |
@@ -2916,7 +2916,7 @@ discard block |
||
2916 | 2916 | $pdf->MultiCell(32, 2, price($this->TDataSituation[$col][$tva_tx_formated]['HT'], 0, '', 1, -1, 2), '', 'R'); |
2917 | 2917 | |
2918 | 2918 | // Total TVA |
2919 | - if (! empty($this->TDataSituation['current'][$tva_tx_formated]['TVA'])) { |
|
2919 | + if (!empty($this->TDataSituation['current'][$tva_tx_formated]['TVA'])) { |
|
2920 | 2920 | $pdf->SetXY($x, $tab_top + 28 + $i); |
2921 | 2921 | $pdf->MultiCell(32, 2, price($this->TDataSituation[$col][$tva_tx_formated]['TVA'], 0, '', 1, -1, 2), '', 'R'); |
2922 | 2922 | } else { |
@@ -2996,7 +2996,7 @@ discard block |
||
2996 | 2996 | |
2997 | 2997 | $TDataSituation = array(); |
2998 | 2998 | |
2999 | - if (! empty($facDerniereSituation)) { |
|
2999 | + if (!empty($facDerniereSituation)) { |
|
3000 | 3000 | $TDataSituation['derniere_situation'] = $facDerniereSituation; |
3001 | 3001 | $TDataSituation['date_derniere_situation'] = $facDerniereSituation->date; |
3002 | 3002 | } |
@@ -3005,9 +3005,9 @@ discard block |
||
3005 | 3005 | $retenue_garantie_anterieure = 0; |
3006 | 3006 | // Init tous les champs à 0 |
3007 | 3007 | $TDataSituation['cumul_anterieur'] = array( |
3008 | - 'HT' => 0, //montant HT normal |
|
3009 | - 'TVA' => 0, //montant de la TVA sur le HTnet |
|
3010 | - 'TTC' => 0, //montant TTC (HTnet + TVA) |
|
3008 | + 'HT' => 0, //montant HT normal |
|
3009 | + 'TVA' => 0, //montant de la TVA sur le HTnet |
|
3010 | + 'TTC' => 0, //montant TTC (HTnet + TVA) |
|
3011 | 3011 | 'retenue_garantie' => 0, |
3012 | 3012 | 'travaux_sup' => 0, |
3013 | 3013 | 'HTnet' => 0, //montant HT |
@@ -3037,7 +3037,7 @@ discard block |
||
3037 | 3037 | $isFirstSituation = false; |
3038 | 3038 | if (!empty($l->fk_prev_id)) { |
3039 | 3039 | $prevSituationPercent = $l->get_prev_progress($previousInvoice->id, true); |
3040 | - } elseif (! array_key_exists($i + 1, $TPreviousInvoices)) { |
|
3040 | + } elseif (!array_key_exists($i + 1, $TPreviousInvoices)) { |
|
3041 | 3041 | $isFirstSituation = true; |
3042 | 3042 | } |
3043 | 3043 | |
@@ -3047,7 +3047,7 @@ discard block |
||
3047 | 3047 | |
3048 | 3048 | //1ere ligne |
3049 | 3049 | $amounttva = $calc_ht * ($ltvatx / 100); |
3050 | - if (! isset($TDataSituation['cumul_anterieur'][$ltvatx])) { |
|
3050 | + if (!isset($TDataSituation['cumul_anterieur'][$ltvatx])) { |
|
3051 | 3051 | $TDataSituation['cumul_anterieur'][$ltvatx]['HT'] = $calc_ht; |
3052 | 3052 | $TDataSituation['cumul_anterieur'][$ltvatx]['TVA'] = $amounttva; |
3053 | 3053 | } else { |
@@ -3059,14 +3059,14 @@ discard block |
||
3059 | 3059 | //le grand total de TVA |
3060 | 3060 | // $TDataSituation['cumul_anterieur']['TVA'] += $amounttva; |
3061 | 3061 | |
3062 | - if (empty($l->fk_prev_id) && ! $isFirstSituation) { |
|
3062 | + if (empty($l->fk_prev_id) && !$isFirstSituation) { |
|
3063 | 3063 | // TODO: à clarifier, mais pour moi, un facture de situation précédente qui a des progressions à 0% c'est pas logique |
3064 | 3064 | $TDataSituation['cumul_anterieur']['travaux_sup'] += $calc_ht; |
3065 | 3065 | } |
3066 | 3066 | } |
3067 | 3067 | } |
3068 | 3068 | |
3069 | - if (! empty($previousInvoice->retained_warranty) && !getDolGlobalString('USE_RETAINED_WARRANTY_ONLY_FOR_SITUATION_FINAL')) { |
|
3069 | + if (!empty($previousInvoice->retained_warranty) && !getDolGlobalString('USE_RETAINED_WARRANTY_ONLY_FOR_SITUATION_FINAL')) { |
|
3070 | 3070 | $retenue_garantie_anterieure += $previousInvoice->getRetainedWarrantyAmount(); |
3071 | 3071 | } |
3072 | 3072 | |
@@ -3080,7 +3080,7 @@ discard block |
||
3080 | 3080 | // print json_encode($facDerniereSituation->lines);exit; |
3081 | 3081 | $TDataSituation['current'] = $this->btpGetInvoiceAmounts($object->id); |
3082 | 3082 | |
3083 | - if (! empty($facDerniereSituation->lines)) { |
|
3083 | + if (!empty($facDerniereSituation->lines)) { |
|
3084 | 3084 | $TFacLinesKey = array_keys($facDerniereSituation->lines); |
3085 | 3085 | $TObjectLinesKey = array_keys($object->lines); |
3086 | 3086 | $TDiffKey = array_diff($TObjectLinesKey, $TFacLinesKey); |
@@ -3274,7 +3274,7 @@ discard block |
||
3274 | 3274 | */ |
3275 | 3275 | public function btpGetInvoiceAmounts($id, $forceReadFromDB = false) |
3276 | 3276 | { |
3277 | - global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; |
|
3277 | + global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblignes; |
|
3278 | 3278 | |
3279 | 3279 | $object = new Facture($db); |
3280 | 3280 | $object->fetch($id); |
@@ -3292,16 +3292,16 @@ discard block |
||
3292 | 3292 | $facDerniereSituation = $TPreviousInvoices[0]; |
3293 | 3293 | |
3294 | 3294 | $ret = array( |
3295 | - 'HT' => 0, //montant HT normal |
|
3295 | + 'HT' => 0, //montant HT normal |
|
3296 | 3296 | 'HTnet' => 0, //montant HT |
3297 | - 'TVA' => 0, //montant de la TVA sur le HTnet |
|
3298 | - 'TTC' => 0, //montant TTC (HTnet + TVA) |
|
3297 | + 'TVA' => 0, //montant de la TVA sur le HTnet |
|
3298 | + 'TTC' => 0, //montant TTC (HTnet + TVA) |
|
3299 | 3299 | 'retenue_garantie' => 0, |
3300 | 3300 | 'travaux_sup' => 0, |
3301 | 3301 | 'total_a_payer' => 0 //montant "a payer" sur la facture |
3302 | 3302 | ); |
3303 | 3303 | |
3304 | - if (! empty($facDerniereSituation)) { |
|
3304 | + if (!empty($facDerniereSituation)) { |
|
3305 | 3305 | $ret['derniere_situation'] = $facDerniereSituation; |
3306 | 3306 | $ret['date_derniere_situation'] = $facDerniereSituation->date; |
3307 | 3307 | } |
@@ -3433,7 +3433,7 @@ discard block |
||
3433 | 3433 | $label = $outputlangs->transnoentities("SituationInvoiceTotalProposal"); |
3434 | 3434 | $pdf->MultiCell($this->page_largeur - ($this->marge_droite + $this->marge_gauche), 3, $label, 0, 'L', 0, 1, $posx, $posy + 1); |
3435 | 3435 | |
3436 | - $amount = price($sign * ($total_ht + (! empty($propal->remise) ? $propal->remise : 0))); |
|
3436 | + $amount = price($sign * ($total_ht + (!empty($propal->remise) ? $propal->remise : 0))); |
|
3437 | 3437 | $pdf->MultiCell($width2, 3, $amount, 0, 'R', 0, 1, $posx + $width, $posy + 1); |
3438 | 3438 | |
3439 | 3439 | $pdf->SetFont('', '', $default_font_size - 1); |
@@ -3476,7 +3476,7 @@ discard block |
||
3476 | 3476 | |
3477 | 3477 | $force_to_zero = false; |
3478 | 3478 | |
3479 | - $idinv = 0;//count($previousinvoices); |
|
3479 | + $idinv = 0; //count($previousinvoices); |
|
3480 | 3480 | while ($idinv < count($previousinvoices)) { |
3481 | 3481 | $invoice = $previousinvoices[$idinv]; |
3482 | 3482 | |
@@ -3498,7 +3498,7 @@ discard block |
||
3498 | 3498 | $force_to_zero = true; |
3499 | 3499 | } |
3500 | 3500 | |
3501 | - $ref .= ' - '. $invoice->ref; |
|
3501 | + $ref .= ' - '.$invoice->ref; |
|
3502 | 3502 | $ref .= ' ('.dol_print_date($invoice->date, "%d/%m/%Y", false, $outputlangs).')'; |
3503 | 3503 | $pdf->MultiCell($this->page_largeur - ($this->marge_droite + $this->marge_gauche), 3, $ref, 0, 'L', 0); |
3504 | 3504 | |
@@ -3529,7 +3529,7 @@ discard block |
||
3529 | 3529 | if (($invoice->lines[$i]->info_bits & 0x01) == 0x01) { |
3530 | 3530 | $vatrate .= '*'; |
3531 | 3531 | } |
3532 | - if (! isset($tvas[$vatrate])) { |
|
3532 | + if (!isset($tvas[$vatrate])) { |
|
3533 | 3533 | $tvas[$vatrate] = 0; |
3534 | 3534 | } |
3535 | 3535 | $tvas[$vatrate] += $tvaligne; |
@@ -3707,7 +3707,7 @@ discard block |
||
3707 | 3707 | $pdf->SetXY($posx + $width4, $posy + $height * $index + $y); |
3708 | 3708 | $pdf->MultiCell($width4, $height - 1, price($sign * $payment['amount'], 0, $outputlangs), 0, 'L', 0); |
3709 | 3709 | $pdf->SetXY($posx + $width4 * 2, $posy + $height * $index + $y); |
3710 | - $oper = $outputlangs->transnoentitiesnoconv("PaymentTypeShort" . $payment['type']); |
|
3710 | + $oper = $outputlangs->transnoentitiesnoconv("PaymentTypeShort".$payment['type']); |
|
3711 | 3711 | |
3712 | 3712 | $pdf->MultiCell($width4, $height - 1, $oper, 0, 'L', 0); |
3713 | 3713 | $pdf->SetXY($posx + $width4 * 3, $posy + $height * $index + $y); |
@@ -3738,7 +3738,7 @@ discard block |
||
3738 | 3738 | $this->_pagehead($pdf, $object, 0, $outputlangs); |
3739 | 3739 | } |
3740 | 3740 | $pdf->setPage($pageposafter + 1); |
3741 | - $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. |
|
3741 | + $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. |
|
3742 | 3742 | |
3743 | 3743 | $posy = $this->tab_top_newpage + 1; |
3744 | 3744 | } else { |
@@ -3770,7 +3770,7 @@ discard block |
||
3770 | 3770 | |
3771 | 3771 | $posy += 10; |
3772 | 3772 | |
3773 | - $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. |
|
3773 | + $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. |
|
3774 | 3774 | |
3775 | 3775 | $pdf->SetTextColor(0, 0, 60); |
3776 | 3776 | $pdf->SetFont('', '', $default_font_size - 1); |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | if (!empty($conf->mycompany->multidir_output[$object->entity])) { |
358 | 358 | $logodir = $conf->mycompany->multidir_output[$object->entity]; |
359 | 359 | } |
360 | - $pagecount = $pdf->setSourceFile($logodir.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
360 | + $pagecount = $pdf->setSourceFile($logodir.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
361 | 361 | $tplidx = $pdf->importPage(1); |
362 | 362 | } |
363 | 363 | |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | // $pdf->GetY() here can't be used. It is bottom of the second address box but first one may be higher |
455 | 455 | |
456 | 456 | // $this->tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks) |
457 | - $this->tab_top = 90 + $top_shift + $shipp_shift; // top_shift is an addition for linked objects or addons (0 in most cases) |
|
457 | + $this->tab_top = 90 + $top_shift + $shipp_shift; // top_shift is an addition for linked objects or addons (0 in most cases) |
|
458 | 458 | $this->tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); |
459 | 459 | |
460 | 460 | // You can add more thing under header here, if you increase $extra_under_address_shift too. |
@@ -707,7 +707,7 @@ discard block |
||
707 | 707 | } |
708 | 708 | |
709 | 709 | $pdf->setTopMargin($this->tab_top_newpage); |
710 | - $page_bottom_margin = $this->heightforfooter + $this->heightforfreetext + $this->heightforinfotot + $this->getHeightForQRInvoice($pdf->getPage(), $object, $langs); |
|
710 | + $page_bottom_margin = $this->heightforfooter + $this->heightforfreetext + $this->heightforinfotot + $this->getHeightForQRInvoice($pdf->getPage(), $object, $langs); |
|
711 | 711 | $pdf->setPageOrientation('', 1, $page_bottom_margin); |
712 | 712 | $pageposbefore = $pdf->getPage(); |
713 | 713 | |
@@ -953,7 +953,7 @@ discard block |
||
953 | 953 | if (!isset($this->tva[$vatrate])) { |
954 | 954 | $this->tva[$vatrate] = 0; |
955 | 955 | } |
956 | - $this->tva[$vatrate] += $tvaligne; // ->tva is abandoned, we use now ->tva_array that is more complete |
|
956 | + $this->tva[$vatrate] += $tvaligne; // ->tva is abandoned, we use now ->tva_array that is more complete |
|
957 | 957 | $vatcode = $object->lines[$i]->vat_src_code; |
958 | 958 | if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) { |
959 | 959 | $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0; |
@@ -1037,7 +1037,7 @@ discard block |
||
1037 | 1037 | // Pagefoot |
1038 | 1038 | $this->_pagefoot($pdf, $object, $outputlangs, 0, $this->getHeightForQRInvoice($pdf->getPage(), $object, $langs)); |
1039 | 1039 | if (method_exists($pdf, 'AliasNbPages')) { |
1040 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
1040 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
1041 | 1041 | } |
1042 | 1042 | |
1043 | 1043 | if (getDolGlobalString('INVOICE_ADD_SWISS_QR_CODE') == 'bottom') { |
@@ -1246,8 +1246,8 @@ discard block |
||
1246 | 1246 | $posy = $pdf->GetY() + 4; |
1247 | 1247 | } |
1248 | 1248 | |
1249 | - $posxval = 52; // Position of values of properties shown on left side |
|
1250 | - $posxend = 110; // End of x for text on left side |
|
1249 | + $posxval = 52; // Position of values of properties shown 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 | } |
@@ -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 |
@@ -1455,7 +1455,7 @@ discard block |
||
1455 | 1455 | include_once DOL_DOCUMENT_ROOT.'/core/lib/functions_be.lib.php'; |
1456 | 1456 | $invoicePaymentKey = dolBECalculateStructuredCommunication($object->ref, $object->type); |
1457 | 1457 | |
1458 | - $pdf->MultiCell(100, 3, $outputlangs->transnoentities('StructuredCommunication').": " . $outputlangs->convToOutputCharset($invoicePaymentKey), 0, 'L', 0); |
|
1458 | + $pdf->MultiCell(100, 3, $outputlangs->transnoentities('StructuredCommunication').": ".$outputlangs->convToOutputCharset($invoicePaymentKey), 0, 'L', 0); |
|
1459 | 1459 | } |
1460 | 1460 | } |
1461 | 1461 | } |
@@ -2068,7 +2068,7 @@ discard block |
||
2068 | 2068 | if (empty($hidetop)) { |
2069 | 2069 | // Show category of operations |
2070 | 2070 | if (getDolGlobalInt('INVOICE_CATEGORY_OF_OPERATION') == 1 && $this->categoryOfOperation >= 0) { |
2071 | - $categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations") . ' : ' . $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation); |
|
2071 | + $categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations").' : '.$outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation); |
|
2072 | 2072 | $pdf->SetXY($this->marge_gauche, $tab_top - 4); |
2073 | 2073 | $pdf->MultiCell(($pdf->GetStringWidth($categoryOfOperations)) + 4, 2, $categoryOfOperations); |
2074 | 2074 | } |
@@ -2184,7 +2184,7 @@ discard block |
||
2184 | 2184 | } |
2185 | 2185 | if ($this->situationinvoice) { |
2186 | 2186 | $langs->loadLangs(array("other")); |
2187 | - $title = $outputlangs->transnoentities("PDFInvoiceSituation") . " " . $outputlangs->transnoentities("NumberingShort") . $object->situation_counter . " -"; |
|
2187 | + $title = $outputlangs->transnoentities("PDFInvoiceSituation")." ".$outputlangs->transnoentities("NumberingShort").$object->situation_counter." -"; |
|
2188 | 2188 | } |
2189 | 2189 | if (getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE') && is_object($outputlangsbis)) { |
2190 | 2190 | $title .= ' - '; |
@@ -2465,7 +2465,7 @@ discard block |
||
2465 | 2465 | if (!empty($carac_client_shipping)) { |
2466 | 2466 | $posy += $hautcadre; |
2467 | 2467 | |
2468 | - $hautcadre -= 10; // Height for the shipping address does not need to be as high as main box |
|
2468 | + $hautcadre -= 10; // Height for the shipping address does not need to be as high as main box |
|
2469 | 2469 | |
2470 | 2470 | // Show shipping frame |
2471 | 2471 | $pdf->SetXY($posx + 2, $posy - 5); |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | /** |
177 | 177 | * @var string |
178 | 178 | */ |
179 | - public $cond_reglement_doc; // label doc |
|
179 | + public $cond_reglement_doc; // label doc |
|
180 | 180 | |
181 | 181 | /** |
182 | 182 | * @var string |
@@ -1182,7 +1182,7 @@ discard block |
||
1182 | 1182 | $this->id = 0; |
1183 | 1183 | $this->statut = 0; |
1184 | 1184 | |
1185 | - if (!getDolGlobalString('SUPPLIER_PROPOSAL_ADDON') || !is_readable(DOL_DOCUMENT_ROOT."/core/modules/supplier_proposal/" . getDolGlobalString('SUPPLIER_PROPOSAL_ADDON').".php")) { |
|
1185 | + if (!getDolGlobalString('SUPPLIER_PROPOSAL_ADDON') || !is_readable(DOL_DOCUMENT_ROOT."/core/modules/supplier_proposal/".getDolGlobalString('SUPPLIER_PROPOSAL_ADDON').".php")) { |
|
1186 | 1186 | $this->error = 'ErrorSetupNotComplete'; |
1187 | 1187 | return -1; |
1188 | 1188 | } |
@@ -1193,7 +1193,7 @@ discard block |
||
1193 | 1193 | $this->date = $now; |
1194 | 1194 | |
1195 | 1195 | // Set ref |
1196 | - require_once DOL_DOCUMENT_ROOT."/core/modules/supplier_proposal/" . getDolGlobalString('SUPPLIER_PROPOSAL_ADDON').'.php'; |
|
1196 | + require_once DOL_DOCUMENT_ROOT."/core/modules/supplier_proposal/".getDolGlobalString('SUPPLIER_PROPOSAL_ADDON').'.php'; |
|
1197 | 1197 | $obj = getDolGlobalString('SUPPLIER_PROPOSAL_ADDON'); |
1198 | 1198 | $modSupplierProposal = new $obj(); |
1199 | 1199 | '@phan-var-force ModeleNumRefSupplierProposal $modSupplierProposal'; |
@@ -1295,7 +1295,7 @@ discard block |
||
1295 | 1295 | $this->status = (int) $obj->fk_statut; |
1296 | 1296 | $this->datec = $this->db->jdate($obj->datec); // TODO deprecated |
1297 | 1297 | $this->datev = $this->db->jdate($obj->datev); // TODO deprecated |
1298 | - $this->date_creation = $this->db->jdate($obj->datec); // Creation date |
|
1298 | + $this->date_creation = $this->db->jdate($obj->datec); // Creation date |
|
1299 | 1299 | $this->date = $this->date_creation; |
1300 | 1300 | $this->date_validation = $this->db->jdate($obj->datev); // Validation date |
1301 | 1301 | $this->delivery_date = $this->db->jdate($obj->delivery_date); |
@@ -1374,7 +1374,7 @@ discard block |
||
1374 | 1374 | $line->total_localtax1 = $objp->total_localtax1; |
1375 | 1375 | $line->total_localtax2 = $objp->total_localtax2; |
1376 | 1376 | $line->total_ttc = $objp->total_ttc; |
1377 | - $line->fk_fournprice = $objp->fk_fournprice; |
|
1377 | + $line->fk_fournprice = $objp->fk_fournprice; |
|
1378 | 1378 | $marginInfos = getMarginInfos($objp->subprice, $objp->remise_percent, $objp->tva_tx, $objp->localtax1_tx, $objp->localtax2_tx, $line->fk_fournprice, $objp->pa_ht); |
1379 | 1379 | $line->pa_ht = $marginInfos[0]; |
1380 | 1380 | $line->marge_tx = $marginInfos[1]; |
@@ -1957,7 +1957,7 @@ discard block |
||
1957 | 1957 | |
1958 | 1958 | if (!$error) { |
1959 | 1959 | $this->status = self::STATUS_DRAFT; |
1960 | - $this->statut = self::STATUS_DRAFT; // deprecated |
|
1960 | + $this->statut = self::STATUS_DRAFT; // deprecated |
|
1961 | 1961 | $this->db->commit(); |
1962 | 1962 | return 1; |
1963 | 1963 | } else { |
@@ -2465,7 +2465,7 @@ discard block |
||
2465 | 2465 | if (getDolGlobalString('SUPPLIER_PROPOSAL_ADDON')) { |
2466 | 2466 | $mybool = false; |
2467 | 2467 | |
2468 | - $file = getDolGlobalString('SUPPLIER_PROPOSAL_ADDON') . ".php"; |
|
2468 | + $file = getDolGlobalString('SUPPLIER_PROPOSAL_ADDON').".php"; |
|
2469 | 2469 | $classname = getDolGlobalString('SUPPLIER_PROPOSAL_ADDON'); |
2470 | 2470 | |
2471 | 2471 | // Include file with class |
@@ -2633,7 +2633,7 @@ discard block |
||
2633 | 2633 | } |
2634 | 2634 | } |
2635 | 2635 | global $action; |
2636 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
2636 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
2637 | 2637 | $parameters = array('id' => $this->id, 'getnomurl' => &$result); |
2638 | 2638 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
2639 | 2639 | if ($reshook > 0) { |
@@ -3312,7 +3312,7 @@ discard block |
||
3312 | 3312 | $sql .= " ".price2num($this->localtax2_tx).","; |
3313 | 3313 | $sql .= " '".$this->db->escape($this->localtax1_type)."',"; |
3314 | 3314 | $sql .= " '".$this->db->escape($this->localtax2_type)."',"; |
3315 | - $sql .= " ".price2num($this->subprice, 'MU') .","; |
|
3315 | + $sql .= " ".price2num($this->subprice, 'MU').","; |
|
3316 | 3316 | $sql .= " ".((float) $this->remise_percent).","; |
3317 | 3317 | $sql .= " ".(isset($this->info_bits) ? ((int) $this->info_bits) : "null").","; |
3318 | 3318 | $sql .= " ".price2num($this->total_ht, 'MT').","; |
@@ -203,8 +203,8 @@ |
||
203 | 203 | $object->mandatory = $mandatory; |
204 | 204 | |
205 | 205 | if (getDolGlobalString('RESOURCE_USED_IN_EVENT_CHECK') && $object->element_type == 'action' && $object->resource_type == 'dolresource' && intval($object->busy) == 1) { |
206 | - $eventDateStart = $object->objelement->datep; // @phan-suppress-current-line PhanUndeclaredProperty |
|
207 | - $eventDateEnd = $object->objelement->datef; // @phan-suppress-current-line PhanUndeclaredProperty |
|
206 | + $eventDateStart = $object->objelement->datep; // @phan-suppress-current-line PhanUndeclaredProperty |
|
207 | + $eventDateEnd = $object->objelement->datef; // @phan-suppress-current-line PhanUndeclaredProperty |
|
208 | 208 | $isFullDayEvent = $objstat->fulldayevent; |
209 | 209 | if (empty($eventDateEnd)) { |
210 | 210 | if ($isFullDayEvent) { |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | */ |
47 | 47 | public function testRestGetContact() |
48 | 48 | { |
49 | - global $conf,$user,$langs,$db; |
|
49 | + global $conf, $user, $langs, $db; |
|
50 | 50 | //fetch Non-Existent contact |
51 | 51 | $url = $this->api_url.'/contacts/123456789?api_key='.$this->api_key; |
52 | 52 | //$addheaders=array('Content-Type: application/json'); |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | */ |
84 | 84 | public function testRestCreateContact() |
85 | 85 | { |
86 | - global $conf,$user,$langs,$db; |
|
86 | + global $conf, $user, $langs, $db; |
|
87 | 87 | // attempt to create without mandatory fields |
88 | 88 | $url = $this->api_url.'/contacts?api_key='.$this->api_key; |
89 | 89 | $addheaders = array('Content-Type: application/json'); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | //print __METHOD__." Result for creating incomplete contact".var_export($result, true)."\n"; |
100 | 100 | //print __METHOD__." curl_error_no: ".$result['curl_error_no']."\n"; |
101 | 101 | $this->assertEquals($result['curl_error_no'], ''); |
102 | - $object = json_decode($result['content'], true); // If success content is just an id, if not an array |
|
102 | + $object = json_decode($result['content'], true); // If success content is just an id, if not an array |
|
103 | 103 | $this->assertNotNull($object, "Parsing of json result must no be null"); |
104 | 104 | $this->assertEquals(400, (empty($object['error']['code']) ? 0 : $object['error']['code']), 'Error'.(empty($object['error']['message']) ? '' : ' '.$object['error']['message'])); |
105 | 105 | |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | unset($result); |
110 | 110 | // Creating a Contact |
111 | 111 | $bodyobj = array( |
112 | - "firstname" => "testRestContact" . mt_rand(), |
|
112 | + "firstname" => "testRestContact".mt_rand(), |
|
113 | 113 | "lastname" => "testRestContact", |
114 | 114 | ); |
115 | 115 | |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | |
122 | 122 | $this->assertEquals($result['curl_error_no'], ''); |
123 | 123 | |
124 | - $object = json_decode($result['content'], true); // If success content is just an id, if not an array |
|
124 | + $object = json_decode($result['content'], true); // If success content is just an id, if not an array |
|
125 | 125 | $this->assertNotNull($object, "Parsing of json result must not be null"); |
126 | 126 | $this->assertNotEquals(500, (empty($object['error']['code']) ? 0 : $object['error']['code']), 'Error'.(empty($object['error']['message']) ? '' : ' '.$object['error']['message'])); |
127 | 127 | $this->assertGreaterThan(0, $object, 'ID return is no > 0'); |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | */ |
141 | 141 | public function testRestUpdateContact($objid) |
142 | 142 | { |
143 | - global $conf,$user,$langs,$db; |
|
143 | + global $conf, $user, $langs, $db; |
|
144 | 144 | // attempt to create without mandatory fields |
145 | 145 | $url = $this->api_url.'/contacts?api_key='.$this->api_key; |
146 | 146 | $addheaders = array('Content-Type: application/json'); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | ); |
154 | 154 | |
155 | 155 | $updateRequestBody = json_encode($updateBody); |
156 | - $updateUrl = $this->api_url . '/contacts/' . $objid. '?api_key=' . $this->api_key; |
|
156 | + $updateUrl = $this->api_url.'/contacts/'.$objid.'?api_key='.$this->api_key; |
|
157 | 157 | $updateResult = getURLContent($updateUrl, 'PUTALREADYFORMATED', $updateRequestBody, 1, $addheaders, array('http', 'https'), 2); |
158 | 158 | $this->assertEquals($updateResult['curl_error_no'], ''); |
159 | 159 |
@@ -47,7 +47,7 @@ |
||
47 | 47 | */ |
48 | 48 | public function testPushDocument() |
49 | 49 | { |
50 | - global $conf,$user,$langs,$db; |
|
50 | + global $conf, $user, $langs, $db; |
|
51 | 51 | |
52 | 52 | $url = $this->api_url.'/documents/upload?api_key='.$this->api_key; |
53 | 53 |