在NetSuite中,如何在高级PDF/HTML模板中打印相关记录

问题描述 投票:0回答:2

我在 NetSuite 中创建了一张发票。我还接受了 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>
html templates pdf freemarker netsuite
2个回答
3
投票

我还没有看到这样做的方法。我觉得做不到。


0
投票

有这个标题的suiteanswer: “创建用户事件脚本以在高级 PDF/HTML 模板中打印子自定义记录条目或其他子子记录”

可能不像 HTML 中的列表那么简单,但可能有用。

我会尝试在这里更新结果。

© www.soinside.com 2019 - 2024. All rights reserved.