NetSuite中高级PDF/HTML模板如何打印相关记录
In NetSuite, How Do I Print Related Records in Advanced PDF/HTML Template
我在 NetSuite 中创建了一张发票。我还接受了 PAYMENT 并在我创建的发票上应用了 CREDIT。有谁知道如何打印相关记录,是"list"类型,包含payment/credit信息?
这是发票的 xml 部分:
<machine name="links" type="list" fields="id,trandate,linkurl,type,tranid,status,total">
<line>
<id>167209</id>
<linkurl>/app/accounting/transactions/custpymt.nl?whence=</linkurl>
<status>Deposited</status>
<total>100.00</total>
<trandate>9/18/2017</trandate>
<tranid>PYMT0716</tranid>
<type>Payment</type>
</line>
<line>
<id>167410</id>
<linkurl>/app/accounting/transactions/custcred.nl?whence=</linkurl>
<status>Fully Applied</status>
<total>560.00</total>
<trandate>9/19/2017</trandate>
<tranid>CM0985</tranid>
<type>Credit Memo</type>
</line>
<line>
<id>167410</id>
<total>660.00</total>
<type>Total</type>
</line>
</machine>
这是我在高级 PDF 模板中尝试做的事情:
<#if record.links?has_content>
<table class="itemtable" style="width: 100%;">
<#list record.links as lineitem>
<#if lineitem_index==0>
<thead>
<tr>
<th align="center">type</th>
<th align="center">total</th>
</tr>
</thead>
</#if>
<tr>
<td align="center" class="itemInfo">${lineitem.type}</td>
<td align="center" class="itemInfo">${lineitem.total}</td>
</tr>
</#list>
</table>
</#if>
我还没有找到执行此操作的方法。我觉得做不到。
我在 NetSuite 中创建了一张发票。我还接受了 PAYMENT 并在我创建的发票上应用了 CREDIT。有谁知道如何打印相关记录,是"list"类型,包含payment/credit信息?
这是发票的 xml 部分:
<machine name="links" type="list" fields="id,trandate,linkurl,type,tranid,status,total">
<line>
<id>167209</id>
<linkurl>/app/accounting/transactions/custpymt.nl?whence=</linkurl>
<status>Deposited</status>
<total>100.00</total>
<trandate>9/18/2017</trandate>
<tranid>PYMT0716</tranid>
<type>Payment</type>
</line>
<line>
<id>167410</id>
<linkurl>/app/accounting/transactions/custcred.nl?whence=</linkurl>
<status>Fully Applied</status>
<total>560.00</total>
<trandate>9/19/2017</trandate>
<tranid>CM0985</tranid>
<type>Credit Memo</type>
</line>
<line>
<id>167410</id>
<total>660.00</total>
<type>Total</type>
</line>
</machine>
这是我在高级 PDF 模板中尝试做的事情:
<#if record.links?has_content>
<table class="itemtable" style="width: 100%;">
<#list record.links as lineitem>
<#if lineitem_index==0>
<thead>
<tr>
<th align="center">type</th>
<th align="center">total</th>
</tr>
</thead>
</#if>
<tr>
<td align="center" class="itemInfo">${lineitem.type}</td>
<td align="center" class="itemInfo">${lineitem.total}</td>
</tr>
</#list>
</table>
</#if>
我还没有找到执行此操作的方法。我觉得做不到。