mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-12 20:41:26 +01:00
doc comment
This commit is contained in:
@@ -36,14 +36,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
|||||||
class pdf_ban extends ModeleBankAccountDoc
|
class pdf_ban extends ModeleBankAccountDoc
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Issuer
|
* @var Societe Issuer
|
||||||
* @var Societe
|
|
||||||
*/
|
*/
|
||||||
public $emetteur;
|
public $emetteur;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* @var string Dolibarr version of the loaded document
|
||||||
* @public string
|
|
||||||
*/
|
*/
|
||||||
public $version = 'development';
|
public $version = 'development';
|
||||||
|
|
||||||
|
|||||||
@@ -53,8 +53,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
|||||||
public $phpmin = array(5, 4);
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* @var string Dolibarr version of the loaded document
|
||||||
* @public string
|
|
||||||
*/
|
*/
|
||||||
public $version = 'dolibarr';
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
|||||||
@@ -45,14 +45,14 @@ class doc_generic_contract_odt extends ModelePDFContract
|
|||||||
public $emetteur;
|
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)
|
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||||
*/
|
*/
|
||||||
public $phpmin = array(5, 4);
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* Dolibarr version of the loaded document
|
||||||
* @public string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $version = 'dolibarr';
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
|||||||
@@ -47,14 +47,14 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
|||||||
public $emetteur;
|
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)
|
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||||
*/
|
*/
|
||||||
public $phpmin = array(5, 4);
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* Dolibarr version of the loaded document
|
||||||
* @public string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $version = 'dolibarr';
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
|||||||
@@ -61,14 +61,14 @@ class pdf_standard extends ModeleExpenseReport
|
|||||||
public $type;
|
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)
|
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||||
*/
|
*/
|
||||||
public $phpmin = array(5, 4);
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* Dolibarr version of the loaded document
|
||||||
* @public string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $version = 'dolibarr';
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
|||||||
@@ -46,14 +46,14 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
|||||||
public $emetteur;
|
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)
|
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||||
*/
|
*/
|
||||||
public $phpmin = array(5, 4);
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* Dolibarr version of the loaded document
|
||||||
* @public string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $version = 'dolibarr';
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
|||||||
@@ -69,14 +69,14 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
public $type;
|
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)
|
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||||
*/
|
*/
|
||||||
public $phpmin = array(5, 4);
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* Dolibarr version of the loaded document
|
||||||
* @public string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $version = 'dolibarr';
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* Dolibarr version of the loaded document
|
||||||
* @public string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $version = 'development';
|
public $version = 'development';
|
||||||
|
|
||||||
|
|||||||
@@ -59,14 +59,14 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
public $type;
|
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)
|
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||||
*/
|
*/
|
||||||
public $phpmin = array(5, 4);
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* Dolibarr version of the loaded document
|
||||||
* @public string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $version = 'dolibarr';
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
|||||||
@@ -60,14 +60,14 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
public $type;
|
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)
|
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||||
*/
|
*/
|
||||||
public $phpmin = array(5, 4);
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* Dolibarr version of the loaded document
|
||||||
* @public string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $version = 'dolibarr';
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
|||||||
@@ -44,14 +44,14 @@ class doc_generic_product_odt extends ModelePDFProduct
|
|||||||
public $emetteur;
|
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)
|
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||||
*/
|
*/
|
||||||
public $phpmin = array(5, 4);
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* Dolibarr version of the loaded document
|
||||||
* @public string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $version = 'dolibarr';
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
|||||||
@@ -57,14 +57,14 @@ class pdf_standard extends ModelePDFProduct
|
|||||||
public $type;
|
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)
|
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||||
*/
|
*/
|
||||||
public $phpmin = array(5, 4);
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* Dolibarr version of the loaded document
|
||||||
* @public string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $version = 'dolibarr';
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
|||||||
@@ -61,14 +61,14 @@ class doc_generic_project_odt extends ModelePDFProjects
|
|||||||
public $emetteur;
|
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)
|
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||||
*/
|
*/
|
||||||
public $phpmin = array(5, 4);
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* Dolibarr version of the loaded document
|
||||||
* @public string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $version = 'dolibarr';
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
|||||||
@@ -59,14 +59,14 @@ class pdf_baleine extends ModelePDFProjects
|
|||||||
public $type;
|
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)
|
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||||
*/
|
*/
|
||||||
public $phpmin = array(5, 4);
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* Dolibarr version of the loaded document
|
||||||
* @public string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $version = 'dolibarr';
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
|||||||
@@ -38,23 +38,21 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
|
|||||||
*/
|
*/
|
||||||
class doc_generic_proposal_odt extends ModelePDFPropales
|
class doc_generic_proposal_odt extends ModelePDFPropales
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Issuer
|
* @var Company Issuer object that emits
|
||||||
* @var Company object that emits
|
|
||||||
*/
|
|
||||||
public $emetteur;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @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
|
|
||||||
*/
|
*/
|
||||||
public $version = 'dolibarr';
|
public $emetteur;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array Minimum version of PHP required by module.
|
||||||
|
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||||
|
*/
|
||||||
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Dolibarr version of the loaded document
|
||||||
|
*/
|
||||||
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -369,7 +367,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
|||||||
// Open and load template
|
// Open and load template
|
||||||
require_once ODTPHP_PATH.'odf.php';
|
require_once ODTPHP_PATH.'odf.php';
|
||||||
try {
|
try {
|
||||||
$odfHandler = new odf(
|
$odfHandler = new odf(
|
||||||
$srctemplatepath,
|
$srctemplatepath,
|
||||||
array(
|
array(
|
||||||
'PATH_TO_TMP' => $conf->propal->multidir_temp[$object->entity],
|
'PATH_TO_TMP' => $conf->propal->multidir_temp[$object->entity],
|
||||||
|
|||||||
@@ -67,14 +67,14 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
public $type;
|
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)
|
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||||
*/
|
*/
|
||||||
public $phpmin = array(5, 4);
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* Dolibarr version of the loaded document
|
||||||
* @public string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $version = 'dolibarr';
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
|||||||
@@ -41,22 +41,25 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
|||||||
*/
|
*/
|
||||||
class pdf_cyan extends ModelePDFPropales
|
class pdf_cyan extends ModelePDFPropales
|
||||||
{
|
{
|
||||||
public $db;
|
/**
|
||||||
|
* @var DoliDb Database handler
|
||||||
|
*/
|
||||||
|
public $db;
|
||||||
public $name;
|
public $name;
|
||||||
public $description;
|
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 $update_main_doc_field; // Save the name of generated file as the main doc when generating a doc with this template
|
||||||
public $type;
|
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 $version = 'development';
|
||||||
|
|
||||||
public $page_largeur;
|
public $page_largeur;
|
||||||
public $page_hauteur;
|
public $page_hauteur;
|
||||||
public $format;
|
public $format;
|
||||||
public $marge_gauche;
|
public $marge_gauche;
|
||||||
public $marge_droite;
|
public $marge_droite;
|
||||||
public $marge_haute;
|
public $marge_haute;
|
||||||
public $marge_basse;
|
public $marge_basse;
|
||||||
|
|
||||||
public $emetteur; // Objet societe qui emet
|
public $emetteur; // Objet societe qui emet
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2018 Quentin Vial-Gouteyron <quentin.vial-gouteyron@atm-consulting.fr>
|
/* Copyright (C) 2018 Quentin Vial-Gouteyron <quentin.vial-gouteyron@atm-consulting.fr>
|
||||||
*
|
* 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
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* the Free Software Foundation; either version 3 of the License, or
|
* it under the terms of the GNU General Public License as published by
|
||||||
* (at your option) any later version.
|
* 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
|
* This program is distributed in the hope that it will be useful,
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* GNU General Public License for more details.
|
* 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/>.
|
* You should have received a copy of the GNU General Public License
|
||||||
* or see http://www.gnu.org/
|
* 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
|
* \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
|
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';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -318,7 +330,7 @@ class doc_generic_reception_odt extends ModelePdfReception
|
|||||||
// Open and load template
|
// Open and load template
|
||||||
require_once ODTPHP_PATH.'odf.php';
|
require_once ODTPHP_PATH.'odf.php';
|
||||||
try {
|
try {
|
||||||
$odfHandler = new odf(
|
$odfHandler = new odf(
|
||||||
$srctemplatepath,
|
$srctemplatepath,
|
||||||
array(
|
array(
|
||||||
'PATH_TO_TMP' => $conf->reception->dir_temp,
|
'PATH_TO_TMP' => $conf->reception->dir_temp,
|
||||||
@@ -343,10 +355,9 @@ class doc_generic_reception_odt extends ModelePdfReception
|
|||||||
// Make substitutions into odt of freetext
|
// Make substitutions into odt of freetext
|
||||||
try {
|
try {
|
||||||
$odfHandler->setVars('free_text', $newfreetext, true, 'UTF-8');
|
$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
|
// Make substitutions into odt of user info
|
||||||
$tmparray=$this->get_substitutionarray_user($user, $outputlangs);
|
$tmparray=$this->get_substitutionarray_user($user, $outputlangs);
|
||||||
@@ -364,9 +375,8 @@ class doc_generic_reception_odt extends ModelePdfReception
|
|||||||
{
|
{
|
||||||
$odfHandler->setVars($key, $value, true, 'UTF-8');
|
$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
|
// Make substitutions into odt of mysoc
|
||||||
@@ -385,9 +395,8 @@ class doc_generic_reception_odt extends ModelePdfReception
|
|||||||
{
|
{
|
||||||
$odfHandler->setVars($key, $value, true, 'UTF-8');
|
$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
|
// Make substitutions into odt of thirdparty
|
||||||
@@ -404,9 +413,8 @@ class doc_generic_reception_odt extends ModelePdfReception
|
|||||||
{
|
{
|
||||||
$odfHandler->setVars($key, $value, true, 'UTF-8');
|
$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
|
// Replace tags of object + external modules
|
||||||
@@ -427,9 +435,8 @@ class doc_generic_reception_odt extends ModelePdfReception
|
|||||||
{
|
{
|
||||||
$odfHandler->setVars($key, $value, true, 'UTF-8');
|
$odfHandler->setVars($key, $value, true, 'UTF-8');
|
||||||
}
|
}
|
||||||
}
|
} catch(OdfException $e) {
|
||||||
catch(OdfException $e)
|
dol_syslog($e->getMessage(), LOG_INFO);
|
||||||
{
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Replace tags of lines
|
// 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
|
$reshook=$hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
foreach($tmparray as $key => $val)
|
foreach($tmparray as $key => $val)
|
||||||
{
|
{
|
||||||
try
|
try {
|
||||||
{
|
|
||||||
$listlines->setVars($key, $val, true, 'UTF-8');
|
$listlines->setVars($key, $val, true, 'UTF-8');
|
||||||
}
|
} catch(OdfException $e) {
|
||||||
catch(OdfException $e)
|
dol_syslog($e->getMessage(), LOG_INFO);
|
||||||
{
|
} catch(SegmentException $e) {
|
||||||
}
|
dol_syslog($e->getMessage(), LOG_INFO);
|
||||||
catch(SegmentException $e)
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$listlines->merge();
|
$listlines->merge();
|
||||||
@@ -473,9 +477,8 @@ class doc_generic_reception_odt extends ModelePdfReception
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$odfHandler->setVars($key, $value, true, 'UTF-8');
|
$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)) {
|
if (!empty($conf->global->MAIN_ODT_AS_PDF)) {
|
||||||
try {
|
try {
|
||||||
$odfHandler->exportAsAttachedPDF($file);
|
$odfHandler->exportAsAttachedPDF($file);
|
||||||
}catch (Exception $e){
|
} catch (Exception $e){
|
||||||
$this->error=$e->getMessage();
|
$this->error=$e->getMessage();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -495,7 +498,7 @@ class doc_generic_reception_odt extends ModelePdfReception
|
|||||||
else {
|
else {
|
||||||
try {
|
try {
|
||||||
$odfHandler->saveToDisk($file);
|
$odfHandler->saveToDisk($file);
|
||||||
}catch (Exception $e){
|
} catch (Exception $e){
|
||||||
$this->error=$e->getMessage();
|
$this->error=$e->getMessage();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
*/
|
*/
|
||||||
abstract class ModelePdfReception extends CommonDocGenerator
|
abstract class ModelePdfReception extends CommonDocGenerator
|
||||||
{
|
{
|
||||||
var $error='';
|
public $error='';
|
||||||
|
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
|||||||
public $emetteur;
|
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)
|
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||||
*/
|
*/
|
||||||
public $phpmin = array(5, 4);
|
public $phpmin = array(5, 4);
|
||||||
|
|||||||
@@ -43,15 +43,15 @@ class doc_generic_stock_odt extends ModelePDFStock
|
|||||||
*/
|
*/
|
||||||
public $emetteur;
|
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)
|
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||||
*/
|
*/
|
||||||
public $phpmin = array(5, 4);
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* Dolibarr version of the loaded document
|
||||||
* @public string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $version = 'dolibarr';
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
|||||||
@@ -57,14 +57,14 @@ class pdf_standard extends ModelePDFStock
|
|||||||
public $type;
|
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)
|
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||||
*/
|
*/
|
||||||
public $phpmin = array(5, 4);
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* Dolibarr version of the loaded document
|
||||||
* @public string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $version = 'dolibarr';
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
|||||||
@@ -58,14 +58,14 @@ class pdf_stdmovement extends ModelePDFMovement
|
|||||||
public $type;
|
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)
|
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||||
*/
|
*/
|
||||||
public $phpmin = array(5, 4);
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* Dolibarr version of the loaded document
|
||||||
* @public string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $version = 'dolibarr';
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
@@ -105,8 +105,7 @@ class pdf_stdmovement extends ModelePDFMovement
|
|||||||
public $marge_basse;
|
public $marge_basse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Issuer
|
* @var Societe Issuer
|
||||||
* @var Societe
|
|
||||||
*/
|
*/
|
||||||
public $emetteur;
|
public $emetteur;
|
||||||
|
|
||||||
|
|||||||
@@ -58,14 +58,14 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
public $type;
|
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)
|
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||||
*/
|
*/
|
||||||
public $phpmin = array(5, 4);
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* Dolibarr version of the loaded document
|
||||||
* @public string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $version = 'dolibarr';
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
|||||||
@@ -62,14 +62,14 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
public $type;
|
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)
|
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||||
*/
|
*/
|
||||||
public $phpmin = array(5, 4);
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* Dolibarr version of the loaded document
|
||||||
* @public string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $version = 'dolibarr';
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
|||||||
@@ -59,14 +59,14 @@ class pdf_standard extends ModelePDFSuppliersPayments
|
|||||||
public $type;
|
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)
|
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||||
*/
|
*/
|
||||||
public $phpmin = array(5, 4);
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* Dolibarr version of the loaded document
|
||||||
* @public string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $version = 'dolibarr';
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
|||||||
@@ -45,14 +45,14 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
|
|||||||
public $emetteur;
|
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)
|
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||||
*/
|
*/
|
||||||
public $phpmin = array(5, 4);
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* Dolibarr version of the loaded document
|
||||||
* @public string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $version = 'dolibarr';
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
|||||||
@@ -59,14 +59,14 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
public $type;
|
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)
|
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||||
*/
|
*/
|
||||||
public $phpmin = array(5, 4);
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* Dolibarr version of the loaded document
|
||||||
* @public string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $version = 'dolibarr';
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
|||||||
@@ -37,21 +37,20 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
|
|||||||
class doc_generic_user_odt extends ModelePDFUser
|
class doc_generic_user_odt extends ModelePDFUser
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Issuer
|
* @var Societe Issuer
|
||||||
* @var Societe
|
|
||||||
*/
|
*/
|
||||||
public $emetteur;
|
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)
|
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||||
*/
|
*/
|
||||||
public $phpmin = array(5, 4);
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* Dolibarr version of the loaded document
|
||||||
* @public string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $version = 'dolibarr';
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -45,14 +45,14 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
|
|||||||
public $emetteur;
|
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)
|
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||||
*/
|
*/
|
||||||
public $phpmin = array(5, 4);
|
public $phpmin = array(5, 4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dolibarr version of the loaded document
|
* Dolibarr version of the loaded document
|
||||||
* @public string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $version = 'dolibarr';
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
|
|||||||
global $conf, $langs, $mysoc;
|
global $conf, $langs, $mysoc;
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("main","companies"));
|
$langs->loadLangs(array("main","companies"));
|
||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->name = "ODT templates";
|
$this->name = "ODT templates";
|
||||||
|
|||||||
Reference in New Issue
Block a user