How to check condition in PDF template

In the PDF template, we can check the condition using <#if>. Here we are showing an image only if the sales order location is ‘Outlet Center’.

<#if record.custbody_aha_sales_location=”Outlet Center”>

<#if companyInformation.logoUrl?length != 0> Airport Home Appliance –
Builder Division
${record.location.address1}
${record.location.city} ${record.location.state} ${record.location.zip}
${record.custbody_aha_sales_location.phone}
Sales Invoice
#${record.tranid}
${record.trandate}

The source code is metioned below.

<#if record.custbody_aha_sales_location=”Outlet Center”>

<img src=”src link” height=”70″ width=”70″ style=”padding-left:10px;” alter=”No Refunds or Exchanges – All Sales Final”></img></#if>

Leave a comment

Your email address will not be published. Required fields are marked *