Document templates (xdoc) useful tips
Display of file remarks (PDF)
Note: depending on the document type (invoice, file summary...), the code may be different to produce the same result, because the exported data may be in a different XML tree structure.
Below, text colors are use to identify more easily the document type.
Display public and contact remarks in several lines (invoice)
{#if($document.invoice.files.get(0) && $document.invoice.files.get(0).comments)}{#foreach($fileComment in $document.invoice.files.get(0).comments)}{#foreach($commentLine in $fileComment.commentLines)}{$commentLine}{#end}{#end}{#end}Display only contact remarks in several lines (invoice)
{#if($document.invoice.files.get(0) && $document.invoice.files.get(0).comments)}{#foreach($fileComment in $document.invoice.files.get(0).comments)}{#if($fileComment.type=="CONTACT") #foreach($commentLine in $fileComment.commentLines)}{$commentLine}{#end #end #end #end}Display public and contact remarks in several lines (file summary)
{#if($document.file && $document.file.comments)
}{#foreach($fileComment in $document.file.comments)}
{#foreach($commentLine in $fileComment.commentLines)}
{$commentLine}
{#end}
{#end}{
#end}Display only of 'public' remarks (file summary)
{#if($document.file && $document.file.comments)}{#foreach($fileComment in $document.file.comments)}{#if($fileComment.type=="COMMENT")#foreach($commentLine in $fileComment.commentLines)}
{$commentLine}{#end}{#end #end #end}
Display only of 'contact' remarks (file summary)
{#if($document.file && $document.file.comments)}{#foreach($fileComment in $document.file.comments)}{#if($fileComment.type=="CONTACT")#foreach($commentLine in $fileComment.commentLines)}
{$commentLine}{#end}{#end #end #end}
Display only of 'internal' remarks (file summary)
{#if($document.file && $document.file.internalComments)}{#foreach($fileComment in $document.file.internalComments)}{#foreach($commentLine in $fileComment.commentLines)}{$commentLine}{#end}{#end}{#end}, multiple selections available, Use left or right arrow keys to navigate selected items
© SecuTix 2023 - Login