From 861b583668ce9d881baee6b9508f409b728c66a3 Mon Sep 17 00:00:00 2001 From: Gauthier PC portable 024 Date: Mon, 1 Mar 2021 16:34:42 +0100 Subject: [PATCH 1/2] FIX : handling $heightforinfotot when he's superior to a page height on Supplier Invoice --- htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index 26329ac889f..b5b93fec357 100644 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -277,6 +277,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetAutoPageBreak(1, 0); $heightforinfotot = 50+(4*$nbpayments); // Height reserved to output the info and total part and payment part + 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 $heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin) if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6; From d20ba5a6657533d048d15553ed0c55334c404eb8 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Mon, 1 Mar 2021 15:38:15 +0000 Subject: [PATCH 2/2] Fixing style errors. --- .../core/modules/supplier_invoice/pdf/pdf_canelle.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index b5b93fec357..01f6369055b 100644 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -277,7 +277,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetAutoPageBreak(1, 0); $heightforinfotot = 50+(4*$nbpayments); // Height reserved to output the info and total part and payment part - if($heightforinfotot > 220) $heightforinfotot = 220; + 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 $heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin) if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;