';
- print '';
+ print '| ';
print $langs->trans('DateInvoice');
print ' | ';
if ($action != 'editinvoicedate' && !empty($object->brouillon) && $usercancreate && empty($conf->global->FAC_FORCE_DATE_VALIDATION)) {
@@ -4385,7 +4385,7 @@ if ($action == 'create') {
if (!empty($conf->global->INVOICE_POINTOFTAX_DATE)) {
// Date invoice
print ' ';
- print '';
+ print '| ';
print $langs->trans('DatePointOfTax');
print ' | ';
print 'id.'">'.img_edit($langs->trans('SetDate'), 1).' | ';
@@ -4401,7 +4401,7 @@ if ($action == 'create') {
// Payment term
print ' ';
- print '';
+ print '| ';
print $langs->trans('PaymentConditionsShort');
print ' | ';
if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editconditions' && $usercancreate) {
@@ -4422,7 +4422,7 @@ if ($action == 'create') {
// Date payment term
print ' ';
- print '';
+ print '| ';
print $langs->trans('DateMaxPayment');
print ' | ';
if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editpaymentterm' && $usercancreate) {
@@ -4446,7 +4446,7 @@ if ($action == 'create') {
// Payment mode
print ' ';
- print '';
+ print '| ';
print $langs->trans('PaymentMode');
print ' | ';
if ($action != 'editmode' && $usercancreate) {
@@ -4466,7 +4466,7 @@ if ($action == 'create') {
// Multicurrency code
print ' ';
print '';
- print '';
+ print '| ';
print $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0);
print ' | ';
if ($usercancreate && $action != 'editmulticurrencycode' && !empty($object->brouillon)) {
@@ -4510,7 +4510,7 @@ if ($action == 'create') {
// Bank Account
if (!empty($conf->banque->enabled)) {
print ' ';
- print '';
+ print '| ';
print $langs->trans('BankAccount');
print ' | ';
if (($action != 'editbankaccount') && $usercancreate) {
@@ -4530,7 +4530,7 @@ if ($action == 'create') {
// Incoterms
if (!empty($conf->incoterm->enabled)) {
print ' | ';
- print '';
+ print '| ';
print $langs->trans('IncotermLabel');
print ' | | ';
if ($usercancreate) {
@@ -4658,7 +4658,8 @@ if ($action == 'create') {
print '';
print ''."\n";
- print ' ';
+ print ''."\n";
+ print '';
$sign = 1;
if (!empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE_SCREEN) && $object->type == $object::TYPE_CREDIT_NOTE) {
diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php
index a87817cdc73..2a76b04fa41 100644
--- a/htdocs/core/modules/bank/doc/pdf_ban.modules.php
+++ b/htdocs/core/modules/bank/doc/pdf_ban.modules.php
@@ -186,9 +186,9 @@ class pdf_ban extends ModeleBankAccountDoc
$pdf->SetTextColor(0, 0, 0);
$tab_top = 50;
- $tab_height = 200;
$tab_top_newpage = 40;
- $tab_height_newpage = 210;
+
+ $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
// Affiche notes
if (!empty($object->note_public)) {
diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php
index 2259897f044..5d18a2ec8fc 100644
--- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php
+++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php
@@ -198,9 +198,9 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$pdf->SetTextColor(0, 0, 0);
$tab_top = 50;
- $tab_height = 200;
$tab_top_newpage = 40;
- $tab_height_newpage = 210;
+
+ $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
// Show notes
if (!empty($object->note_public)) {
diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
index 01fde021cb0..e6ed244fc8f 100644
--- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
@@ -388,6 +388,8 @@ class pdf_eratosthene extends ModelePDFCommandes
$tab_top = 90 + $top_shift;
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
+ $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
+
// Incoterm
$height_incoterms = 0;
if (!empty($conf->incoterm->enabled)) {
@@ -521,8 +523,8 @@ class pdf_eratosthene extends ModelePDFCommandes
}
$height_note = $posyafter - $tab_top_newpage;
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
- } else // No pagebreak
- {
+ } else {
+ // No pagebreak
$pdf->commitTransaction();
$posyafter = $pdf->GetY();
$height_note = $posyafter - $tab_top;
diff --git a/htdocs/core/modules/delivery/doc/pdf_storm.modules.php b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php
index 9c549576818..903c8a233cd 100644
--- a/htdocs/core/modules/delivery/doc/pdf_storm.modules.php
+++ b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php
@@ -342,8 +342,8 @@ class pdf_storm extends ModelePDFDeliveryOrder
$tab_top = 90;
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
- $tab_height = 130;
- $tab_height_newpage = 150;
+
+ $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
$this->posxdesc = $this->marge_gauche + 1;
@@ -352,7 +352,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
if (!empty($conf->incoterm->enabled)) {
$desc_incoterms = $object->getIncotermsForPDF();
if ($desc_incoterms) {
- $tab_top = 88;
+ $tab_top -= 2;
$pdf->SetFont('', '', $default_font_size - 1);
$pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top - 1, dol_htmlentitiesbr($desc_incoterms), 0, 1);
diff --git a/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php b/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php
index 19e319d0522..865bef37fbb 100644
--- a/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php
+++ b/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php
@@ -321,15 +321,15 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$tab_top = 90;
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
- $tab_height = 130;
- $tab_height_newpage = 150;
+
+ $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
// Incoterm
$height_incoterms = 0;
if (!empty($conf->incoterm->enabled)) {
$desc_incoterms = $object->getIncotermsForPDF();
if ($desc_incoterms) {
- $tab_top = 88;
+ $tab_top -= 2;
$pdf->SetFont('', '', $default_font_size - 1);
$pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top - 1, dol_htmlentitiesbr($desc_incoterms), 0, 1);
diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php
index 2752f9a9c9b..fc1094ea949 100644
--- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php
+++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php
@@ -324,8 +324,8 @@ class pdf_espadon extends ModelePdfExpedition
$tab_top = 90;
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift: 10);
- $tab_height = 130;
- $tab_height_newpage = 150;
+
+ $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
$this->posxdesc = $this->marge_gauche + 1;
@@ -334,7 +334,7 @@ class pdf_espadon extends ModelePdfExpedition
if (!empty($conf->incoterm->enabled)) {
$desc_incoterms = $object->getIncotermsForPDF();
if ($desc_incoterms) {
- $tab_top = 88;
+ $tab_top -= 2;
$pdf->SetFont('', '', $default_font_size - 1);
$pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top - 1, dol_htmlentitiesbr($desc_incoterms), 0, 1);
diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php
index 56c8fb143fb..9a905422ff1 100644
--- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php
+++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php
@@ -282,8 +282,8 @@ class pdf_merou extends ModelePdfExpedition
$tab_top = 52;
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
- $tab_height = $this->page_hauteur - $tab_top - $heightforfooter;
- $tab_height_newpage = $this->page_hauteur - $tab_top_newpage - $heightforfooter;
+
+ $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
// Display notes
if (!empty($object->note_public)) {
diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
index 4b542e4e636..211231b9812 100644
--- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
+++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
@@ -349,15 +349,15 @@ class pdf_rouget extends ModelePdfExpedition
$tab_top = 90;
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
- $tab_height = 130;
- $tab_height_newpage = 150;
+
+ $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
// Incoterm
$height_incoterms = 0;
if (!empty($conf->incoterm->enabled)) {
$desc_incoterms = $object->getIncotermsForPDF();
if ($desc_incoterms) {
- $tab_top = 88;
+ $tab_top -= 2;
$pdf->SetFont('', '', $default_font_size - 1);
$pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top - 1, dol_htmlentitiesbr($desc_incoterms), 0, 1);
diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php
index f5862bfc5f2..6fdc14ec1ad 100644
--- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php
+++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php
@@ -313,8 +313,8 @@ class pdf_standard extends ModeleExpenseReport
$tab_top = 95;
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 65 : 10);
- $tab_height = 130;
- $tab_height_newpage = 150;
+
+ $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
// Show notes
$notetoshow = empty($object->note_public) ? '' : $object->note_public;
diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
index b919b90abfd..8d01927e1dc 100644
--- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
+++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
@@ -411,18 +411,21 @@ class pdf_sponge extends ModelePDFFactures
}
$pagenb++;
+ // Output header (logo, ref and address blocks). This is first call for first page.
$top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs, $outputlangsbis);
$pdf->SetFont('', '', $default_font_size - 1);
$pdf->MultiCell(0, 3, ''); // Set interline to 3
$pdf->SetTextColor(0, 0, 0);
- $tab_top = 90 + $top_shift;
+ // You can add more thing undr header here, if you increase top_shift too.
+ // TODO
+
+ // $tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks)
+ $tab_top = 90 + $top_shift; // top_shift is an addition for linked objects or addons (0 in most cases)
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
- $tab_height = 130 - $top_shift;
- $tab_height_newpage = 150;
- if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
- $tab_height_newpage -= $top_shift;
- }
+
+ // Define heigth of table for lines (for first page)
+ $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
$nexY = $tab_top - 1;
@@ -447,7 +450,7 @@ class pdf_sponge extends ModelePDFFactures
}
}
- // Displays notes
+ // Displays notes. Here we are still on code eecuted only for the first page.
$notetoshow = empty($object->note_public) ? '' : $object->note_public;
if (!empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE)) {
// Get first sale rep
@@ -560,8 +563,8 @@ class pdf_sponge extends ModelePDFFactures
}
$height_note = $posyafter - $tab_top_newpage;
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
- } else // No pagebreak
- {
+ } else {
+ // No pagebreak
$pdf->commitTransaction();
$posyafter = $pdf->GetY();
$height_note = $posyafter - $tab_top;
@@ -594,7 +597,7 @@ class pdf_sponge extends ModelePDFFactures
// Use new auto column system
$this->prepareArrayColumnField($object, $outputlangs, $hidedetails, $hidedesc, $hideref);
- // Table simulation to know the height of the title line
+ // Table simulation to know the height of the title line (this set this->tableTitleHeight)
$pdf->startTransaction();
$this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop);
$pdf->rollbackTransaction(true);
@@ -1853,11 +1856,11 @@ class pdf_sponge extends ModelePDFFactures
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
/**
- * Show top header of page.
+ * Show top header of page. This include the logo, ref and address blocs
*
* @param TCPDF $pdf Object PDF
* @param Facture $object Object to show
- * @param int $showaddress 0=no, 1=yes
+ * @param int $showaddress 0=no, 1=yes (usually set to 1 for first page, and 0 for next pages)
* @param Translate $outputlangs Object lang for output
* @param Translate $outputlangsbis Object lang for output bis
* @return void
diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
index e23a0aa1701..719fb670672 100644
--- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
+++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
@@ -271,8 +271,8 @@ class pdf_soleil extends ModelePDFFicheinter
$tab_top = 90;
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
- $tab_height = 130;
- $tab_height_newpage = 150;
+
+ $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
// Display notes
$notetoshow = empty($object->note_public) ? '' : $object->note_public;
diff --git a/htdocs/core/modules/movement/doc/pdf_standard.modules.php b/htdocs/core/modules/movement/doc/pdf_standard.modules.php
index 7f487fdcf94..bf06a1b73d2 100644
--- a/htdocs/core/modules/movement/doc/pdf_standard.modules.php
+++ b/htdocs/core/modules/movement/doc/pdf_standard.modules.php
@@ -499,14 +499,10 @@ class pdf_standard extends ModelePDFMovement
$tab_top = 42;
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
- $tab_height = 130;
- $tab_height_newpage = 150;
- /* ************************************************************************** */
- /* */
- /* Affichage de la liste des produits du MouvementStock */
- /* */
- /* ************************************************************************** */
+ $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
+
+ // Show list of product of the MouvementStock
$nexY += 5;
$nexY = $pdf->GetY();
diff --git a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php
index d116976eb88..0927c795749 100644
--- a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php
+++ b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php
@@ -309,6 +309,8 @@ class pdf_vinci extends ModelePDFMo
$tab_top = 90 + $top_shift;
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
+ $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
+
// Affiche notes
$notetoshow = empty($object->note_public) ? '' : $object->note_public;
@@ -412,8 +414,8 @@ class pdf_vinci extends ModelePDFMo
}
$height_note = $posyafter - $tab_top_newpage;
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
- } else // No pagebreak
- {
+ } else {
+ // No pagebreak
$pdf->commitTransaction();
$posyafter = $pdf->GetY();
$height_note = $posyafter - $tab_top;
diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php
index 815fc4d1c66..37aca08d146 100644
--- a/htdocs/core/modules/product/doc/pdf_standard.modules.php
+++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php
@@ -270,8 +270,8 @@ class pdf_standard extends ModelePDFProduct
$tab_top = 42;
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
- $tab_height = 130;
- $tab_height_newpage = 150;
+
+ $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
// Label of product
$pdf->SetFont('', 'B', $default_font_size);
diff --git a/htdocs/core/modules/project/doc/pdf_baleine.modules.php b/htdocs/core/modules/project/doc/pdf_baleine.modules.php
index 373d41abc31..716c88e1f92 100644
--- a/htdocs/core/modules/project/doc/pdf_baleine.modules.php
+++ b/htdocs/core/modules/project/doc/pdf_baleine.modules.php
@@ -286,8 +286,8 @@ class pdf_baleine extends ModelePDFProjects
$tab_top = 50;
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
- $tab_height = 170;
- $tab_height_newpage = 190;
+
+ $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
// Show public note
$notetoshow = empty($object->note_public) ? '' : $object->note_public;
diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php
index 30b9271a110..f71b0cdb6a7 100644
--- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php
+++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php
@@ -327,8 +327,8 @@ class pdf_beluga extends ModelePDFProjects
$tab_top = 50;
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
- $tab_height = 170;
- $tab_height_newpage = 190;
+
+ $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
// Show public note
$notetoshow = empty($object->note_public) ? '' : $object->note_public;
diff --git a/htdocs/core/modules/project/doc/pdf_timespent.modules.php b/htdocs/core/modules/project/doc/pdf_timespent.modules.php
index ef2ec4fcaf8..991ff794d72 100644
--- a/htdocs/core/modules/project/doc/pdf_timespent.modules.php
+++ b/htdocs/core/modules/project/doc/pdf_timespent.modules.php
@@ -286,8 +286,8 @@ class pdf_timespent extends ModelePDFProjects
$tab_top = 50;
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
- $tab_height = 170;
- $tab_height_newpage = 190;
+
+ $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
// Show public note
$notetoshow = empty($object->note_public) ? '' : $object->note_public;
diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
index d0e51fb8bc7..fd8b5c3389b 100644
--- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
@@ -408,6 +408,7 @@ class pdf_cyan extends ModelePDFPropales
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1);
$tab_top = $nexY + 6;
+ $height_incoterms += 4;
}
}
@@ -537,8 +538,8 @@ class pdf_cyan extends ModelePDFPropales
}
$height_note = $posyafter - $tab_top_newpage;
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
- } else // No pagebreak
- {
+ } else {
+ // No pagebreak
$pdf->commitTransaction();
$posyafter = $pdf->GetY();
$height_note = $posyafter - $tab_top;
diff --git a/htdocs/core/modules/reception/doc/pdf_squille.modules.php b/htdocs/core/modules/reception/doc/pdf_squille.modules.php
index 38344a5f486..9f03abef52c 100644
--- a/htdocs/core/modules/reception/doc/pdf_squille.modules.php
+++ b/htdocs/core/modules/reception/doc/pdf_squille.modules.php
@@ -263,15 +263,15 @@ class pdf_squille extends ModelePdfReception
$tab_top = 90;
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
- $tab_height = 130;
- $tab_height_newpage = 150;
+
+ $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
// Incoterm
$height_incoterms = 0;
if (!empty($conf->incoterm->enabled)) {
$desc_incoterms = $object->getIncotermsForPDF();
if ($desc_incoterms) {
- $tab_top = 88;
+ $tab_top -= 2;
$pdf->SetFont('', '', $default_font_size - 1);
$pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top - 1, dol_htmlentitiesbr($desc_incoterms), 0, 1);
diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php
index 0c627322d69..5d5e24f5fd1 100644
--- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php
+++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php
@@ -293,14 +293,10 @@ class pdf_standard extends ModelePDFStock
$tab_top = 80 + $top_shift;
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
- $tab_height = 130;
+ $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
- /* ************************************************************************** */
- /* */
- /* Show list of product in warehouse */
- /* */
- /* ************************************************************************** */
+ // Show list of product in warehouse */
$totalunit = 0;
$totalvalue = $totalvaluesell = 0;
diff --git a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
index 436017cda0a..7738f1ec404 100644
--- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
+++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
@@ -363,6 +363,8 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$tab_top = 90 + $top_shift;
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
+ $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
+
// Incoterm
if (!empty($conf->incoterm->enabled)) {
$desc_incoterms = $object->getIncotermsForPDF();
@@ -484,8 +486,8 @@ class pdf_cornas extends ModelePDFSuppliersOrders
}
$height_note = $posyafter - $tab_top_newpage;
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
- } else // No pagebreak
- {
+ } else {
+ // No pagebreak
$pdf->commitTransaction();
$posyafter = $pdf->GetY();
$height_note = $posyafter - $tab_top;
diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php
index 5b9ffa062a3..beaddc3a33d 100644
--- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php
+++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php
@@ -317,8 +317,8 @@ class pdf_standard extends ModelePDFSuppliersPayments
$tab_top = 90;
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
- $tab_height = 130;
- $tab_height_newpage = 150;
+
+ $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
// Incoterm
$height_incoterms = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|