If an inventory item is labeled as a custom ordere...
# advancedpdf
g
If an inventory item is labeled as a custom ordered item the customer is required to pay a 75% deposit. What would be the proper way to check all line items to see if this custitem87 = CUSTOM so that the deposit information is displayed on the Estimate PDF? Currently, it is showing for all estimates using the following sytnax:
Copy code
${(record.total*0.75)?string.currency}
This is located outside of the existing item list body tables so I am unsure of what would be the best way to check all line items for this field. Thanks.
k
I think you are probably trying to solve this in pdf when it's probably easier to solve in custom fields on transaction
Simplest way to solve this would be a custom field with a summary saved search sourced in. I'm 99 percent sure you can reference those while printing the transaction
m
To do this within the template, you can do something like this (untested code)
Copy code
<#assign hasCustomOrderedItem = false>

<#list record.item as item>
  <#if item.custitem87 == "CUSTOM">
    <#assign hasCustomOrderedItem = true>
  </#if>
</#list> 

<#iif hasCustomOrderedItem>
  This order contains a custom ordered item and a deposit of ${(record.total*0.75)?string.currency} is required.
</#if>
👍 1
g
Thanks @michoel . This worked like a charm. After passing custitem87 to a Transaction Line Field I was able to successfully perform the check and switch on/off the deposit info accordingly.