Hi,
I’m trying to set up a template to use for quotes.
It’s working fine in the Design section [pdf mode] but breaks when applying the template to an actual quote.
The pdf preview does not render on screen and trying to view or download pdf from the Quotes page triggers an error [“Something Went Wrong” on download attempt]
This is true in both web and desktop app.
We’re having to put together a custom template as the internal quotes template is being used for Pro-Forma invoices as they was previously not possible to create.
<ninja>
<!-- This section works fine -->
{% set quote = quotes|first %}
<table width="100%" cellspacing="0" cellpadding="0" class="">
<thead class="table-header">
<tr class="table-header primary-color-highlight">
<th class="table_title">Department</th>
<th class="" width="50%">Item Description</th>
<th class="">Qty</th>
<th class="">Unit Price</th>
<th class="">Total Price</th>
</tr>
</thead>
<tbody class="table-body">
{% for item in quote.line_items|filter(item => item.type_id == 1) %}
<tr class="item-row">
<td class="">{{ item.product_key }}</td>
<td class="">{{ item.notes }}</td>
<td class="">{{ item.quantity }}</td>
<td class="">{{ item.cost }}</td>
<td class="">{{ item.line_total }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<!-- This section breaks in quote pdf -->
<div id="totals">
<p>Totals</p>
<p>Subtotal: {{ quote.amount - quote.total_taxes }}</p>
<p>{{ quote.tax_name1 }} {{ quote.tax_rate1 }}%: {{ quote.total_taxes }}</p>
<p>Total Amount: {{ quote.amount }}</p>
</div>
<!-- This section works, but terms are rendered with HTML tags -->
<div>
<p>Payment Terms:</p>
<p>{{quote.terms}}</p>
</div>
</ninja>
What am I doing wrong?