Auto PageBreak patch (bug24007)

This commit is contained in:
raphael_bertrand 2008-08-06 13:18:13 +00:00
parent 3afde06e92
commit b156875843
2 changed files with 2169 additions and 2147 deletions

View File

@ -316,7 +316,18 @@ class pdf_einstein extends ModelePDFCommandes
$nexY+=2; // Passe espace entre les lignes $nexY+=2; // Passe espace entre les lignes
if ($nexY > ($tab_top+$tab_height) && $i < ($nblignes - 1)) // cherche nombre de lignes a venir pour savoir si place suffisante
if($i < ($nblignes - 1)){
//on récupère la description du produit suivant
$follow_descproduitservice = $com->lignes[$i+1]->desc;
//on compte le nombre de ligne afin de vérifier la place disponible
$nblineFollowDesc = (num_lines($follow_descproduitservice)*4);
}
else
$nblineFollowDesc = 0;
// test si besoin nouvelle page
if (($nexY+$nblineFollowDesc) > ($tab_top+$tab_height) && $i < ($nblignes - 1))
{ {
if ($pagenb == 1) if ($pagenb == 1)
{ {

View File

@ -334,7 +334,18 @@ 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)) // cherche nombre de lignes a venir pour savoir si place suffisante
if($i < ($nblignes - 1)){
//on récupère la description du produit suivant
$follow_descproduitservice = $fac->lignes[$i+1]->desc;
//on compte le nombre de ligne afin de vérifier la place disponible
$nblineFollowDesc = (num_lines($follow_descproduitservice)*4);
}
else
$nblineFollowDesc = 0;
// test si besoin nouvelle page
if (($nexY+$nblineFollowDesc) > ($tab_top+$tab_height) && $i < ($nblignes - 1))
{ {
if ($pagenb == 1) if ($pagenb == 1)
{ {
@ -345,7 +356,7 @@ class pdf_crabe extends ModelePDFFactures
$this->_tableau($pdf, $tab_top_newpage, $tab_height_newpage, $nexY, $outputlangs); $this->_tableau($pdf, $tab_top_newpage, $tab_height_newpage, $nexY, $outputlangs);
} }
$this->_pagefoot($pdf,$outputlangs); $this->_pagefoot($pdf,$fac,$outputlangs);
// Nouvelle page // Nouvelle page
$pdf->AddPage(); $pdf->AddPage();