Skip to content

Creating a custom invoice

If your firm designs its own invoice layout in Word, InTouch can fill it in from a client invoice on the matter, with the invoice’s reference, dates, totals, line items and the time records behind them. This saves you from typing the invoice details into the document by hand.

It takes two steps: add client invoice data markers to one of your document templates, then create the invoice from the matter’s Client invoices tab.

Any document template that contains at least one clientinvoice data marker counts as an invoice template. There’s nothing else to set up. For example:

Invoice {{clientinvoice.reference}}
Date: {{#datetime clientinvoice.date 'd mmmm yyyy'}}
Due: {{#datetime clientinvoice.duedate 'd mmmm yyyy'}}
{{#foreach clientinvoice.lineitems}}
{{index}}. {{details}}: {{total}}
{{#endforeach}}
Total: {{clientinvoice.total}}
Outstanding: {{clientinvoice.outstanding}}

The markers are listed under Client Invoice in the data marker list. They’re filled in only when the document is created with Create New Custom Invoice. If the template is used any other way, for example from the Folder tab, they’re left blank.

  1. Within the matter, open the Client invoices tab
  2. Select the Actions menu next to the invoice
  3. Select Create New Custom Invoice
  4. Choose the template. Only invoice templates are listed
  5. Choose the recipient, letterhead and whether to create a PDF or Word document, as you would for any other document
  6. Answer any questions the template asks

A PDF is saved to the matter’s Folder tab and opened for you. A Word document is downloaded for any final changes and isn’t saved to the matter.

The document is named Invoice <reference> by default. If you create it again with the same name, you’re asked whether to replace the earlier copy or rename the new one. Replacing it only overwrites your earlier custom invoice. The invoice’s own PDF, opened with View Xero PDF, is never replaced.

Create New Custom Invoice is available once an invoice has been approved. It isn’t available on draft or void invoices, or on credit notes. Straight after you approve an invoice, it may take a moment to become available while the approval completes.

MarkerWhat it gives you
clientinvoice.referenceThe invoice number
clientinvoice.dateThe date on the invoice
clientinvoice.duedateWhen payment is due
clientinvoice.approvedonThe date the invoice was approved
clientinvoice.stateOutstanding, Overdue, Paid or Credited. It reads Overdue from the day after the due date
clientinvoice.contact.nameThe name the invoice is addressed to. For the contact’s address and other details, choose them as the recipient
clientinvoice.netThe line items’ amounts before tax
clientinvoice.taxThe line items’ tax
clientinvoice.totalNet plus tax
clientinvoice.paidPayments recorded against the invoice
clientinvoice.creditedCredit notes applied to the invoice
clientinvoice.outstandingTotal less paid and credited
clientinvoice.lineitemsThe invoice’s line items, as a list
clientinvoice.lineitems.countThe number of line items
clientinvoice.timerecordsEvery time record behind the invoice, as a list
clientinvoice.timerecords.countThe number of time records behind the invoice

Each line item has index, details, account.name, amount, tax, total, timeunits and timeamount (the time behind the line, added up). It also has its own timerecords list, with the same fields as matter.timerecords. A line item with no time behind it, such as a fixed fee, has an empty list.

To show the time behind each line, put one loop inside another:

{{#foreach clientinvoice.lineitems}}
{{index}}. {{details}}: {{total}}
{{#foreach timerecords}}
- {{#datetime date 'd mmmm yyyy'}} {{feeearner}}, {{units}} units
{{#endforeach}}
{{#endforeach}}

Inside the inner loop, $parent. reaches the line item (for example {{$parent.details}}), not the matter, so put anything from the matter outside the loops. If a single table of time is enough, loop over clientinvoice.timerecords instead.