Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions htdocs/core/modules/commande/doc/pdf_einstein.modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede
$pdf->MultiCell(0, 3, ''); // Set interline to 3
$pdf->SetTextColor(0, 0, 0);

$tab_top = 90 + $top_shift + $shipp_shift;
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
$tab_top = 80 + $this->marge_haute + $top_shift + $shipp_shift;
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 32 + $this->marge_haute + $top_shift : $this->marge_haute);

// Incoterm
$height_incoterms = 0;
Expand Down Expand Up @@ -1517,7 +1517,7 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $output
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object);

// Show sender
$posy = 42 + $top_shift;
$posy = 32 + $top_shift + $this->marge_haute;
$posx = $this->marge_gauche;
if (getDolGlobalString('MAIN_INVERT_SENDER_RECIPIENT')) {
$posx = $this->page_largeur - $this->marge_droite - 80;
Expand Down Expand Up @@ -1575,8 +1575,8 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $output
if ($this->page_largeur < 210) {
$widthrecbox = 84; // To work with US executive format
}
$posy = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? 40 : 42;
$posy += $top_shift;
$posy = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? 30 : 32;
$posy += $top_shift + $this->marge_haute;
$posx = $this->page_largeur - $this->marge_droite - $widthrecbox;
if (getDolGlobalString('MAIN_INVERT_SENDER_RECIPIENT')) {
$posx = $this->marge_gauche;
Expand Down
8 changes: 4 additions & 4 deletions htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,8 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede
$pdf->SetTextColor(0, 0, 0);


$tab_top = 90 + $top_shift + $shipp_shift;
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
$tab_top = 80 + $this->marge_haute + $top_shift + $shipp_shift;
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? $this->marge_haute + 32 + $top_shift : $this->marge_haute);
if (!$hidetop && getDolGlobalInt('MAIN_PDF_ENABLE_COL_HEAD_TITLE_REPEAT')) {
// TODO : make this hidden conf the default behavior for each PDF when each PDF managed this new Display
$tab_top_newpage += $this->tabTitleHeight;
Expand Down Expand Up @@ -1767,7 +1767,7 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $output
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object);

// Show sender
$posy = getDolGlobalInt('MAIN_PDF_USE_ISO_LOCATION') ? 40 : 42;
$posy = getDolGlobalInt('MAIN_PDF_USE_ISO_LOCATION') ? $this->marge_haute : $this->marge_haute + 32;
$posy += $top_shift;
$posx = $this->marge_gauche;
if (getDolGlobalInt('MAIN_INVERT_SENDER_RECIPIENT')) {
Expand Down Expand Up @@ -1832,7 +1832,7 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $output
if ($this->page_largeur < 210) {
$widthrecbox = 84; // To work with US executive format
}
$posy = getDolGlobalInt('MAIN_PDF_USE_ISO_LOCATION') ? 40 : 42;
$posy = getDolGlobalInt('MAIN_PDF_USE_ISO_LOCATION') ? $this->marge_haute + 30 : 32 + $this->marge_haute;
$posy += $top_shift;
$posx = $this->page_largeur - $this->marge_droite - $widthrecbox;
if (getDolGlobalInt('MAIN_INVERT_SENDER_RECIPIENT')) {
Expand Down
8 changes: 4 additions & 4 deletions htdocs/core/modules/expedition/doc/pdf_espadon.modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede
$pdf->MultiCell(0, 3, ''); // Set interline to 3
$pdf->SetTextColor(0, 0, 0);

$tab_top = 90; // position of top tab
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
$tab_top = 80 + $this->marge_haute + $top_shift; // position of top tab
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? $this->marge_haute + 32 + $top_shift : $this->marge_haute);

$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;

Expand Down Expand Up @@ -1203,7 +1203,7 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object);

// Show sender
$posy = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? 40 : 42;
$posy = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? $this->marge_haute + 30 : $this->marge_haute + 32;
$posx = $this->marge_gauche;
if (getDolGlobalString('MAIN_INVERT_SENDER_RECIPIENT')) {
$posx = $this->page_largeur - $this->marge_droite - 80;
Expand Down Expand Up @@ -1263,7 +1263,7 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
if ($this->page_largeur < 210) {
$widthrecbox = 84; // To work with US executive format
}
$posy = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? 40 : 42;
$posy = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? $this->marge_haute + 30 : $this->marge_haute + 32;
$posx = $this->page_largeur - $this->marge_droite - $widthrecbox;
if (getDolGlobalString('MAIN_INVERT_SENDER_RECIPIENT')) {
$posx = $this->marge_gauche;
Expand Down
8 changes: 4 additions & 4 deletions htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,8 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede
$pdf->MultiCell(0, 3, ''); // Set interline to 3
$pdf->SetTextColor(0, 0, 0);

$tab_top = 90; // position of top tab
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
$tab_top = 80 + $this->marge_haute; // position of top tab
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? $this->marge_haute + 42 + $top_shift : $this->marge_haute + 10);

$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;

Expand Down Expand Up @@ -1075,7 +1075,7 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object);

// Show sender
$posy = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? 40 : 42;
$posy = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? $this->marge_haute + 30 : $this->marge_haute + 32;
$posx = $this->marge_gauche;
if (getDolGlobalString('MAIN_INVERT_SENDER_RECIPIENT')) {
$posx = $this->page_largeur - $this->marge_droite - 80;
Expand Down Expand Up @@ -1135,7 +1135,7 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
if ($this->page_largeur < 210) {
$widthrecbox = 84; // To work with US executive format
}
$posy = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? 40 : 42;
$posy = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? $this->marge_haute + 30 : $this->marge_haute + 32;
$posx = $this->page_largeur - $this->marge_droite - $widthrecbox;
if (getDolGlobalString('MAIN_INVERT_SENDER_RECIPIENT')) {
$posx = $this->marge_gauche;
Expand Down
17 changes: 9 additions & 8 deletions htdocs/core/modules/facture/doc/pdf_crabe.modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -450,9 +450,9 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede

// $pdf->GetY() here can't be used. It is bottom of the second address box but first one may be higher

// $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 = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
// $tab_top is y where we must continue content (80 = 32 + 48: 32 is height of logo and ref, 48 is address blocks)
$tab_top = $this->marge_haute + 80 + $top_shift + $shipp_shift; // top_shift is an addition for linked objects or addons (0 in most cases)
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? $this->marge_haute + 32 + $top_shift : $this->marge_haute);

// You can add more thing under header here, if you increase $extra_under_address_shift too.
$extra_under_address_shift = 0;
Expand Down Expand Up @@ -601,7 +601,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede
}
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
$top_shift = $this->_pagehead($pdf, $object, 0, $outputlangs);
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? $this->marge_haute + 32 + $top_shift : $this->marge_haute);
}
$pdf->setPage($pageposbefore + 1);

Expand Down Expand Up @@ -645,7 +645,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede
}
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
$top_shift = $this->_pagehead($pdf, $object, 0, $outputlangs);
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? $this->marge_haute + 32 + $top_shift : $this->marge_haute);
}
$pdf->setPage($pageposafter + 1);
}
Expand Down Expand Up @@ -826,7 +826,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede
$pdf->setPageOrientation('', true, 0); // The only function to edit the bottom margin of current page to set it.
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
$top_shift = $this->_pagehead($pdf, $object, 0, $outputlangs);
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? $this->marge_haute + 32 + $top_shift : $this->marge_haute);
}
if (!empty($tplidx)) {
$pdf->useTemplate($tplidx);
Expand Down Expand Up @@ -2305,7 +2305,7 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $output
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object);

// Show sender
$posy = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? 40 : 42;
$posy = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? $this->marge_haute + 30 : $this->marge_haute + 32;
$posy += $top_shift;
$posx = $this->marge_gauche;
if (getDolGlobalString('MAIN_INVERT_SENDER_RECIPIENT')) {
Expand Down Expand Up @@ -2367,7 +2367,8 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $output
if ($this->page_largeur < 210) {
$widthrecbox = 84; // To work with US executive format
}
$posy = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? 40 : 42;

$posy = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? $this->marge_haute + 30 : $this->marge_haute + 32;
$posy += $top_shift;
$posx = $this->page_largeur - $this->marge_droite - $widthrecbox;
if (getDolGlobalString('MAIN_INVERT_SENDER_RECIPIENT')) {
Expand Down
10 changes: 5 additions & 5 deletions htdocs/core/modules/facture/doc/pdf_octopus.modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -533,9 +533,9 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede

// $pdf->GetY() here can't be used. It is bottom of the second address box but first one may be higher

// $this->tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks)
$this->tab_top = 90 + $top_shift + $shipp_shift; // top_shift is an addition for linked objects or addons (0 in most cases)
$this->tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
// $this->tab_top is y where we must continue content (80 = 32 + 48: 32 is height of logo and ref, 48 is address blocks)
$this->tab_top = $this->marge_haute + 80 + $top_shift + $shipp_shift; // top_shift is an addition for linked objects or addons (0 in most cases)
$this->tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? $this->marge_haute + 32 + $top_shift : $this->marge_haute);

// You can add more thing under header here, if you increase $extra_under_address_shift too.
$extra_under_address_shift = 0;
Expand Down Expand Up @@ -2547,7 +2547,7 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $output
$carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object);

// Show sender
$posy = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? 40 : 42;
$posy = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? $this->marge_haute + 30 : $this->marge_haute + 32;
$posy += $top_shift;
$posx = $this->marge_gauche;
if (getDolGlobalString('MAIN_INVERT_SENDER_RECIPIENT')) {
Expand Down Expand Up @@ -2607,7 +2607,7 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $output
if ($this->page_largeur < 210) {
$widthrecbox = 84; // To work with US executive format
}
$posy = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? 40 : 42;
$posy = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? $this->marge_haute + 30 : $this->marge_haute + 32;
$posy += $top_shift;
$posx = $this->page_largeur - $this->marge_droite - $widthrecbox;
if (getDolGlobalString('MAIN_INVERT_SENDER_RECIPIENT')) {
Expand Down
11 changes: 6 additions & 5 deletions htdocs/core/modules/facture/doc/pdf_sponge.modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,9 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede

// $pdf->GetY() here can't be used. It is bottom of the second address box but first one may be higher

// $this->tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks)
$this->tab_top = 90 + $top_shift + $shipp_shift; // top_shift is an addition for linked objects or addons (0 in most cases)
$this->tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
// $this->tab_top is y where we must continue content (80 = 32 + 48: 32 is height of logo and ref, 48 is address blocks)
$this->tab_top = $this->marge_haute + 80 + $top_shift + $shipp_shift; // top_shift is an addition for linked objects or addons (0 in most cases)
$this->tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? $this->marge_haute + 32 + $top_shift : $this->marge_haute);

// You can add more thing under header here, if you increase $extra_under_address_shift too.
$extra_under_address_shift = 0;
Expand Down Expand Up @@ -2675,7 +2675,8 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $output
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object);

// Show sender
$posy = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? 40 : 42;
// $posy = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? 40 : 42;
$posy = (getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? $this->marge_haute + 30 : $this->marge_haute + 32);
$posy += $top_shift;
$posx = $this->marge_gauche;
if (getDolGlobalString('MAIN_INVERT_SENDER_RECIPIENT')) {
Expand Down Expand Up @@ -2735,7 +2736,7 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $output
if ($this->page_largeur < 210) {
$widthrecbox = 84; // To work with US executive format
}
$posy = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? 40 : 42;
$posy = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? $this->marge_haute + 30 : $this->marge_haute + 32;
$posy += $top_shift;
$posx = $this->page_largeur - $this->marge_droite - $widthrecbox;
if (getDolGlobalString('MAIN_INVERT_SENDER_RECIPIENT')) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,14 +276,15 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede
$pdf->MultiCell(0, 3, ''); // Set interline to 3
$pdf->SetTextColor(0, 0, 0);

$tab_top = 65;
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 35 : 10);
$top_margin = 55 + $this->marge_haute;
$tab_top = $top_margin;
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? $top_margin + 32 : $top_margin);

$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;

// Show notes
if (!empty($object->note_public)) {
$tab_top = 65;
$tab_top = $top_margin;

$pdf->SetFont('', 'B', $default_font_size);
$pdf->MultiCell(190, 4, $outputlangs->transnoentities("Notes") . ":", 0, 'L', false, 0, 12, $tab_top);
Expand Down Expand Up @@ -663,7 +664,7 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs)


// Show sender
$posy = 40;
$posy = $this->marge_haute + 30;
$posx = $this->marge_gauche;
$hautcadre = 20;
if (getDolGlobalString('MAIN_INVERT_SENDER_RECIPIENT')) {
Expand Down