Reputation: 161
I would like to hide the entire column "Unit Price" if "Item A" with Internal ID '112' is present at all on an invoice. How would I go about doing this?
Here is my Column "Unit Price":
<td align="right" colspan="4">${item.rate}</td>
Thanks!
Upvotes: 0
Views: 1300
Reputation: 3783
Here is the basic idea, code is not tested..
Add this in your template before the <#list record.item as item>
logic:
<#assign hideUnitPrice = false>
<#list record.item as item>
<#if item.internalid == 112>
<#assign hideUnitPrice = true>
</#if>
</#list>
And change your unit price column code to:
<#if hideUnitPrice == false>
<td align="right" colspan="4">${item.rate}</td>
</#if>
You would probably also want to wrap the column header in a similar conditional.
Upvotes: 2