我正在使用高级 pdf为发票创建打印输出。我试图在“税码”记录中获取与子列表“项目”中的“税码”字段相关的自定义字段的值。我尝试使用 ${item.taxcode.customfield},但在打印输出中出现错误
模板merging.com.netledger.templates.TemplateServiceException期间的异常:模板merging.java.lang.NullPointerException期间的异常请联系您的管理员。
还有另一种方法来操纵我的案子并使其发挥作用吗?
<table class="total" style="width: 100%; margin-top: 10px;" border="2">
<#list record.item as item><#if item_index==0>
<tr>
<th colspan="5" line-height="150%" style="font-weight: bold;background-color: rgb(255, 255, 255);padding: 4x 2px;">Tax Code Message</th>
</tr>
<tr>
<td ><#if item.taxcode?contains("VAT:")><#assign taxcode>${item.taxcode?replace("VAT:","")}</#assign>${taxcode}<br/>${item.taxcode.customfield}</#if></td>
<td ></td>
<td ></td>
</tr>
<tr>
<td ></td>
<td ></td>
<td ></td>
</tr>
</#if></#list>
</table>
谢谢!