在 netsuite Advanced pdf 中,如果日期已过,我希望在客户声明中的日期旁边放置一个星号

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

在 oracle NetSuite 高级 pdf 中,我一直试图在日期旁边放置一个星号。使用我当前的空闲标记,逾期天数 gt 0 的计算不起作用。如果我要在 if 语句中取出 has content 条件,那么只有当我尝试打印该语句时才会出错。 else 语句将返回当前空闲标记。我通过更改 else 语句中的 line.datecol 进行了测试,看看它是否会填充它所做的逾期天数。

<#if line.duedate?is_date_like>
  <#assign d2 = line.duedate?long>
  <#assign daysoverdue = ((.now?date?long - d2) / (24*60*60*1000))?floor>
<#else>
  <#assign d2 = "">
  <#assign daysoverdue = "">
</#if>
    
<tr>
<#if line.datecol?has_content && daysoverdue gt 0>
  <td colspan="3">${line.datecol}* </td>
<#else>
  <td colspan="3">${line.datecol}</td>
</#if>
<td colspan="12">${line.description}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<#if statement.currency == "US Dollar"> <#if line.custbody_mes_invl_end_customer_link?has_content><a href="${line.custbody_mes_invl_end_customer_link}">Pay Invoice</a></#if></#if></td>
<td align="right" colspan="3">${line.charge}</td>
<td align="right" colspan="4">${line.payment}</td>
<td align="right" colspan="4">${line.balance}</td>
</tr>
</#list><!-- end items --></table>
html netsuite freemarker
1个回答
0
投票

您可以使用自定义字段来解决此问题,该字段从以下公式中获取值:ROUND((MONTHS_BETWEEN(SYSDATE, TO_DATE(TO_CHAR(MAX({duedate}),'YYYY-MM-DD'), 'YYYY-MM- DD')) * 30), 0)

然后将自定义字段添加到 advpdf 中。

最好的, ERP

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