diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index b767e78294d..51cac4c7394 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -65,6 +65,11 @@ class Tva extends CommonObject */ public $fk_bank; + /** + * @var int accountid + */ + public $accountid; + /** * @var int ID */ diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php index 8182c6f5ea7..e4531140f8f 100644 --- a/htdocs/core/modules/bank/doc/pdf_ban.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_ban.modules.php @@ -93,7 +93,7 @@ class pdf_ban extends ModeleBankAccountDoc /** * Fonction generant le projet sur le disque * - * @param Project $object Object project a generer + * @param Account $object Object Account to generate * @param Translate $outputlangs Lang output object * @return int 1 if OK, <=0 if KO */ @@ -114,8 +114,7 @@ class pdf_ban extends ModeleBankAccountDoc //$nblines = count($object->lines); // This is set later with array of tasks // Definition of $dir and $file - if ($object->specimen) - { + if ($object->specimen) { $dir = $conf->bank->dir_output; $file = $dir."/SPECIMEN.pdf"; } else { @@ -293,7 +292,7 @@ class pdf_ban extends ModeleBankAccountDoc * Show top header of page. * * @param TCPDF $pdf Object PDF - * @param Project $object Object to show + * @param Account $object Object to show * @param int $showaddress 0=no, 1=yes * @param Translate $outputlangs Object lang for output * @return void @@ -378,7 +377,7 @@ class pdf_ban extends ModeleBankAccountDoc * Show footer of page. Need this->emetteur object * * @param TCPDF $pdf PDF - * @param Project $object Object to show + * @param Account $object Object to show * @param Translate $outputlangs Object lang for output * @param int $hidefreetext 1=Hide free text * @return integer diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php index 3c9a1b60b52..a07592d339a 100644 --- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php @@ -90,16 +90,16 @@ class pdf_sepamandate extends ModeleBankAccountDoc // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Fonction generant le projet sur le disque + * Function to create pdf of company bank account sepa mandate * - * @param Project $object Object project a generer - * @param Translate $outputlangs Lang output object - * @param string $srctemplatepath Full path of source filename for generator using a template file - * @param int $hidedetails Do not show line details (not used for this template) - * @param int $hidedesc Do not show desc (not used for this template) - * @param int $hideref Do not show ref (not used for this template) - * @param null|array $moreparams More parameters - * @return int 1 if OK, <=0 if KO + * @param CompanyBankAccount $object Object bank account to generate document for + * @param Translate $outputlangs Lang output object + * @param string $srctemplatepath Full path of source filename for generator using a template file + * @param int $hidedetails Do not show line details (not used for this template) + * @param int $hidedesc Do not show desc (not used for this template) + * @param int $hideref Do not show ref (not used for this template) + * @param null|array $moreparams More parameters + * @return int 1 if OK, <=0 if KO */ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { @@ -447,10 +447,10 @@ class pdf_sepamandate extends ModeleBankAccountDoc /** * Show miscellaneous information (payment mode, payment term, ...) * - * @param TCPDF $pdf Object PDF - * @param Object $object Object to show - * @param int $posy Y - * @param Translate $outputlangs Langs object + * @param TCPDF $pdf Object PDF + * @param CompanyBankAccount $object Object to show + * @param int $posy Y + * @param Translate $outputlangs Langs object * @return void */ protected function _tableau_info(&$pdf, $object, $posy, $outputlangs) @@ -485,11 +485,11 @@ class pdf_sepamandate extends ModeleBankAccountDoc /** * Show area for the customer to sign * - * @param TCPDF $pdf Object PDF - * @param Facture $object Object invoice - * @param int $posy Position depart - * @param Translate $outputlangs Objet langs - * @return int Position pour suite + * @param TCPDF $pdf Object PDF + * @param CompanyBankAccount $object Object invoice + * @param int $posy Position depart + * @param Translate $outputlangs Objet langs + * @return int Position pour suite */ protected function _signature_area(&$pdf, $object, $posy, $outputlangs) { @@ -527,10 +527,10 @@ class pdf_sepamandate extends ModeleBankAccountDoc /** * Show top header of page. * - * @param TCPDF $pdf Object PDF - * @param Project $object Object to show - * @param int $showaddress 0=no, 1=yes - * @param Translate $outputlangs Object lang for output + * @param TCPDF $pdf Object PDF + * @param CompanyBankAccount $object Object to show + * @param int $showaddress 0=no, 1=yes + * @param Translate $outputlangs Object lang for output * @return void */ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs) @@ -615,13 +615,13 @@ class pdf_sepamandate extends ModeleBankAccountDoc // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** - * Show footer of page. Need this->emetteur object + * Show footer of page. Need this->emetteur object * - * @param TCPDF $pdf PDF - * @param Project $object Object to show - * @param Translate $outputlangs Object lang for output - * @param int $hidefreetext 1=Hide free text - * @return integer + * @param TCPDF $pdf PDF + * @param CompanyBankAccount $object Object to show + * @param Translate $outputlangs Object lang for output + * @param int $hidefreetext 1=Hide free text + * @return integer */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 8aa01f3ba5c..9a618053ff2 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -7,7 +7,7 @@ * Copyright (C) 2012 Cedric Salvador * Copyright (C) 2015 Marcos García * Copyright (C) 2017-2018 Ferran Marcet - * Copyright (C) 2018-2019 Frédéric France + * Copyright (C) 2018-2020 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -204,7 +204,7 @@ class pdf_einstein extends ModelePDFCommandes /** * Function to build pdf onto disk * - * @param Object $object Object to generate + * @param Commande $object Object to generate * @param Translate $outputlangs Lang output object * @param string $srctemplatepath Full path of source filename for generator using a template file * @param int $hidedetails Do not show line details @@ -655,7 +655,7 @@ class pdf_einstein extends ModelePDFCommandes * Show payments table * * @param TCPDF $pdf Object PDF - * @param Object $object Object order + * @param Commande $object Object order * @param int $posy Position y in PDF * @param Translate $outputlangs Object langs for output * @return int <0 if KO, >0 if OK @@ -671,7 +671,7 @@ class pdf_einstein extends ModelePDFCommandes * Show miscellaneous information (payment mode, payment term, ...) * * @param TCPDF $pdf Object PDF - * @param Object $object Object to show + * @param Commande $object Object to show * @param int $posy Y * @param Translate $outputlangs Langs object * @return int @@ -754,8 +754,8 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell(80, 4, $dlp, 0, 'L'); $posy = $pdf->GetY() + 1; - } elseif ($object->availability_code || $object->availability) // Show availability conditions - { + } elseif ($object->availability_code || $object->availability) { + // Show availability conditions $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $titre = $outputlangs->transnoentities("AvailabilityPeriod").':'; @@ -859,7 +859,7 @@ class pdf_einstein extends ModelePDFCommandes * Show total to pay * * @param TCPDF $pdf Object PDF - * @param Facture $object Object invoice + * @param Commande $object Object invoice * @param int $deja_regle Montant deja regle * @param int $posy Position depart * @param Translate $outputlangs Objet langs @@ -1242,7 +1242,7 @@ class pdf_einstein extends ModelePDFCommandes * Show top header of page. * * @param TCPDF $pdf Object PDF - * @param Object $object Object to show + * @param Commande $object Object to show * @param int $showaddress 0=no, 1=yes * @param Translate $outputlangs Object lang for output * @param Translate $outputlangsbis Object lang for output bis @@ -1495,7 +1495,7 @@ class pdf_einstein extends ModelePDFCommandes * Show footer of page. Need this->emetteur object * * @param TCPDF $pdf PDF - * @param Object $object Object to show + * @param Commande $object Object to show * @param Translate $outputlangs Object lang for output * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index e959ce37508..28c255e973b 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -7,7 +7,7 @@ * Copyright (C) 2012 Cedric Salvador * Copyright (C) 2015 Marcos García * Copyright (C) 2017 Ferran Marcet - * Copyright (C) 2018-2019 Frédéric France + * Copyright (C) 2018-2020 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -188,7 +188,7 @@ class pdf_eratosthene extends ModelePDFCommandes /** * Function to build pdf onto disk * - * @param Object $object Object to generate + * @param Commande $object Object to generate * @param Translate $outputlangs Lang output object * @param string $srctemplatepath Full path of source filename for generator using a template file * @param int $hidedetails Do not show line details @@ -876,7 +876,7 @@ class pdf_eratosthene extends ModelePDFCommandes * Show payments table * * @param TCPDF $pdf Object PDF - * @param Object $object Object order + * @param Commande $object Object order * @param int $posy Position y in PDF * @param Translate $outputlangs Object langs for output * @return int <0 if KO, >0 if OK @@ -889,7 +889,7 @@ class pdf_eratosthene extends ModelePDFCommandes * Show miscellaneous information (payment mode, payment term, ...) * * @param TCPDF $pdf Object PDF - * @param Object $object Object to show + * @param Commande $object Object to show * @param int $posy Y * @param Translate $outputlangs Langs object * @return int Pos y @@ -1074,8 +1074,8 @@ class pdf_eratosthene extends ModelePDFCommandes /** * Show total to pay * - * @param TCPDF $pdf Object PDF - * @param Facture $object Object invoice + * @param TCPDF $pdf Object PDF + * @param Commande $object Object to show * @param int $deja_regle Montant deja regle * @param int $posy Position depart * @param Translate $outputlangs Objet langs @@ -1404,7 +1404,7 @@ class pdf_eratosthene extends ModelePDFCommandes * Show top header of page. * * @param TCPDF $pdf Object PDF - * @param Object $object Object to show + * @param Commande $object Object to show * @param int $showaddress 0=no, 1=yes * @param Translate $outputlangs Object lang for output * @param Translate $outputlangsbis Object lang for output bis @@ -1658,7 +1658,7 @@ class pdf_eratosthene extends ModelePDFCommandes * Show footer of page. Need this->emetteur object * * @param TCPDF $pdf PDF - * @param Object $object Object to show + * @param Commande $object Object to show * @param Translate $outputlangs Object lang for output * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text @@ -1676,7 +1676,7 @@ class pdf_eratosthene extends ModelePDFCommandes /** * Define Array Column Field * - * @param object $object common object + * @param Commande $object common object * @param Translate $outputlangs langs * @param int $hidedetails Do not show line details * @param int $hidedesc Do not show desc diff --git a/htdocs/core/modules/commande/doc/pdf_proforma.modules.php b/htdocs/core/modules/commande/doc/pdf_proforma.modules.php index d1df957b453..fa555db2ced 100644 --- a/htdocs/core/modules/commande/doc/pdf_proforma.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_proforma.modules.php @@ -63,7 +63,7 @@ class pdf_proforma extends pdf_eratosthene * Show top header of page. * * @param TCPDF $pdf Object PDF - * @param Object $object Object to show + * @param Commande $object Object to show * @param int $showaddress 0=no, 1=yes * @param Translate $outputlangs Object lang for output * @param string $titlekey Translation key to show as title of document diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index 92542fd9f3e..08fefaf5634 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -6,7 +6,7 @@ * Copyright (C) 2011 Fabrice CHERRIER * Copyright (C) 2013-2020 Philippe Grand * Copyright (C) 2015 Marcos García - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2020 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -164,8 +164,8 @@ class pdf_strato extends ModelePDFContract /** * Function to build pdf onto disk * - * @param CommonObject $object Id of object to generate - * @param object $outputlangs Lang output object + * @param Contrat $object Object to generate + * @param Translate $outputlangs Lang output object * @param string $srctemplatepath Full path of source filename for generator using a template file * @param int $hidedetails Do not show line details * @param int $hidedesc Do not show desc @@ -580,7 +580,7 @@ class pdf_strato extends ModelePDFContract * Show top header of page. * * @param TCPDF $pdf Object PDF - * @param CommonObject $object Object to show + * @param Contrat $object Object to show * @param int $showaddress 0=no, 1=yes * @param Translate $outputlangs Object lang for output * @return void @@ -756,7 +756,7 @@ class pdf_strato extends ModelePDFContract * Show footer of page. Need this->emetteur object * * @param PDF $pdf PDF - * @param CommonObject $object Object to show + * @param Contrat $object Object to show * @param Translate $outputlangs Object lang for output * @param int $hidefreetext 1=Hide free text * @return integer diff --git a/htdocs/core/modules/delivery/doc/pdf_storm.modules.php b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php index 5540f0caa9d..e6da731fb21 100644 --- a/htdocs/core/modules/delivery/doc/pdf_storm.modules.php +++ b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php @@ -652,7 +652,7 @@ class pdf_storm extends ModelePDFDeliveryOrder * Show miscellaneous information (payment mode, payment term, ...) * * @param TCPDF $pdf Object PDF - * @param Object $object Object to show + * @param Delivery $object Object to show * @param int $posy Y * @param Translate $outputlangs Langs object * @return void @@ -730,7 +730,7 @@ class pdf_storm extends ModelePDFDeliveryOrder * Show top header of page. * * @param TCPDF $pdf Object PDF - * @param Object $object Object to show + * @param Delivery $object Object to show * @param int $showaddress 0=no, 1=yes * @param Translate $outputlangs Object lang for output * @return void @@ -906,8 +906,8 @@ class pdf_storm extends ModelePDFDeliveryOrder /** * Show footer of page. Need this->emetteur object * - * @param TCPDF $pdf PDF - * @param Object $object Object to show + * @param TCPDF $pdf PDF + * @param Delivery $object Object to show * @param Translate $outputlangs Object lang for output * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text @@ -924,7 +924,7 @@ class pdf_storm extends ModelePDFDeliveryOrder /** * Define Array Column Field * - * @param object $object common object + * @param Delivery $object common object * @param Translate $outputlangs langs * @param int $hidedetails Do not show line details * @param int $hidedesc Do not show desc diff --git a/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php b/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php index 24587bb4da7..8b7c899af91 100644 --- a/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php +++ b/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php @@ -175,7 +175,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder /** * Function to build pdf onto disk * - * @param Object $object Object to generate + * @param Delivery $object Object to generate * @param Translate $outputlangs Lang output object * @param string $srctemplatepath Full path of source filename for generator using a template file * @param int $hidedetails Do not show line details @@ -628,7 +628,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder * Show miscellaneous information (payment mode, payment term, ...) * * @param TCPDF $pdf Object PDF - * @param Object $object Object to show + * @param Delivery $object Object to show * @param int $posy Y * @param Translate $outputlangs Langs object * @return void @@ -723,7 +723,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder * Show top header of page. * * @param TCPDF $pdf Object PDF - * @param Object $object Object to show + * @param Delivery $object Object to show * @param int $showaddress 0=no, 1=yes * @param Translate $outputlangs Object lang for output * @return void @@ -897,7 +897,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder * Show footer of page. Need this->emetteur object * * @param TCPDF $pdf PDF - * @param Object $object Object to show + * @param Delivery $object Object to show * @param Translate $outputlangs Object lang for output * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php index 683aed88f3e..7e88a739a73 100644 --- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php @@ -3,7 +3,7 @@ * Copyright (C) 2005-2012 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2014-2015 Marcos García - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2020 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -146,7 +146,7 @@ class pdf_espadon extends ModelePdfExpedition /** * Function to build pdf onto disk * - * @param Object $object Object expedition to generate (or id if old method) + * @param Expedition $object Object expedition to generate (or id if old method) * @param Translate $outputlangs Lang output object * @param string $srctemplatepath Full path of source filename for generator using a template file * @param int $hidedetails Do not show line details @@ -672,7 +672,7 @@ class pdf_espadon extends ModelePdfExpedition * Show total to pay * * @param TCPDF $pdf Object PDF - * @param Facture $object Object invoice + * @param Expedition $object Object expedition * @param int $deja_regle Amount already paid * @param int $posy Start Position * @param Translate $outputlangs Objet langs @@ -823,7 +823,7 @@ class pdf_espadon extends ModelePdfExpedition * Show top header of page. * * @param TCPDF $pdf Object PDF - * @param Object $object Object to show + * @param Expedition $object Object to show * @param int $showaddress 0=no, 1=yes * @param Translate $outputlangs Object lang for output * @return void @@ -1066,7 +1066,7 @@ class pdf_espadon extends ModelePdfExpedition * Show footer of page. Need this->emetteur object * * @param TCPDF $pdf PDF - * @param Object $object Object to show + * @param Expedition $object Object to show * @param Translate $outputlangs Object lang for output * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text @@ -1081,7 +1081,7 @@ class pdf_espadon extends ModelePdfExpedition /** * Define Array Column Field * - * @param object $object common object + * @param Expedition $object common object * @param Translate $outputlangs langs * @param int $hidedetails Do not show line details * @param int $hidedesc Do not show desc diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php index e02463c51f3..56b4147f7e9 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -146,7 +146,7 @@ class pdf_merou extends ModelePdfExpedition /** * Function to build pdf onto disk * - * @param Object $object Object expedition to generate (or id if old method) + * @param Expedition $object Object expedition to generate (or id if old method) * @param Translate $outputlangs Lang output object * @param string $srctemplatepath Full path of source filename for generator using a template file * @param int $hidedetails Do not show line details @@ -481,7 +481,7 @@ class pdf_merou extends ModelePdfExpedition * Show footer of page. Need this->emetteur object * * @param TCPDF $pdf PDF - * @param Object $object Object to show + * @param Expedition $object Object to show * @param Translate $outputlangs Object lang for output * @param int $hidefreetext 1=Hide free text * @return void @@ -510,7 +510,7 @@ class pdf_merou extends ModelePdfExpedition * Show top header of page. * * @param TCPDF $pdf Object PDF - * @param Object $object Object to show + * @param Expedition $object Object to show * @param int $showaddress 0=no, 1=yes * @param Translate $outputlangs Object lang for output * @return void diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index 4a1a46187c3..86785540265 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -3,7 +3,7 @@ * Copyright (C) 2005-2012 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2014-2015 Marcos García - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2020 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -178,7 +178,7 @@ class pdf_rouget extends ModelePdfExpedition /** * Function to build pdf onto disk * - * @param Object $object Object expedition to generate (or id if old method) + * @param Expedition $object Object expedition to generate (or id if old method) * @param Translate $outputlangs Lang output object * @param string $srctemplatepath Full path of source filename for generator using a template file * @param int $hidedetails Do not show line details @@ -662,8 +662,8 @@ class pdf_rouget extends ModelePdfExpedition /** * Show total to pay * - * @param TCPDF $pdf Object PDF - * @param Facture $object Object invoice + * @param TCPDF $pdf Object PDF + * @param Expedition $object Object invoice * @param int $deja_regle Montant deja regle * @param int $posy Position depart * @param Translate $outputlangs Objet langs @@ -858,7 +858,7 @@ class pdf_rouget extends ModelePdfExpedition * Show top header of page. * * @param TCPDF $pdf Object PDF - * @param Object $object Object to show + * @param Expedition $object Object to show * @param int $showaddress 0=no, 1=yes * @param Translate $outputlangs Object lang for output * @return void @@ -1101,7 +1101,7 @@ class pdf_rouget extends ModelePdfExpedition * Show footer of page. Need this->emetteur object * * @param TCPDF $pdf PDF - * @param Object $object Object to show + * @param Expedition $object Object to show * @param Translate $outputlangs Object lang for output * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index 38f43a50910..176b09264d4 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -2,7 +2,7 @@ /* Copyright (C) 2015 Laurent Destailleur * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2016-2019 Philippe Grand - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2020 Frédéric France * Copyright (C) 2018 Francis Appels * Copyright (C) 2019 Markus Welters * Copyright (C) 2019 Rafael Ingenleuf @@ -199,13 +199,13 @@ class pdf_standard extends ModeleExpenseReport /** * Function to build pdf onto disk * - * @param Object $object Object to generate - * @param Translate $outputlangs Lang output object - * @param string $srctemplatepath Full path of source filename for generator using a template file - * @param int $hidedetails Do not show line details - * @param int $hidedesc Do not show desc - * @param int $hideref Do not show ref - * @return int 1=OK, 0=KO + * @param ExpenseReport $object Object to generate + * @param Translate $outputlangs Lang output object + * @param string $srctemplatepath Full path of source filename for generator using a template file + * @param int $hidedetails Do not show line details + * @param int $hidedesc Do not show desc + * @param int $hideref Do not show ref + * @return int 1=OK, 0=KO */ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { @@ -558,13 +558,13 @@ class pdf_standard extends ModeleExpenseReport } /** - * @param TCPDF $pdf Object PDF - * @param Object $object Object to show - * @param int $linenumber line number - * @param int $curY current y position - * @param int $default_font_size default siez of font - * @param Translate $outputlangs Object lang for output - * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) + * @param TCPDF $pdf Object PDF + * @param ExpenseReport $object Object to show + * @param int $linenumber line number + * @param int $curY current y position + * @param int $default_font_size default siez of font + * @param Translate $outputlangs Object lang for output + * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return void */ protected function printLine(&$pdf, $object, $linenumber, $curY, $default_font_size, $outputlangs, $hidedetails = 0) @@ -644,10 +644,10 @@ class pdf_standard extends ModeleExpenseReport /** * Show top header of page. * - * @param TCPDF $pdf Object PDF - * @param Object $object Object to show - * @param int $showaddress 0=no, 1=yes - * @param Translate $outputlangs Object lang for output + * @param TCPDF $pdf Object PDF + * @param ExpenseReport $object Object to show + * @param int $showaddress 0=no, 1=yes + * @param Translate $outputlangs Object lang for output * @return void */ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs) @@ -981,11 +981,11 @@ class pdf_standard extends ModeleExpenseReport /** * Show payments table * - * @param TCPDF $pdf Object PDF - * @param Object $object Object invoice - * @param int $posy Position y in PDF - * @param Translate $outputlangs Object langs for output - * @return int <0 if KO, >0 if OK + * @param TCPDF $pdf Object PDF + * @param ExpenseReport $object Object expensereport + * @param int $posy Position y in PDF + * @param Translate $outputlangs Object langs for output + * @return int <0 if KO, >0 if OK */ protected function tablePayments(&$pdf, $object, $posy, $outputlangs) { @@ -1093,11 +1093,11 @@ class pdf_standard extends ModeleExpenseReport /** * Show footer of page. Need this->emetteur object * - * @param TCPDF $pdf PDF - * @param Object $object Object to show - * @param Translate $outputlangs Object lang for output - * @param int $hidefreetext 1=Hide free text - * @return int Return height of bottom margin including footer text + * @param TCPDF $pdf PDF + * @param ExpenseReport $object Object to show + * @param Translate $outputlangs Object lang for output + * @param int $hidefreetext 1=Hide free text + * @return int Return height of bottom margin including footer text */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 9a7b8557e15..63d12a7516a 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -220,7 +220,7 @@ class pdf_crabe extends ModelePDFFactures /** * Function to build pdf onto disk * - * @param Object $object Object to generate + * @param Facture $object Object to generate * @param Translate $outputlangs Lang output object * @param string $srctemplatepath Full path of source filename for generator using a template file * @param int $hidedetails Do not show line details @@ -782,7 +782,7 @@ class pdf_crabe extends ModelePDFFactures * Show payments table * * @param TCPDF $pdf Object PDF - * @param Object $object Object invoice + * @param Facture $object Object invoice * @param int $posy Position y in PDF * @param Translate $outputlangs Object langs for output * @param int $heightforfooter height for footer @@ -967,7 +967,7 @@ class pdf_crabe extends ModelePDFFactures * Show miscellaneous information (payment mode, payment term, ...) * * @param TCPDF $pdf Object PDF - * @param Object $object Object to show + * @param Facture $object Object to show * @param int $posy Y * @param Translate $outputlangs Langs object * @return void @@ -1588,7 +1588,7 @@ class pdf_crabe extends ModelePDFFactures * Show top header of page. * * @param TCPDF $pdf Object PDF - * @param Object $object Object to show + * @param Facture $object Object to show * @param int $showaddress 0=no, 1=yes * @param Translate $outputlangs Object lang for output * @return void @@ -1891,7 +1891,7 @@ class pdf_crabe extends ModelePDFFactures * Show footer of page. Need this->emetteur object * * @param TCPDF $pdf PDF - * @param Object $object Object to show + * @param Facture $object Object to show * @param Translate $outputlangs Object lang for output * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index bc81696031d..532afbdab6e 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -197,7 +197,7 @@ class pdf_sponge extends ModelePDFFactures /** * Function to build pdf onto disk * - * @param Object $object Object to generate + * @param Facture $object Object to generate * @param Translate $outputlangs Lang output object * @param string $srctemplatepath Full path of source filename for generator using a template file * @param int $hidedetails Do not show line details @@ -926,7 +926,7 @@ class pdf_sponge extends ModelePDFFactures * Show payments table * * @param TCPDF $pdf Object PDF - * @param Object $object Object invoice + * @param Facture $object Object invoice * @param int $posy Position y in PDF * @param Translate $outputlangs Object langs for output * @return int <0 if KO, >0 if OK @@ -1064,7 +1064,7 @@ class pdf_sponge extends ModelePDFFactures * Show miscellaneous information (payment mode, payment term, ...) * * @param TCPDF $pdf Object PDF - * @param Object $object Object to show + * @param Facture $object Object to show * @param int $posy Y * @param Translate $outputlangs Langs object * @return int Pos y @@ -1829,7 +1829,7 @@ class pdf_sponge extends ModelePDFFactures * Show top header of page. * * @param TCPDF $pdf Object PDF - * @param Object $object Object to show + * @param Facture $object Object to show * @param int $showaddress 0=no, 1=yes * @param Translate $outputlangs Object lang for output * @param Translate $outputlangsbis Object lang for output bis @@ -2150,7 +2150,7 @@ class pdf_sponge extends ModelePDFFactures * Show footer of page. Need this->emetteur object * * @param TCPDF $pdf PDF - * @param Object $object Object to show + * @param Facture $object Object to show * @param Translate $outputlangs Object lang for output * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text @@ -2165,7 +2165,7 @@ class pdf_sponge extends ModelePDFFactures /** * Define Array Column Field * - * @param object $object common object + * @param Facture $object common object * @param Translate $outputlangs langs * @param int $hidedetails Do not show line details * @param int $hidedesc Do not show desc diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index 951e953da25..c79b2ac4137 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -156,7 +156,7 @@ class pdf_soleil extends ModelePDFFicheinter /** * Function to build pdf onto disk * - * @param Object $object Object to generate + * @param Fichinter $object Object to generate * @param Translate $outputlangs Lang output object * @param string $srctemplatepath Full path of source filename for generator using a template file * @param int $hidedetails Do not show line details @@ -537,7 +537,7 @@ class pdf_soleil extends ModelePDFFicheinter * Show top header of page. * * @param TCPDF $pdf Object PDF - * @param Object $object Object to show + * @param Fichinter $object Object to show * @param int $showaddress 0=no, 1=yes * @param Translate $outputlangs Object lang for output * @return void @@ -710,7 +710,7 @@ class pdf_soleil extends ModelePDFFicheinter * Show footer of page. Need this->emetteur object * * @param TCPDF $pdf PDF - * @param Object $object Object to show + * @param Fichinter $object Object to show * @param Translate $outputlangs Object lang for output * @param int $hidefreetext 1=Hide free text * @return integer diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index b38de420b97..a4032c6a13a 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -690,7 +690,7 @@ class pdf_standard extends ModelePDFProduct * Show top header of page. * * @param TCPDF $pdf Object PDF - * @param Object $object Object to show + * @param Product $object Object to show * @param int $showaddress 0=no, 1=yes * @param Translate $outputlangs Object lang for output * @param string $titlekey Translation key to show as title of document @@ -837,7 +837,7 @@ class pdf_standard extends ModelePDFProduct * Show footer of page. Need this->emetteur object * * @param TCPDF $pdf PDF - * @param Object $object Object to show + * @param Product $object Object to show * @param Translate $outputlangs Object lang for output * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index f98f071030a..aff0e7c4457 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -204,7 +204,7 @@ class pdf_azur extends ModelePDFPropales /** * Function to build pdf onto disk * - * @param Object $object Object to generate + * @param Propal $object Object to generate * @param Translate $outputlangs Lang output object * @param string $srctemplatepath Full path of source filename for generator using a template file * @param int $hidedetails Do not show line details @@ -827,8 +827,8 @@ class pdf_azur extends ModelePDFPropales /** * Show payments table * - * @param TCPDF $pdf Object PDF - * @param Object $object Object proposal + * @param TCPDF $pdf Object PDF + * @param Propal $object Object proposal * @param int $posy Position y in PDF * @param Translate $outputlangs Object langs for output * @return int <0 if KO, >0 if OK @@ -844,7 +844,7 @@ class pdf_azur extends ModelePDFPropales * Show miscellaneous information (payment mode, payment term, ...) * * @param TCPDF $pdf Object PDF - * @param Object $object Object to show + * @param Propal $object Object to show * @param int $posy Y * @param Translate $outputlangs Langs object * @return void @@ -1415,7 +1415,7 @@ class pdf_azur extends ModelePDFPropales * Show top header of page. * * @param TCPDF $pdf Object PDF - * @param Object $object Object to show + * @param Propal $object Object to show * @param int $showaddress 0=no, 1=yes * @param Translate $outputlangs Object lang for output * @return void @@ -1666,7 +1666,7 @@ class pdf_azur extends ModelePDFPropales * Show footer of page. Need this->emetteur object * * @param TCPDF $pdf PDF - * @param Object $object Object to show + * @param Propal $object Object to show * @param Translate $outputlangs Object lang for output * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text @@ -1684,7 +1684,7 @@ class pdf_azur extends ModelePDFPropales * Show area for the customer to sign * * @param TCPDF $pdf Object PDF - * @param Facture $object Object invoice + * @param Propal $object Object invoice * @param int $posy Position depart * @param Translate $outputlangs Objet langs * @return int Position pour suite diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index 32d74c9b71b..9be74e97fb9 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -187,7 +187,7 @@ class pdf_cyan extends ModelePDFPropales /** * Function to build pdf onto disk * - * @param Object $object Object to generate + * @param Propal $object Object to generate * @param Translate $outputlangs Lang output object * @param string $srctemplatepath Full path of source filename for generator using a template file * @param int $hidedetails Do not show line details @@ -967,8 +967,8 @@ class pdf_cyan extends ModelePDFPropales /** * Show payments table * - * @param TCPDF $pdf Object PDF - * @param Object $object Object proposal + * @param TCPDF $pdf Object PDF + * @param Propal $object Object proposal * @param int $posy Position y in PDF * @param Translate $outputlangs Object langs for output * @return int <0 if KO, >0 if OK @@ -981,7 +981,7 @@ class pdf_cyan extends ModelePDFPropales * Show miscellaneous information (payment mode, payment term, ...) * * @param TCPDF $pdf Object PDF - * @param Object $object Object to show + * @param Propal $object Object to show * @param int $posy Y * @param Translate $outputlangs Langs object * @return int Pos y @@ -1158,8 +1158,8 @@ class pdf_cyan extends ModelePDFPropales /** * Show total to pay * - * @param TCPDF $pdf Object PDF - * @param Facture $object Object invoice + * @param TCPDF $pdf Object PDF + * @param Propal $object Object proposal * @param int $deja_regle Montant deja regle * @param int $posy Position depart * @param Translate $outputlangs Objet langs @@ -1507,7 +1507,7 @@ class pdf_cyan extends ModelePDFPropales * Show top header of page. * * @param TCPDF $pdf Object PDF - * @param Object $object Object to show + * @param Propal $object Object to show * @param int $showaddress 0=no, 1=yes * @param Translate $outputlangs Object lang for output * @param Translate $outputlangsbis Object lang for output bis @@ -1553,8 +1553,7 @@ class pdf_cyan extends ModelePDFPropales } else { $logo = $logodir.'/logos/'.$this->emetteur->logo; } - if (is_readable($logo)) - { + if (is_readable($logo)) { $height = pdf_getHeightForLogo($logo); $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -1762,7 +1761,7 @@ class pdf_cyan extends ModelePDFPropales * Show footer of page. Need this->emetteur object * * @param TCPDF $pdf PDF - * @param Object $object Object to show + * @param Propal $object Object to show * @param Translate $outputlangs Object lang for output * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text @@ -1777,8 +1776,8 @@ class pdf_cyan extends ModelePDFPropales /** * Show area for the customer to sign * - * @param TCPDF $pdf Object PDF - * @param Facture $object Object invoice + * @param TCPDF $pdf Object PDF + * @param Propal $object Object proposal * @param int $posy Position depart * @param Translate $outputlangs Objet langs * @return int Position pour suite @@ -1813,7 +1812,7 @@ class pdf_cyan extends ModelePDFPropales /** * Define Array Column Field * - * @param object $object common object + * @param Propal $object object proposal * @param Translate $outputlangs langs * @param int $hidedetails Do not show line details * @param int $hidedesc Do not show desc diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index bc97a26d7ff..abc59080912 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -1060,13 +1060,13 @@ class Expedition extends CommonObject // Clean parameters if (isset($this->ref)) $this->ref = trim($this->ref); - if (isset($this->entity)) $this->entity = trim($this->entity); + if (isset($this->entity)) $this->entity = (int) $this->entity; if (isset($this->ref_customer)) $this->ref_customer = trim($this->ref_customer); - if (isset($this->socid)) $this->socid = trim($this->socid); - if (isset($this->fk_user_author)) $this->fk_user_author = trim($this->fk_user_author); - if (isset($this->fk_user_valid)) $this->fk_user_valid = trim($this->fk_user_valid); - if (isset($this->fk_delivery_address)) $this->fk_delivery_address = trim($this->fk_delivery_address); - if (isset($this->shipping_method_id)) $this->shipping_method_id = trim($this->shipping_method_id); + if (isset($this->socid)) $this->socid = (int) $this->socid; + if (isset($this->fk_user_author)) $this->fk_user_author = (int) $this->fk_user_author; + if (isset($this->fk_user_valid)) $this->fk_user_valid = (int) $this->fk_user_valid; + if (isset($this->fk_delivery_address)) $this->fk_delivery_address = (int) $this->fk_delivery_address; + if (isset($this->shipping_method_id)) $this->shipping_method_id = (int) $this->shipping_method_id; if (isset($this->tracking_number)) $this->tracking_number = trim($this->tracking_number); if (isset($this->statut)) $this->statut = (int) $this->statut; if (isset($this->trueDepth)) $this->trueDepth = trim($this->trueDepth); @@ -1122,15 +1122,11 @@ class Expedition extends CommonObject $resql = $this->db->query($sql); if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } - if (!$error) - { - if (!$notrigger) - { - // Call trigger - $result = $this->call_trigger('SHIPPING_MODIFY', $user); - if ($result < 0) { $error++; } - // End call triggers - } + if (!$error && !$notrigger) { + // Call trigger + $result = $this->call_trigger('SHIPPING_MODIFY', $user); + if ($result < 0) { $error++; } + // End call triggers } // Commit or rollback @@ -1171,21 +1167,16 @@ class Expedition extends CommonObject // Add a protection to refuse deleting if shipment has at least one delivery $this->fetchObjectLinked($this->id, 'shipping', 0, 'delivery'); // Get deliveries linked to this shipment - if (count($this->linkedObjectsIds) > 0) - { + if (count($this->linkedObjectsIds) > 0) { $this->error = 'ErrorThereIsSomeDeliveries'; $error++; } - if (!$error) - { - if (!$notrigger) - { - // Call trigger - $result = $this->call_trigger('SHIPPING_CANCEL', $user); - if ($result < 0) { $error++; } - // End call triggers - } + if (!$error && !$notrigger) { + // Call trigger + $result = $this->call_trigger('SHIPPING_CANCEL', $user); + if ($result < 0) { $error++; } + // End call triggers } // Stock control @@ -1383,15 +1374,11 @@ class Expedition extends CommonObject $error++; } - if (!$error) - { - if (!$notrigger) - { - // Call trigger - $result = $this->call_trigger('SHIPPING_DELETE', $user); - if ($result < 0) { $error++; } - // End call triggers - } + if (!$error && !$notrigger) { + // Call trigger + $result = $this->call_trigger('SHIPPING_DELETE', $user); + if ($result < 0) { $error++; } + // End call triggers } // Stock control diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 9e715bd08d2..ac3fb07e796 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1420,6 +1420,7 @@ AdherentMailRequired=Email required to create a new member MemberSendInformationByMailByDefault=Checkbox to send mail confirmation to members (validation or new subscription) is on by default VisitorCanChooseItsPaymentMode=Visitor can choose from available payment modes MEMBER_REMINDER_EMAIL=Enable automatic reminder by email of expired subscriptions. Note: Module %s must be enabled and correctly setup to send reminders. +MembersDocModules=Document templates for documents generated from member record ##### LDAP setup ##### LDAPSetup=LDAP Setup LDAPGlobalParameters=Global parameters @@ -2079,4 +2080,4 @@ DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. -ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. \ No newline at end of file +ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php index 393914f95ba..15c52a52539 100644 --- a/htdocs/opensurvey/card.php +++ b/htdocs/opensurvey/card.php @@ -117,7 +117,7 @@ if (empty($reshook)) $object->date_fin = $expiredate; $object->allow_comments = GETPOST('cancomment', 'aZ09') == 'on' ? 1 : 0; $object->allow_spy = GETPOST('canseeothersvote', 'aZ09') == 'on' ? 1 : 0; - $object->mailsonde = GETPOST('mailsonde', 'aZ09') == 'on' ? true : false; + $object->mailsonde = GETPOST('mailsonde', 'aZ09') == 'on' ? 1 : 0; $res = $object->update($user); if ($res < 0) { @@ -132,21 +132,18 @@ if (empty($reshook)) { $error = 0; - if (!GETPOST('comment')) - { + if (!GETPOST('comment')) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Comment")), null, 'errors'); } - if (!GETPOST('commentuser')) - { + if (!GETPOST('commentuser')) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("User")), null, 'errors'); } - if (!$error) - { - $comment = GETPOST("comment"); - $comment_user = GETPOST('commentuser'); + if (!$error) { + $comment = (string) GETPOST("comment", "restricthtml"); + $comment_user = (string) GETPOST('commentuser', "restricthtml"); $resql = $object->addComment($comment, $comment_user); diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 595270b78ad..83d10d64e07 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -66,7 +66,7 @@ class Opensurveysondage extends CommonObject public $mail_admin; /** - * @var admin name + * @var string admin name */ public $nom_admin; @@ -514,15 +514,15 @@ class Opensurveysondage extends CommonObject { $this->id = 0; - $this->id_sondage = ''; + $this->id_sondage = 'a12d5g'; $this->description = 'Description of the specimen survey'; - $this->mail_admin = ''; - $this->nom_admin = ''; + $this->mail_admin = 'email@email.com'; + $this->nom_admin = 'surveyadmin'; $this->title = 'This is a specimen survey'; $this->date_fin = dol_now() + 3600 * 24 * 10; $this->status = 1; $this->format = 'classic'; - $this->mailsonde = ''; + $this->mailsonde = 0; } /**