Skip to content

Instantly share code, notes, and snippets.

@webbyworks
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webbyworks/bc70f7d33c9fa8e784c7 to your computer and use it in GitHub Desktop.
Save webbyworks/bc70f7d33c9fa8e784c7 to your computer and use it in GitHub Desktop.
How to obtain elements within the list of items for NetSuite's Advanced PDF/HTML Templates.
<#list record.item as i>
<#if i_index == 0>
<!-- it's the first item so just enter the quantity -->
${i.quantity}
<#elseif i.quantity == record.i[item_index-1].quantity>
<!-- if the item matches the same as the previous quantity -->
${i.quantity}
<#else>
<!-- if the quantity of this item differs with the previous -->
<b>${i.quantity}</b>
</#if>
</#list>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment