2
0
forked from Wavyzz/dolibarr

FIX: pdf: overlap when linked elements and incoterms/public note displayed + port PR #8155 into supplier docs & contracts

This commit is contained in:
Marc de Lima Lucio
2018-05-23 11:11:33 +02:00
parent 1a1f0fbc62
commit 9fa9a716d5
7 changed files with 68 additions and 107 deletions

View File

@@ -301,18 +301,14 @@ class pdf_einstein extends ModelePDFCommandes
$tab_top = 90+$top_shift;
$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;
// Incoterm
$height_incoterms = 0;
if ($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);
@@ -323,8 +319,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetDrawColor(192,192,192);
$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;
$tab_top = $nexY+6+$height_incoterms;
}
}
@@ -343,10 +338,10 @@ class pdf_einstein extends ModelePDFCommandes
}
if ($notetoshow)
{
$tab_top = 88 + $height_incoterms;
$tab_top -= 2;
$pdf->SetFont('','', $default_font_size - 1);
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($notetoshow), 0, 1);
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top-1, dol_htmlentitiesbr($notetoshow), 0, 1);
$nexY = $pdf->GetY();
$height_note=$nexY-$tab_top;
@@ -354,12 +349,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetDrawColor(192,192,192);
$pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1);
$tab_height = $tab_height - $height_note;
$tab_top = $nexY+6;
}
else
{
$height_note=0;
$tab_top = $nexY+6+$height_note;
}
$iniY = $tab_top + 7;