I am trying to use and if statement to change the header of invoice based on the record. subsidiary but am getting an error and not sure what I am doing wrong.
Copy code
<#if record.subsidiary == 2>
some text
</#if>
p
PNJ
07/22/2020, 2:17 PM
<#if subsidiary.internalid=="2">
PNJ
07/22/2020, 2:17 PM
try that
p
pen one
07/22/2020, 2:21 PM
Did not work - get the following error:
Can't compare values of these types. Allowed comparisons are between two numbers, two strings, two dates, or two booleans.
Left hand operand is a hash+string (wrapper: com.netledger.templates.model.StringModel).
Right hand operand is a number (wrapper: f.t.SimpleNumber).
The blamed expression:
==> subsidiary.internalid== 2