Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
291 views
in Technique[技术] by (71.8m points)

javascript - Hide Discount Item Type on Netsuite PDF/HTML Advanced

'm trying to modify my Advanced HTML/PDF template so that it hides all Discount Item (Item lines) on invoices. I found SuiteAnswers 33495 and the following code snippet <#if !item.item?contains("Bed")>, but unable to get it to work with itemtype (tried to modify it to if !item.itemtype != 'discountitem'>). Can someone help me?

Snippet from SuiteAnswer:

...
</#if>
<#if !item.item?contains("Bed")>
<tr>
<td align="center" colspan="3" line-height="150%">${item.quantity}</td>
<td colspan="12"><span class="itemname"> ${item.item}</span><br 
/>${item.description}</td>
<td align="right" colspan="4">${item.rate}</td>
<td align="right" colspan="4">${item.amount} </td>
</tr>
</#if>
</#list> 
...

Thanks in advance!

question from:https://stackoverflow.com/questions/65852345/hide-discount-item-type-on-netsuite-pdf-html-advanced

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Try this condition: <#if item.itemtype != 'Discount'> When figuring out the correct filter based on a field value, try printing that value to see what NetSuite is returning.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...