doc comment

This commit is contained in:
Frédéric FRANCE
2019-02-24 10:08:42 +01:00
parent 390766babf
commit e7706192b5
30 changed files with 137 additions and 138 deletions

View File

@@ -36,14 +36,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
class pdf_ban extends ModeleBankAccountDoc
{
/**
* Issuer
* @var Societe
* @var Societe Issuer
*/
public $emetteur;
/**
* Dolibarr version of the loaded document
* @public string
* @var string Dolibarr version of the loaded document
*/
public $version = 'development';

View File

@@ -53,8 +53,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
* @var string Dolibarr version of the loaded document
*/
public $version = 'dolibarr';

View File

@@ -45,14 +45,14 @@ class doc_generic_contract_odt extends ModelePDFContract
public $emetteur;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
* @var string
*/
public $version = 'dolibarr';

View File

@@ -47,14 +47,14 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
public $emetteur;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
* @var string
*/
public $version = 'dolibarr';

View File

@@ -61,14 +61,14 @@ class pdf_standard extends ModeleExpenseReport
public $type;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
* @var string
*/
public $version = 'dolibarr';

View File

@@ -46,14 +46,14 @@ class doc_generic_invoice_odt extends ModelePDFFactures
public $emetteur;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
* @var string
*/
public $version = 'dolibarr';

View File

@@ -69,14 +69,14 @@ class pdf_crabe extends ModelePDFFactures
public $type;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
* @var string
*/
public $version = 'dolibarr';

View File

@@ -76,7 +76,7 @@ class pdf_sponge extends ModelePDFFactures
/**
* Dolibarr version of the loaded document
* @public string
* @var string
*/
public $version = 'development';

View File

@@ -59,14 +59,14 @@ class pdf_soleil extends ModelePDFFicheinter
public $type;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
* @var string
*/
public $version = 'dolibarr';

View File

@@ -60,14 +60,14 @@ class pdf_typhon extends ModelePDFDeliveryOrder
public $type;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
* @var string
*/
public $version = 'dolibarr';

View File

@@ -44,14 +44,14 @@ class doc_generic_product_odt extends ModelePDFProduct
public $emetteur;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
* @var string
*/
public $version = 'dolibarr';

View File

@@ -57,14 +57,14 @@ class pdf_standard extends ModelePDFProduct
public $type;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
* @var string
*/
public $version = 'dolibarr';

View File

@@ -61,14 +61,14 @@ class doc_generic_project_odt extends ModelePDFProjects
public $emetteur;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
* @var string
*/
public $version = 'dolibarr';

View File

@@ -59,14 +59,14 @@ class pdf_baleine extends ModelePDFProjects
public $type;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
* @var string
*/
public $version = 'dolibarr';

View File

@@ -39,20 +39,18 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
class doc_generic_proposal_odt extends ModelePDFPropales
{
/**
* Issuer
* @var Company object that emits
* @var Company Issuer object that emits
*/
public $emetteur;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
* @var string Dolibarr version of the loaded document
*/
public $version = 'dolibarr';

View File

@@ -67,14 +67,14 @@ class pdf_azur extends ModelePDFPropales
public $type;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
* @var string
*/
public $version = 'dolibarr';

View File

@@ -41,13 +41,16 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
*/
class pdf_cyan extends ModelePDFPropales
{
/**
* @var DoliDb Database handler
*/
public $db;
public $name;
public $description;
public $update_main_doc_field; // Save the name of generated file as the main doc when generating a doc with this template
public $type;
public $phpmin = array(4,3,0); // Minimum version of PHP required by module
public $phpmin = array(5, 4); // Minimum version of PHP required by module
public $version = 'development';
public $page_largeur;

View File

@@ -1,20 +1,21 @@
<?php
/* Copyright (C) 2018 Quentin Vial-Gouteyron <quentin.vial-gouteyron@atm-consulting.fr>
*
* 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
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* or see http://www.gnu.org/
*/
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
*
* 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
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* or see http://www.gnu.org/
*/
/**
* \file htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php
@@ -35,10 +36,21 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
*/
class doc_generic_reception_odt extends ModelePdfReception
{
var $emetteur; // Objet societe qui emet
/**
* @var Company Issuer object that emits
*/
public $emetteur; // Objet societe qui emet
var $phpmin = array(5,2,0); // Minimum version of PHP required by module
var $version = 'dolibarr';
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4); // Minimum version of PHP required by module
/**
* @var string Dolibarr version of the loaded document
*/
public $version = 'dolibarr';
/**
@@ -343,9 +355,8 @@ class doc_generic_reception_odt extends ModelePdfReception
// Make substitutions into odt of freetext
try {
$odfHandler->setVars('free_text', $newfreetext, true, 'UTF-8');
}
catch(OdfException $e)
{
} catch(OdfException $e) {
dol_syslog($e->getMessage(), LOG_INFO);
}
// Make substitutions into odt of user info
@@ -364,9 +375,8 @@ class doc_generic_reception_odt extends ModelePdfReception
{
$odfHandler->setVars($key, $value, true, 'UTF-8');
}
}
catch(OdfException $e)
{
} catch(OdfException $e) {
dol_syslog($e->getMessage(), LOG_INFO);
}
}
// Make substitutions into odt of mysoc
@@ -385,9 +395,8 @@ class doc_generic_reception_odt extends ModelePdfReception
{
$odfHandler->setVars($key, $value, true, 'UTF-8');
}
}
catch(OdfException $e)
{
} catch(OdfException $e) {
dol_syslog($e->getMessage(), LOG_INFO);
}
}
// Make substitutions into odt of thirdparty
@@ -404,9 +413,8 @@ class doc_generic_reception_odt extends ModelePdfReception
{
$odfHandler->setVars($key, $value, true, 'UTF-8');
}
}
catch(OdfException $e)
{
} catch(OdfException $e) {
dol_syslog($e->getMessage(), LOG_INFO);
}
}
// Replace tags of object + external modules
@@ -427,9 +435,8 @@ class doc_generic_reception_odt extends ModelePdfReception
{
$odfHandler->setVars($key, $value, true, 'UTF-8');
}
}
catch(OdfException $e)
{
} catch(OdfException $e) {
dol_syslog($e->getMessage(), LOG_INFO);
}
}
// Replace tags of lines
@@ -445,15 +452,12 @@ class doc_generic_reception_odt extends ModelePdfReception
$reshook=$hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
foreach($tmparray as $key => $val)
{
try
{
try {
$listlines->setVars($key, $val, true, 'UTF-8');
}
catch(OdfException $e)
{
}
catch(SegmentException $e)
{
} catch(OdfException $e) {
dol_syslog($e->getMessage(), LOG_INFO);
} catch(SegmentException $e) {
dol_syslog($e->getMessage(), LOG_INFO);
}
}
$listlines->merge();
@@ -473,9 +477,8 @@ class doc_generic_reception_odt extends ModelePdfReception
{
try {
$odfHandler->setVars($key, $value, true, 'UTF-8');
}
catch(OdfException $e)
{
} catch(OdfException $e) {
dol_syslog($e->getMessage(), LOG_INFO);
}
}
@@ -487,7 +490,7 @@ class doc_generic_reception_odt extends ModelePdfReception
if (!empty($conf->global->MAIN_ODT_AS_PDF)) {
try {
$odfHandler->exportAsAttachedPDF($file);
}catch (Exception $e){
} catch (Exception $e){
$this->error=$e->getMessage();
return -1;
}
@@ -495,7 +498,7 @@ class doc_generic_reception_odt extends ModelePdfReception
else {
try {
$odfHandler->saveToDisk($file);
}catch (Exception $e){
} catch (Exception $e){
$this->error=$e->getMessage();
return -1;
}

View File

@@ -29,7 +29,7 @@
*/
abstract class ModelePdfReception extends CommonDocGenerator
{
var $error='';
public $error='';
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps

View File

@@ -43,7 +43,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
public $emetteur;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);

View File

@@ -44,14 +44,14 @@ class doc_generic_stock_odt extends ModelePDFStock
public $emetteur;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
* @var string
*/
public $version = 'dolibarr';

View File

@@ -57,14 +57,14 @@ class pdf_standard extends ModelePDFStock
public $type;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
* @var string
*/
public $version = 'dolibarr';

View File

@@ -58,14 +58,14 @@ class pdf_stdmovement extends ModelePDFMovement
public $type;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
* @var string
*/
public $version = 'dolibarr';
@@ -105,8 +105,7 @@ class pdf_stdmovement extends ModelePDFMovement
public $marge_basse;
/**
* Issuer
* @var Societe
* @var Societe Issuer
*/
public $emetteur;

View File

@@ -58,14 +58,14 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
public $type;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
* @var string
*/
public $version = 'dolibarr';

View File

@@ -62,14 +62,14 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
public $type;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
* @var string
*/
public $version = 'dolibarr';

View File

@@ -59,14 +59,14 @@ class pdf_standard extends ModelePDFSuppliersPayments
public $type;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
* @var string
*/
public $version = 'dolibarr';

View File

@@ -45,14 +45,14 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
public $emetteur;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
* @var string
*/
public $version = 'dolibarr';

View File

@@ -59,14 +59,14 @@ class pdf_aurore extends ModelePDFSupplierProposal
public $type;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
* @var string
*/
public $version = 'dolibarr';

View File

@@ -37,20 +37,19 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
class doc_generic_user_odt extends ModelePDFUser
{
/**
* Issuer
* @var Societe
* @var Societe Issuer
*/
public $emetteur;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
* @var string
*/
public $version = 'dolibarr';

View File

@@ -45,14 +45,14 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
public $emetteur;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
* @var string
*/
public $version = 'dolibarr';