Fix: le tableau était décalé sur les pages du milieu si pdf de plus de 2 pages

This commit is contained in:
Regis Houssin 2006-06-20 14:18:52 +00:00
parent 56d36676e7
commit e6e8dc5e54
2 changed files with 33 additions and 14 deletions

View File

@ -187,6 +187,7 @@ class pdf_einstein extends ModelePDFCommandes
$tab_top = 90; $tab_top = 90;
$tab_top_newpage = 50; $tab_top_newpage = 50;
$tab_height = 110; $tab_height = 110;
$tab_height_newpage = 170;
$iniY = $tab_top + 8; $iniY = $tab_top + 8;
$curY = $tab_top + 8; $curY = $tab_top + 8;
@ -271,8 +272,16 @@ class pdf_einstein extends ModelePDFCommandes
$nexY+=2; // Passe espace entre les lignes $nexY+=2; // Passe espace entre les lignes
if ($nexY > 200 && $i < ($nblignes - 1)) if ($nexY > 200 && $i < ($nblignes - 1))
{
if ($pagenb == 1)
{ {
$this->_tableau($pdf, $tab_top, $tab_height + 20, $nexY); $this->_tableau($pdf, $tab_top, $tab_height + 20, $nexY);
}
else
{
$this->_tableau($pdf, $tab_top_newpage, $tab_height_newpage, $nexY);
}
$this->_pagefoot($pdf); $this->_pagefoot($pdf);
// Nouvelle page // Nouvelle page
@ -281,6 +290,7 @@ class pdf_einstein extends ModelePDFCommandes
$this->_pagehead($pdf, $com, 0); $this->_pagehead($pdf, $com, 0);
$nexY = $tab_top_newpage + 8; $nexY = $tab_top_newpage + 8;
$pdf->SetTextColor(0,0,0); $pdf->SetTextColor(0,0,0);
$pdf->SetFont('Arial','', 10); $pdf->SetFont('Arial','', 10);
} }

View File

@ -193,6 +193,7 @@ class pdf_crabe extends ModelePDFFactures
$tab_top = 90; $tab_top = 90;
$tab_top_newpage = 50; $tab_top_newpage = 50;
$tab_height = 110; $tab_height = 110;
$tab_height_newpage = 180;
// Affiche notes // Affiche notes
if ($fac->note_public) if ($fac->note_public)
@ -305,8 +306,16 @@ class pdf_crabe extends ModelePDFFactures
$nexY+=2; // Passe espace entre les lignes $nexY+=2; // Passe espace entre les lignes
if ($nexY > ($tab_top+$tab_height) && $i < ($nblignes - 1)) if ($nexY > ($tab_top+$tab_height) && $i < ($nblignes - 1))
{
if ($pagenb == 1)
{ {
$this->_tableau($pdf, $tab_top, $tab_height + 20, $nexY, $outputlangs); $this->_tableau($pdf, $tab_top, $tab_height + 20, $nexY, $outputlangs);
}
else
{
$this->_tableau($pdf, $tab_top_newpage, $tab_height_newpage, $nexY, $outputlangs);
}
$this->_pagefoot($pdf,$outputlangs); $this->_pagefoot($pdf,$outputlangs);
// Nouvelle page // Nouvelle page