Remove comma added along with last content in PDF Print

Suppose if want to display set of invoice numbers in PDF print as a comma separated values, then there will a comma added along with last invoice number. Refer following sample to remove that unwanted comma

<table style="width:100%;>
<tr>
<td>
<#if record.apply?has_content>
         <#assign inv = ''>
         <#list record.apply as apply>
              <#assign inv += apply.refnum + ','>
         </#list>
         <#assign len =inv?length>
            ${inv?substring(0,len-1)}
        
  </#if>
</td>
</tr>
</table>

Leave a comment

Your email address will not be published. Required fields are marked *