From 5b5ea075e787abb34f2c8245ee7423bc9ce5eaa6 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 5 Feb 2021 18:07:02 +0100 Subject: [PATCH] Save the name of generated file as the main doc when generating a doc with this template and missing declarations --- .../project/doc/pdf_beluga.modules.php | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php index 0f877428052..80862ba32d8 100644 --- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php +++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php @@ -54,6 +54,78 @@ require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; class pdf_beluga extends ModelePDFProjects { + /** + * @var DoliDb Database handler + */ + public $db; + + /** + * @var string model name + */ + public $name; + + /** + * @var string model description (short text) + */ + public $description; + + /** + * @var int Save the name of generated file as the main doc when generating a doc with this template + */ + public $update_main_doc_field; + + /** + * @var string document type + */ + public $type; + + /** + * @var array Minimum version of PHP required by module. + * e.g.: PHP ≥ 5.6 = array(5, 6) + */ + public $phpmin = array(5, 6); + + /** + * Dolibarr version of the loaded document + * @var string + */ + public $version = 'dolibarr'; + + /** + * @var int page_largeur + */ + public $page_largeur; + + /** + * @var int page_hauteur + */ + public $page_hauteur; + + /** + * @var array format + */ + public $format; + + /** + * @var int marge_gauche + */ + public $marge_gauche; + + /** + * @var int marge_droite + */ + public $marge_droite; + + /** + * @var int marge_haute + */ + public $marge_haute; + + /** + * @var int marge_basse + */ + public $marge_basse; + /** * Page orientation * @var string 'P' or 'Portait' (default), 'L' or 'Landscape' @@ -81,6 +153,7 @@ class pdf_beluga extends ModelePDFProjects $this->db = $db; $this->name = "beluga"; $this->description = $langs->trans("DocumentModelBeluga"); + $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template // Page size for A4 format $this->type = 'pdf';