replace old syntax, rename pdf models with same class name (#30271)

* replace old syntax

* replace old syntax

* replace old syntax

* replace old syntax

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* fix class with same name

* fix class with same name

* clean code
This commit is contained in:
Frédéric FRANCE
2024-07-06 02:59:40 +02:00
committed by GitHub
parent 6e58d54475
commit ea416aac93
39 changed files with 120 additions and 95 deletions

View File

@@ -3,6 +3,7 @@
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
@@ -166,7 +167,7 @@ class pdf_standard_actions
$pdf = pdf_getInstance($this->format);
$heightforinfotot = 50; // Height reserved to output the info and total part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
$pdf->SetAutoPageBreak(1, 0);

View File

@@ -220,7 +220,7 @@ class pdf_standard_asset extends ModelePDFAsset
$pdf->SetAutoPageBreak(1, 0);
$heightforinfotot = 50; // Height reserved to output the info and total part and payment part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + (!getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS') ? 12 : 22); // Height reserved to output the footer (value include bottom margin)
if (class_exists('TCPDF')) {

View File

@@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
@@ -154,7 +155,7 @@ class pdf_ban extends ModeleBankAccountDoc
$pdf = pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
$heightforinfotot = 50; // Height reserved to output the info and total part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
$heightforfooter += 6;

View File

@@ -165,7 +165,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
// Create PDF instance
$pdf = pdf_getInstance($this->format);
$heightforinfotot = 50; // Height reserved to output the info and total part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
$heightforfooter += 6;

View File

@@ -230,7 +230,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
$pdf = pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
$heightforinfotot = 30; // Height reserved to output the info and total part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
$heightforfooter += 6;

View File

@@ -6,6 +6,7 @@
* Copyright (C) 2011-2021 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
@@ -197,7 +198,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$pdf = pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
$heightforinfotot = 30; // Height reserved to output the info and total part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
$heightforfooter += 6;

View File

@@ -241,7 +241,7 @@ class pdf_espadon extends ModelePdfExpedition
$pdf = pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs);
$heightforinfotot = 8; // Height reserved to output the info and total part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
$heightforfooter += 6;

View File

@@ -5,6 +5,7 @@
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
@@ -195,7 +196,7 @@ class pdf_merou extends ModelePdfExpedition
$pdf = pdf_getInstance($this->format, 'mm', 'l');
$default_font_size = pdf_getPDFFontSize($outputlangs);
$heightforinfotot = 0; // Height reserved to output the info and total part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
$heightforfooter += 6;

View File

@@ -274,7 +274,7 @@ class pdf_rouget extends ModelePdfExpedition
$pdf = pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs);
$heightforinfotot = 8; // Height reserved to output the info and total part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
$heightforfooter += 6;

View File

@@ -2,7 +2,7 @@
/* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2016-2023 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2018 Francis Appels <francis.appels@z-application.com>
* Copyright (C) 2019 Markus Welters <markus@welters.de>
* Copyright (C) 2019 Rafael Ingenleuf <ingenleuf@welters.de>
@@ -25,7 +25,7 @@
*/
/**
* \file htdocs/core/modules/expensereport/doc/pdf_standard.modules.php
* \file htdocs/core/modules/expensereport/doc/pdf_standard_expensereport.modules.php
* \ingroup expensereport
* \brief File of class to generate expense report from standard model
*/
@@ -43,7 +43,7 @@ require_once DOL_DOCUMENT_ROOT.'/user/class/userbankaccount.class.php';
/**
* Class to generate expense report based on standard model
*/
class pdf_standard extends ModeleExpenseReport
class pdf_standard_expensereport extends ModeleExpenseReport
{
/**
* @var DoliDB Database handler
@@ -236,7 +236,7 @@ class pdf_standard extends ModeleExpenseReport
$pdf = pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
$heightforinfotot = 40; // Height reserved to output the info and total part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 12; // Height reserved to output the footer (value include bottom margin)
if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
$heightforfooter += 6;

View File

@@ -303,7 +303,7 @@ class pdf_crabe extends ModelePDFFactures
if ($heightforinfotot > 220) {
$heightforinfotot = 220;
}
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
$heightforfooter += 6;

View File

@@ -333,7 +333,7 @@ class pdf_sponge extends ModelePDFFactures
$pdf->SetAutoPageBreak(1, 0);
$this->heightforinfotot = 50 + (4 * $nbpayments); // Height reserved to output the info and total part and payment part
$this->heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$this->heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$this->heightforfooter = $this->marge_basse + (!getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS') ? 12 : 22); // Height reserved to output the footer (value include bottom margin)
$heightforqrinvoice = $heightforqrinvoice_firstpage = 0;

View File

@@ -187,7 +187,7 @@ class pdf_soleil extends ModelePDFFicheinter
$pdf = pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
$heightforinfotot = 50; // Height reserved to output the info and total part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
$heightforfooter += 6;

View File

@@ -2,7 +2,7 @@
/* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2016-2023 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2018 Francis Appels <francis.appels@z-application.com>
* Copyright (C) 2019 Markus Welters <markus@welters.de>
* Copyright (C) 2019 Rafael Ingenleuf <ingenleuf@welters.de>
@@ -25,7 +25,7 @@
*/
/**
* \file htdocs/core/modules/hrm/doc/pdf_standard.modules.php
* \file htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php
* \ingroup hrm
* \brief File of class to generate evaluation report from standard model
*/
@@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
/**
* Class to generate Evaluation Pdf based on standard model
*/
class pdf_standard extends ModelePDFEvaluation
class pdf_standard_evaluation extends ModelePDFEvaluation
{
/**
* @var DoliDB Database handler
@@ -196,7 +196,7 @@ class pdf_standard extends ModelePDFEvaluation
$pdf = pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
$heightforinfotot = 0; // Height reserved to output the info and total part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 12; // Height reserved to output the footer (value include bottom margin)
if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
$heightforfooter += 6;

View File

@@ -1,10 +1,10 @@
<?php
/* Copyright (C) 2003 Steve Dillon
* Copyright (C) 2003 Laurent Passebecq
* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2015 Francis Appels <francis.appels@yahoo.com>
/* Copyright (C) 2003 Steve Dillon
* Copyright (C) 2003 Laurent Passebecq
* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2015 Francis Appels <francis.appels@yahoo.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
@@ -22,7 +22,7 @@
*/
/**
* \file htdocs/core/modules/member/doc/pdf_standard.class.php
* \file htdocs/core/modules/member/doc/pdf_standard_member.class.php
* \ingroup member
* \brief File of class to generate PDF document of labels
*/
@@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonstickergenerator.class.php';
/**
* Class to generate stick sheet with format Avery or other personalised
*/
class pdf_standard extends CommonStickerGenerator
class pdf_standard_member extends CommonStickerGenerator
{
/**
* Dolibarr version of the loaded document

View File

@@ -1,8 +1,9 @@
<?php
/* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2023 Alexandre Spangaro <aspangaro@easya.solutions>
/* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2023 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
@@ -261,8 +262,8 @@ class modExpenseReport extends DolibarrModules
$this->remove($options);
$sql = array(
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = 'standard' AND type='expensereport' AND entity = ".((int) $conf->entity),
"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('standard','expensereport',".((int) $conf->entity).")"
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = 'standard_expensereport' AND type='expensereport' AND entity = ".((int) $conf->entity),
"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('standard_expensereport','expensereport',".((int) $conf->entity).")"
);
return $this->_init($sql, $options);

View File

@@ -5,6 +5,7 @@
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2021 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
@@ -82,14 +83,14 @@ class modStock extends DolibarrModules
$r++;
$this->const[$r][0] = "STOCK_ADDON_PDF";
$this->const[$r][1] = "chaine";
$this->const[$r][2] = "standard";
$this->const[$r][2] = "standard_stock";
$this->const[$r][3] = 'Name of PDF model of stock';
$this->const[$r][4] = 0;
$r++;
$this->const[$r][0] = "MOUVEMENT_ADDON_PDF";
$this->const[$r][1] = "chaine";
$this->const[$r][2] = "stdmovement";
$this->const[$r][2] = "standard_movement_stock";
$this->const[$r][3] = 'Name of PDF model of stock movement';
$this->const[$r][4] = 0;

View File

@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2017 Laurent Destailleur <eldy@stocks.sourceforge.net>
/* Copyright (C) 2017 Laurent Destailleur <eldy@stocks.sourceforge.net>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
@@ -19,7 +19,7 @@
*/
/**
* \file htdocs/core/modules/movement/doc/pdf_standard.modules.php
* \file htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php
* \ingroup societe
* \brief File of class to build PDF documents for stocks movements
*/
@@ -37,7 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
/**
* Class to build documents using ODF templates generator
*/
class pdf_standard extends ModelePDFMovement
class pdf_standard_movementstock extends ModelePDFMovement
{
/**
* @var int Save the name of generated file as the main doc when generating a doc with this template
@@ -386,7 +386,7 @@ class pdf_standard extends ModelePDFMovement
$pdf->SetAutoPageBreak(1, 0);
$heightforinfotot = 40; // Height reserved to output the info and total part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if (class_exists('TCPDF')) {
@@ -904,7 +904,7 @@ class pdf_standard extends ModelePDFMovement
* Show top header of page.
*
* @param TCPDF $pdf Object PDF
* @param Object $object Object to show
* @param MouvementStock|Entrepot $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
@@ -919,17 +919,17 @@ class pdf_standard extends ModelePDFMovement
$default_font_size = pdf_getPDFFontSize($outputlangs);
if ($object->type == 1) {
$titlekey = 'ServiceSheet';
} else {
$titlekey = 'StockSheet';
}
// if ($object->type == 1) {
// $titlekey = 'ServiceSheet';
// } else {
// $titlekey = 'StockSheet';
// }
pdf_pagehead($pdf, $outputlangs, $this->page_hauteur);
// Show Draft Watermark
if ($object->statut == 0 && getDolGlobalString('COMMANDE_DRAFT_WATERMARK')) {
pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', getDolGlobalString('COMMANDE_DRAFT_WATERMARK'));
if ($object->status == 0 && getDolGlobalString('WAREHOUSE_DRAFT_WATERMARK')) {
pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', getDolGlobalString('WAREHOUSE_DRAFT_WATERMARK'));
}
$pdf->SetTextColor(0, 0, 60);
@@ -1127,7 +1127,7 @@ class pdf_standard extends ModelePDFMovement
* Show footer of page. Need this->emetteur object
*
* @param TCPDF $pdf PDF
* @param Object $object Object to show
* @param MouvementStock|Entrepot $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

View File

@@ -210,7 +210,7 @@ class pdf_vinci extends ModelePDFMo
$pdf = pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
$heightforinfotot = 50; // Height reserved to output the info and total part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
$heightforfooter += 6;

View File

@@ -2,6 +2,7 @@
/* Copyright (C) 2017 Laurent Destailleur <eldy@products.sourceforge.net>
* Copyright (C) 2023 Anthony Berton <anthony.berton@bb2a.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
@@ -177,7 +178,7 @@ class pdf_standard extends ModelePDFProduct
$pdf->SetAutoPageBreak(1, 0);
$heightforinfotot = 40; // Height reserved to output the info and total part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
$heightforfooter += 6;
@@ -731,7 +732,7 @@ class pdf_standard extends ModelePDFProduct
pdf_pagehead($pdf, $outputlangs, $this->page_hauteur);
// Show Draft Watermark
if ($object->statut == 0 && getDolGlobalString('PRODUCT_DRAFT_WATERMARK')) {
if ($object->status == 0 && getDolGlobalString('PRODUCT_DRAFT_WATERMARK')) {
pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', getDolGlobalString('COMMANDE_DRAFT_WATERMARK'));
}

View File

@@ -2,6 +2,7 @@
/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2018 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
@@ -194,7 +195,7 @@ class pdf_baleine extends ModelePDFProjects
$pdf->SetAutoPageBreak(1, 0);
$heightforinfotot = 40; // Height reserved to output the info and total part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
$heightforfooter += 6;

View File

@@ -3,6 +3,7 @@
* Copyright (C) 2015-2018 Charlene Benke <charlie@patas-monkey.com>
* Copyright (C) 2018 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
@@ -225,7 +226,7 @@ class pdf_beluga extends ModelePDFProjects
$pdf->SetAutoPageBreak(1, 0);
$heightforinfotot = 40; // Height reserved to output the info and total part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
$heightforfooter += 6;

View File

@@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
@@ -189,7 +190,7 @@ class pdf_timespent extends ModelePDFProjects
$pdf->SetAutoPageBreak(1, 0);
$heightforinfotot = 40; // Height reserved to output the info and total part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
$heightforfooter += 6;

View File

@@ -366,7 +366,7 @@ class pdf_azur extends ModelePDFPropales
$heightforinfotot = 40; // Height reserved to output the info and total part
$heightforsignature = !getDolGlobalString('PROPAL_DISABLE_SIGNATURE') ? (pdfGetHeightForHtmlContent($pdf, $outputlangs->transnoentities("ProposalCustomerSignature")) + 10) : 0;
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
$heightforfooter += 6;

View File

@@ -340,7 +340,7 @@ class pdf_cyan extends ModelePDFPropales
$heightforinfotot = 40; // Height reserved to output the info and total part
$heightforsignature = !getDolGlobalString('PROPAL_DISABLE_SIGNATURE') ? (pdfGetHeightForHtmlContent($pdf, $outputlangs->transnoentities("ProposalCustomerSignature")) + 10) : 0;
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + (!getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS') ? 12 : 22); // Height reserved to output the footer (value include bottom margin)
//print $heightforinfotot + $heightforsignature + $heightforfreetext + $heightforfooter;exit;

View File

@@ -245,7 +245,7 @@ class pdf_squille extends ModelePdfReception
$pdf = pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs);
$heightforinfotot = 8; // Height reserved to output the info and total part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
$pdf->SetAutoPageBreak(1, 0);

View File

@@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
/**
* Class to build documents using ODF templates generator
*/
class pdf_standard extends ModelePDFStock
class pdf_standard_stock extends ModelePDFStock
{
public $wref;
public $posxdesc;
@@ -188,7 +188,7 @@ class pdf_standard extends ModelePDFStock
$pdf->SetAutoPageBreak(1, 0);
$heightforinfotot = 40; // Height reserved to output the info and total part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
$heightforfooter += 6;

View File

@@ -298,7 +298,7 @@ class pdf_eagle extends ModelePDFStockTransfer
$pdf = pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs);
$heightforinfotot = 8; // Height reserved to output the info and total part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
$heightforfooter += 6;

View File

@@ -267,7 +267,7 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer
$pdf->SetAutoPageBreak(1, 0);
$heightforinfotot = 40; // Height reserved to output the info and total part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + (!getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS') ? 12 : 22); // Height reserved to output the footer (value include bottom margin)
if (class_exists('TCPDF')) {

View File

@@ -2,7 +2,7 @@
/* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* This program is free software; you can redistribute it and/or modify
@@ -238,7 +238,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
if ($heightforinfotot > 220) {
$heightforinfotot = 220;
}
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
$heightforfooter += 6;

View File

@@ -265,7 +265,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$pdf = pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
$heightforinfotot = 50; // Height reserved to output the info and total part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
$heightforfooter += 6;

View File

@@ -276,7 +276,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf = pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
$heightforinfotot = 50; // Height reserved to output the info and total part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
$heightforfooter += 6;

View File

@@ -1,8 +1,9 @@
<?php
/* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2022 Ferran Marcet <fmarcet@2byte.es>
/* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2022 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
@@ -20,7 +21,7 @@
*/
/**
* \file htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php
* \file htdocs/core/modules/supplier_payment/doc/pdf_standard_supplierpayment.modules.php
* \ingroup fournisseur
* \brief Class file to generate the supplier invoice payment file with the standard model
*/
@@ -37,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functionsnumtoword.lib.php';
/**
* Class to generate the supplier invoices payment file with the standard model
*/
class pdf_standard extends ModelePDFSuppliersPayments
class pdf_standard_supplierpayment extends ModelePDFSuppliersPayments
{
/**
* @var DoliDB Database handler
@@ -232,7 +233,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
$pdf = pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
$heightforinfotot = 50; // Height reserved to output the info and total part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
$heightforfooter += 6;

View File

@@ -267,7 +267,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$pdf = pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
$heightforinfotot = 50; // Height reserved to output the info and total part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
$heightforfooter += 6;

View File

@@ -264,7 +264,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
$pdf = pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
$heightforinfotot = 50; // Height reserved to output the info and total part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
$heightforfooter += 6;