Excluding Zero Value Lines from Invoices
  • 05 Apr 2022
  • 1 Minute to read

Excluding Zero Value Lines from Invoices


You can edit your invoice template file to automatically hide zero value lines on invoices.

Invoice formatting always applies to all your invoices.

If you choose to exclude zero value lines, none of the invoices you issue will include zero value lines.


  1. If the navigation menu isn't visible, click the menu icon in the top left corner of the page.

  2. Click Built-in files > invoices.htm.

  3. 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

image.png

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>
  1. Click the Save button. 


You've succesfully excluded zero value lines from your invoices. Any new invoice you issue won't include line items that have a value of zero.

Want to reverse your edits?

Just click on the Diff tab and click Reset my file.

image.png

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.