- 07 Feb 2024
- 1 Minute to read
- DarkLight
Excluding Zero Value Lines from Invoices
- Updated on 07 Feb 2024
- 1 Minute to read
- DarkLight
You can edit your invoice template to automatically hide zero value lines on all your invoices.
Log in to dashboard.nexudus.com if you aren't already.
Click Built-in files > invoice.htm.
Do one of the following, based on whether or not your invoice template file is customized:
Default Invoice Template
If you're using version 4 of the Members Portal and your invoice template isn't customized, you can add the two lines in the code as shown below:
- {% unless line.SubTotal == 0 %} after line 289
- {% endunless %} after line 306
Customized Invoice Template
If your invoice template is customized, find the following tag in your template.
<tbody id="invoice_items">
Once you've found the tag, replace the entire tag with the following code snippet. Make sure you replace the whole tag.
<tbody id="invoice_items">
{% for line in data.Local.Invoice.Lines %}
{% unless line.SubTotal == 0 %}
<tr data-model="invoice_item" class="item odd" id="invoice_item_{{ data.Local.Invoice.Id }}">
<td class="item_l quantity_td">
{{ line.Quantity }}
</td>
<td class="item_l description_td">
{{ line.Description }}
</td>
<td class="item_r price_td">
{{ line.UnitPrice | FormatDecimal: 'N' }}
</td>
<td class="item_r subtotal_td">
{{ line.SubTotal | FormatDecimal: 'N' }}
</td>
<td class="item_r subtotal_td">
{{ line.TaxPercentage | FormatDecimal: 'N' }}%
</td>
</tr>
{% endunless %}
{% endfor %}
</tbody>
Click the Save button.
You've successfully excluded zero value lines from your invoices. Any new invoice you issue won't include line items that have a value of zero.
Just click on the Diff tab and then click Reset my file.
Your invoice file will be reset to the default template provided by Nexudus.
Remember that resetting your file erases all edits, including other customization you previously saved.