Formatting 如何在高级PDF装箱单上缩进套件组件项

Formatting 如何在高级PDF装箱单上缩进套件组件项,formatting,netsuite,freemarker,Formatting,Netsuite,Freemarker,我正在通过NetSuite中的高级PDF设置定制的装箱单,需要帮助满足特定的格式要求。我在代码的位置上遇到了问题,只缩进了工具包项目,而不是它们的组件。由于#list和#if标记放错了位置,NetSuite将不接受我对表单所做的更改。如果有人能帮我澄清这个问题,给我举个例子,说明应该是什么样子,我将不胜感激。如果这里需要更多信息,请告诉我,谢谢-Ryan我已尝试将代码放在#list标记的前后 <table class="itemtable" style="width: 100%; marg

我正在通过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

${salesorder.item[0]。item@label}
${salesorder.item[0]。quantityordered@label}
${salesorder.item[0]。quantityremaining@label}
${salesorder.item[0]。quantity@label}
//用于列出项目履行中的项目的详图索引
//检查项目是否为套件项目
//粗体套件项目
//如果不是套件项,则使用正常格式
//对于套件项目,请使用此格式
${tranline.item}
${tranline.description}
${tranline.quantityremaining}
${tranline.quantity}
//对于组件项,请使用此格式
${tranline.item}
${tranline.description}
${tranline.quantityremaining}
${tranline.quantity}
//应参考tranline.custcol_9r_noncomponent='T'声明
//应关闭列表项的标注
//端桌

Hi here,您能为您的问题添加一些空格和回车吗?这是一堵相当大的墙。请看这里史蒂夫的答案:。希望能有帮助。@Krypton你好。我实际上看了Steve的代码,但不确定在装箱单模板中输入代码的最佳位置。我得到的错误如下:无法比较这些类型的值。允许在两个数字、两个字符串、两个日期或两个布尔值之间进行比较。左侧操作数是哈希+布尔值(包装器:com.netledger.templates.model.BooleanModel)。右操作数是字符串(包装器:f.t.SimpleScalar)。错误的表达式:==>tranline.custcol\u 9r\u noncomponent='T'[在模板“template”第154行第18列]错误消息非常明确;它说比较没有意义,因为一边是布尔值(真/假),另一边是字符串。尝试将该表达式更改为
tranline.custcol\u 9r\u noncomponent=true