Skip to content

Commit

Permalink
Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Nov 13, 2024
2 parents 49d936c + 67c2a48 commit ad2e2fe
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions htdocs/core/modules/contract/doc/pdf_strato.modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Copyright (C) 2013-2020 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2024 Éric Seigne <eric.seigne@cap-rel.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -259,11 +260,24 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10);

// Display notes
if (!empty($object->note_public)) {
$notetoshow = empty($object->note_public) ? '' : $object->note_public;

// Extrafields in note
$extranote = $this->getExtrafieldsInHtml($object, $outputlangs);
if (!empty($extranote)) {
$notetoshow = dol_concatdesc($notetoshow, $extranote);
}

if (!empty($notetoshow)) {
$tab_top -= 2;

$substitutionarray = pdf_getSubstitutionArray($outputlangs, null, $object);
complete_substitutions_array($substitutionarray, $outputlangs, $object);
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
$notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow);

$pdf->SetFont('', '', $default_font_size - 1);
$pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top - 1, dol_htmlentitiesbr($object->note_public), 0, 1);
$pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top - 1, dol_htmlentitiesbr($notetoshow), 0, 1);
$nexY = $pdf->GetY();
$height_note = $nexY - $tab_top;

Expand Down

0 comments on commit ad2e2fe

Please sign in to comment.