How to Add Serial Sequence number in Advanced PDF Templates

<#if record.item?has_content> 
<table style="width: 100%;  border: 1px solid black; margin-top:10px; ">
<!-- start items -->
<#list record.item as item>
<#assign totalValue = totalValue + item.amount>
<#if item_index==0>
<tr colspan = "20">
<th colspan="3" border-bottom="1" border-right="1" align="center">SI No</th>
<th colspan="10" border-bottom="1" border-right="1" align="center">Details of items with all specification</th>
<th colspan="3" border-bottom="1" border-right="1" align="center">Qty in Nos</th>
<th colspan="4"  border-bottom="1" align="center">Total</th>
</tr>

</#if>
<tr colspan = "20">
<td colspan="3"  border-right="1" border-bottom="1" align="center">${item_index +1}</td>
<td colspan="10" border-right="1" border-bottom="1" align="center">${item.item} , ${item.description}</td>
<td colspan="3" border-right="1" border-bottom="1" align="center">${item.quantity}</td>
<td colspan="4" align="center" border-bottom="1">${item.amount}</td>

</tr>
</#list>
  
    <tr colspan = "20">
<td colspan="3"  border-right="1" align="center"></td>
<td colspan="10" border-right="1" align="center">Total</td>
<td colspan="3" border-right="1" align="center"></td>
<td colspan="4" align="center">${totalValue?string["#,##0.00"]} </td>
</tr>

<!-- end items -->
</table>
  
</#if>

Leave a comment

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