首页 > 解决方案 > 如何在高级 PDF 装箱单上缩进套件组件项目

问题描述

我正在通过 NetSuite 中的高级 PDF 设置自定义装箱单表单,并且需要帮助来满足特定格式要求。我在放置代码以仅缩进套件项目而不是其组件时遇到问题。由于#list 和#if 标签错位,NetSuite 不会接受我对表单的更改。如果有人可以通过展示一个应该是什么样子的例子来帮助我解决这个问题,那将不胜感激。如果这里需要更多信息,请告诉我,谢谢!-Ryan 我尝试将代码放在#list 标记之前和之后。

<table class="itemtable" style="width: 100%; margin-top: 10px;">
<thead>
    <tr>
    <th colspan="12">${salesorder.item[0].item@label}</th>
    <th align="right" colspan="4">${salesorder.item[0].quantityordered@label}</th>
    <th align="right" colspan="4">${salesorder.item[0].quantityremaining@label}</th>
    <th align="right" colspan="4">${salesorder.item[0].quantity@label}</th>
    </tr>
</thead>
        <#list salesorder.item as tranline> //callout to list items from item fulfillment
            <#if tranline.custcol_9r_noncomponent='T'> //checks to see if items are kits items or not
                <#if tranline.custcolitemtype="Kit/Package"><tr style="font-weight:bold"> //bolds kit items
                  <#else><tr style="font-weight:normal"> //if not kit item, uses normal formatting
    </#if> //for kit items use this formatting
                <td width="15%" class="item" font-size="7pt">${tranline.item}</td>
                <td width="20%" class="item">${tranline.description}</td>
                <td width="8%" class="item" align="center">${tranline.quantityremaining}</td>
                <td width="8%" class="item" align="center">${tranline.quantity}</td>
                <td width="8%" class="item">&nbsp;</td>
                <td width="9%" class="item">&nbsp;</td>
                </tr>
                    <#else> //for component items, use this formatting
                <tr>
                <td width="15%" class="kititem" font-size="7pt">&nbsp;&nbsp;&nbsp;&nbsp;${tranline.item}</td>
                <td width="20%" class="kititem">${tranline.description}</td>
                <td width="8%" class="kititem" align="center">${tranline.quantityremaining}</td>
                <td width="8%" class="kititem" align="center">${tranline.quantity}</td>
                <td width="8%" class="kititem">&nbsp;</td>
                <td width="9%" class="kititem">&nbsp;</td>
                </tr>
              </#if> //should refer to tranline.custcol_9r_noncomponent='T'statement
              </#list> //should close the callout for list items
              </table> //ends table

标签: formattingnetsuitefreemarker

解决方案


推荐阅读