Fix INVOICE_HIDE_LINKED_OBJECT

This commit is contained in:
Laurent Destailleur (aka Eldy) 2025-01-05 19:06:28 +01:00
parent edf137c92d
commit 7da0580b68
2 changed files with 12 additions and 8 deletions

View file

@ -2201,10 +2201,12 @@ class pdf_crabe extends ModelePDFFactures
$top_shift = 0;
// Show list of linked objects
$current_y = $pdf->getY();
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, $w, 3, 'R', $default_font_size);
if ($current_y < $pdf->getY()) {
$top_shift = $pdf->getY() - $current_y;
if (!getDolGlobalString('INVOICE_HIDE_LINKED_OBJECT')) {
$current_y = $pdf->getY();
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, $w, 3, 'R', $default_font_size);
if ($current_y < $pdf->getY()) {
$top_shift = $pdf->getY() - $current_y;
}
}
if ($showaddress) {

View file

@ -2380,10 +2380,12 @@ class pdf_octopus extends ModelePDFFactures
$top_shift = 0;
$shipp_shift = 0;
// Show list of linked objects
$current_y = $pdf->getY();
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, $w, 3, 'R', $default_font_size);
if ($current_y < $pdf->getY()) {
$top_shift = $pdf->getY() - $current_y;
if (!getDolGlobalString('INVOICE_HIDE_LINKED_OBJECT')) {
$current_y = $pdf->getY();
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, $w, 3, 'R', $default_font_size);
if ($current_y < $pdf->getY()) {
$top_shift = $pdf->getY() - $current_y;
}
}
if ($showaddress) {