Show the tax total based on tax codes in the item line. Each tax code should be grouped and tax amounts should be added.
<#assign seen_style = []>
<#list record.item as item>
<#assign tax1amt=0/>
<#assign groupId = item.taxcode>
<#if seen_style?seq_contains(groupId) && groupId != “”>
<#else>
<#assign seen_style = seen_style + [groupId]/>
<#list record.item as item2>
<#if item.taxcode==item2.taxcode>
<#assign tax1amt=(tax1amt+item2.tax1amt)/>
</#if>
</#list>
<#if record.item?has_content> <table >
<#if item_index==0>
</#if>
<#if groupId?has_content><tr><td>Tax Rate at ${item.taxrate1}:</td>
<td><#if item.tax1amt==0.00>0.00<#else>${toCurrency(tax1amt?string[“#,###.00”])} </#if></td></tr>
<#else></#if></table>
The above html code will show the result as given below:
