I need help with the Freemarker format for Netsuite (Advanced PDF/HTML Templates)
There are 3 important data values pulled for this records;
${item.quantity} *Order Value*
${item.fulfilled} *Fulfilled Value*
${item.backordered} *Backorder Value*
Basically, what I try to accomplish is, to only show items that are "on backorder"
However this task seems to be a much harder than I have the time and skill for.
So, my plan B is using a separate template for the backorders (which is working well so far!)
The problem is that if I came across an item which is a NON-INVENTORY item, Netsuite does not calculate any qty for ${item.backordered}
SO
Is there any way I can "calculate" the backorder value with scripting in the template?
Can I use an arithmetic function (like below)?
item.quantity - item.fulfilled = item.backordered
Here is the basic format of the text surrounding this query;
<#if record.item?has_content>
<table><#list record.item as item><#if item_index==0>
<thead>
<tr>
<th> QTY </th>
</tr>
</thead>
</#if>
<tr>
<td> ${item.backordered} </td>
</tr>
</#list></table>
</#if>
I have a basic understanding of HTML and CSS, but scripting is still very new to me, so please only constructive criticism.