-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing extrafields on strato pdf model (#31790)
* undef var * add main extrafields on object * remove dev debug sorry ! --------- Co-authored-by: Laurent Destailleur <[email protected]>
- Loading branch information
Showing
2 changed files
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
* Copyright (C) 2013-2020 Philippe Grand <[email protected]> | ||
* Copyright (C) 2015 Marcos García <[email protected]> | ||
* Copyright (C) 2018-2020 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 Éric Seigne <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -300,11 +301,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; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters