Reputation: 23
This is my first time to post a question and I need some help. I working with Packing slip advance template. Now I want access some fields and items sublist in sales order form but I can't. Can some one help me? This is my code to access list items and access to get fields from sales order form. My code from advance PDF/HTML templates
<#list salesorder.item as item>
<tr>
<td>${item?counter}</td>
<td>${item.itemid}</td>
<td>${item.description}</td>
<td>${item.quantity}</td>
<td>${item.units}</td>
<td>${item.rate}</td>
<td>${item.amount}</td>
</tr>
</#list>
<tr>
<td></td>
<td></td>
<td>Tax Code Summary <br/></td>
<td>Tax rate <br/> </td>
<td>Total Net <br/> ${salesorder.subtotal} </td>
<td>Total Tax <br/> ${salesorder.taxtotal}</td>
<td><b>${salesorder.total}</b></td>
</tr>
Upvotes: 1
Views: 1392
Reputation: 1473
I tested your items list and it appeared to be working as expected for me. The default list is very similar to yours and works the same:
<#list salesorder.item as tranline>
<tr>
<td colspan="12"><span class="itemname">${tranline.item}</span><br />${tranline.description}</td>
<td colspan="3">${tranline.options}</td>
<td align="right" colspan="4">${tranline.quantityordered}</td>
<td align="right" colspan="4">${tranline.quantityremaining}</td>
<td align="right" colspan="4">${tranline.quantity}</td>
</tr>
</#list>
One thing to note is that ${item.itemid}
won't work. You can do a double join, however, to get the id like this: ${item.item.internalid}
.
As for the extra sales order fields, unfortunately, not all those fields can be accessed. Specifically, the ones in the total box are not accessible from the packing slip advanced pdf. You could, however, try to capture those total fields in a custom body field on the sales order using a workflow, and then display the custom field in your advanced pdf printout.
Upvotes: 2