Add Extrafields on PDF Models: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Tag: 2017 source edit
No edit summary
Tag: 2017 source edit
Line 66: Line 66:
*Open the new template '''pdf_my_template.modules.php'''
*Open the new template '''pdf_my_template.modules.php'''
*Look for the last '''require_one''' lines ate the beginning of the template
*Look for the last '''require_one''' lines ate the beginning of the template
*Add the line <source lang="php">require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'</source>[[File:Add_extrafields_in_pdf_1.png|none|thumb]]
*Add the line <source lang="php">require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';</source>[[File:Add_extrafields_in_pdf_1.png|none|thumb]]


== Module complementary attribute ==
== Module complementary attribute ==
Line 80: Line 80:
</source>
</source>
*Add the code to display the extrafiled <source lang="php">
*Add the code to display the extrafiled <source lang="php">
$pdf->MultiCell (190,3, $outputlangs->convToOutputCharset($object->array_options['options_my_extra']),0,'L'); );
$pdf->writeHTMLCell (190,3, $this->posxdesc-1, $tab_top-5, $outputlangs->convToOutputCharset($object->array_options['options_my_extra']),0,1);
</source>
</source>
676

edits

Navigation menu