Hi,
I am having some trouble setting up conditional logic in my PDF template.
I want a column in the table to only be printed if the parent entity has a taxType of 'Taxed' this works for the header row but I can not seem to get the right syntax from inside the {{#each Item}} section to do this check. Is this possible?
I am having some trouble setting up conditional logic in my PDF template.
I want a column in the table to only be printed if the parent entity has a taxType of 'Taxed' this works for the header row but I can not seem to get the right syntax from inside the {{#each Item}} section to do this check. Is this possible?
HTML Code:
<table border="0.1pt" cellpadding="2" class="table table-bordered"> <tbody> <tr> <td>Item</td> <!-- {{#ifEqual taxType 'Taxed'}} --> <td align="right">Tax</td> <!-- {{/ifEqual}} --> <td align="right">Total</td> </tr> <!-- {{#each Item}} --> <tr> <td>{{ItemName}}</td> <!-- {{#ifEqual this ../taxType 'Taxed'}} --> <td align="right">{{totalTax}}</td> <!-- {{/ifEqual}} --> <td align="right">{{total}}</td> </tr> <!-- {{/each}} --> </tbody> </table>
Comment