我需要指定默认的运输方式,因为在 Netsuite 的输入表单上没有提供任何信息。由于各种原因,我必须在 PDF/HTML 模板中执行此操作。这是我到目前为止的代码,但它似乎不起作用;
<#function toNumber val>
<#if val?has_content && val?length gt 0 >
<#return val?html?replace('[^0-9.]','','r')?number >
<#else><#return 0 ></#if></#function>
<#if record.shipmethod?has_content>
${record.shipmethod} <!-- if a courier is selected -->
<#else> <!-- else -->
<#list 2000..2560 as pcx> <!-- Sydney Metro postcodes -->
<#if toNumber(record.shipzip)==pcx>
Courier1 <!-- Standard Sydney Metro Courier -->
<#else> <!-- else -->
Courier2 <!-- Standard Interstate Courier -->
</#if></#list></#if>