From 026ee8ddb72ead86b01a6fce1c6f763604d24641 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 12 Apr 2012 20:50:03 +0200 Subject: [PATCH] New: add possibility to define a page break, its very important for internal and external modules (milestone) --- htdocs/core/modules/commande/doc/pdf_edison.modules.php | 2 +- htdocs/core/modules/commande/doc/pdf_einstein.modules.php | 2 +- htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 2 +- htdocs/core/modules/facture/doc/pdf_oursin.modules.php | 2 +- htdocs/core/modules/propale/doc/pdf_azur.modules.php | 2 +- htdocs/core/modules/propale/doc/pdf_jaune.modules.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/commande/doc/pdf_edison.modules.php b/htdocs/core/modules/commande/doc/pdf_edison.modules.php index fbe8770dc6e..fcf5d698c85 100644 --- a/htdocs/core/modules/commande/doc/pdf_edison.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_edison.modules.php @@ -241,7 +241,7 @@ class pdf_edison extends ModelePDFCommandes $nblineFollowDesc = 0; } - if (($nexY+$nblineFollowDesc) > ($tab_top+$tab_height) && $i < ($nblignes - 1)) + if ((($nexY+$nblineFollowDesc) > ($tab_top+$tab_height) && $i < ($nblignes - 1)) || (isset($object->lines[$i+1]->pagebreak) && $object->lines[$i+1]->pagebreak)) { $this->_tableau($pdf, $tab_top, $tab_height, $nexY, $outputlangs); diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 37b358c7542..b6f0408c494 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -350,7 +350,7 @@ class pdf_einstein extends ModelePDFCommandes $tab_top_in_current_page=$tab_top_newpage; $tab_height_in_current_page=$tab_height_newpage; } - if (($nexY+$nblineFollowDesc) > ($tab_top_in_current_page+$tab_height_in_current_page) && $i < ($nblignes - 1)) + if ((($nexY+$nblineFollowDesc) > ($tab_top_in_current_page+$tab_height_in_current_page) && $i < ($nblignes - 1)) || (isset($object->lines[$i+1]->pagebreak) && $object->lines[$i+1]->pagebreak)) { if ($pagenb == 1) { diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 90615358db7..bed8f2d784b 100755 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -350,7 +350,7 @@ class pdf_crabe extends ModelePDFFactures $tab_top_in_current_page=$tab_top_newpage; $tab_height_in_current_page=$tab_height_newpage; } - if (($nexY+$nblineFollowDesc) > ($tab_top_in_current_page+$tab_height_in_current_page) && $i < ($nblignes - 1)) + if ((($nexY+$nblineFollowDesc) > ($tab_top_in_current_page+$tab_height_in_current_page) && $i < ($nblignes - 1)) || (isset($object->lines[$i+1]->pagebreak) && $object->lines[$i+1]->pagebreak)) { if ($pagenb == 1) { diff --git a/htdocs/core/modules/facture/doc/pdf_oursin.modules.php b/htdocs/core/modules/facture/doc/pdf_oursin.modules.php index 274b11a4baf..fb1c41e476d 100755 --- a/htdocs/core/modules/facture/doc/pdf_oursin.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_oursin.modules.php @@ -260,7 +260,7 @@ class pdf_oursin extends ModelePDFFactures $pdf->MultiCell(21, 3, $total_excl_tax, 0, 'R', 0); - if ($nexY > 200 && $i < $nblignes - 1) + if (($nexY > 200 && $i < $nblignes - 1) || (isset($object->lines[$i+1]->pagebreak) && $object->lines[$i+1]->pagebreak)) { $this->_tableau($pdf, $tab_top, $tab_height, $nexY, $object, $outputlangs); $nexY = $iniY; diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index b17312c6b3b..f67af8c43c5 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -332,7 +332,7 @@ class pdf_azur extends ModelePDFPropales $tab_top_in_current_page=$tab_top_newpage; $tab_height_in_current_page=$tab_height_middlepage; } - if (($nexY+$nblineFollowDesc) > ($tab_top_in_current_page+$tab_height_in_current_page) && $i < ($nblignes - 1)) + if ((($nexY+$nblineFollowDesc) > ($tab_top_in_current_page+$tab_height_in_current_page) && $i < ($nblignes - 1)) || (isset($object->lines[$i+1]->pagebreak) && $object->lines[$i+1]->pagebreak)) { if ($pagenb == 1) { diff --git a/htdocs/core/modules/propale/doc/pdf_jaune.modules.php b/htdocs/core/modules/propale/doc/pdf_jaune.modules.php index eaa01e02955..705df1cd9b1 100644 --- a/htdocs/core/modules/propale/doc/pdf_jaune.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_jaune.modules.php @@ -332,7 +332,7 @@ class pdf_jaune extends ModelePDFPropales $tab_top_in_current_page=$tab_top_newpage; $tab_height_in_current_page=$tab_height_middlepage; } - if (($nexY+$nblineFollowDesc) > ($tab_top_in_current_page+$tab_height_in_current_page) && $i < ($nblignes - 1)) + if ((($nexY+$nblineFollowDesc) > ($tab_top_in_current_page+$tab_height_in_current_page) && $i < ($nblignes - 1)) || (isset($object->lines[$i+1]->pagebreak) && $object->lines[$i+1]->pagebreak)) { if ($pagenb == 1) {