我想对与 Netsuite Advanced PDF/HTML 中的相同税码对应的值进行小计。甚至可能吗?还有什么其他方法可以实现我的目标?
问问题
3070 次
1 回答
1
这绝对是可能的。Netsuite 在后台使用的模板引擎是Apache FreeMarker,我强烈建议您查看那里的文档以获取完整的详细信息。
以下是一些基本的未经测试的代码,您可以使用它来开始:
<#assign tax1subtotal = 0 >
<#assign tax2subtotal = 0 >
<#assign tax3subtotal = 0 >
<#list record.item as item>
<#if item.taxcode == [taxcode1]>
<#assign tax1subtotal = tax1subtotal + item.tax1amt>
</#if>
<#if item.taxcode == [taxcode2]>
<#assign tax2subtotal = tax2subtotal + item.tax1amt>
</#if>
<#if item.taxcode == [taxcode3]>
<#assign tax3subtotal = tax3subtotal + item.tax1amt>
</#if>
</#list>
Tax Type 1 Subtotal: ${tax1subtotal}<br/>
Tax Type 2 Subtotal: ${tax2subtotal}<br/>
Tax Type 3 Subtotal: ${tax3subtotal}<br/>
于 2017-02-27T02:36:13.063 回答