NetSuite:从装箱单提前模板访问销售订单字段

时间:2018-07-25 04:15:20

标签: netsuite

这是我第一次发布问题,我需要一些帮助。我正在使用装箱单提前模板。现在,我想访问销售订单表单中的某些字段和项目子列表,但不能。有人能帮我吗? 这是我的代码,用于访问列表项以及从销售订单表单获取字段。 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>

1 个答案:

答案 0 :(得分:2)

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.