Line Item Templates

Item Templates define the format of invoice line items generated from fees, expenses, and time logs. They help standardize how invoice data is presented and grouped in generated invoices.

Managing Line Item Templates

To manage invoice line item templates, go to: Settings › Invoicing › General 

Here you will find three sections:

  • Timelog Item Templates
  • Expense Item Templates
  • Fee Item Templates

In each section, you can:

  • Add a new template by clicking the “+ Add” button.
  • Edit an existing template by selecting it from the list.
  • Delete a template by clicking the cross (×) button.

Each template contains the following fields:

  • Name — the display name of the template.
  • Grouping — defines how generated line items will be grouped.
  • Template — defines the description format of the generated line items (see sections below for details).

Grouping

Defines how generated line items are grouped on an invoice. The following options are available:

  • No Grouping: Each time log, expense, or fee appears as a separate line item.
  • Employee: Time logs or expenses are grouped by employee.
  • Project: Time logs, expenses, or fees are grouped by project.
  • Task: Time logs, expenses, or fees are grouped by task.
  • Group: Time logs or expenses are grouped by a selected group (e.g., role, office, department, or other employee grouping).

Template

The Template defines the description format of generated line items using a syntax with variables and expressions.
This allows full customization of invoice item labels and details.

Syntax

The syntax defines how invoice item strings are formatted for an object using variables and expressions.

Available Variables

The following variables can be used within templates:

CategoryVariables
Generaldate, project, projectcode, task
Invoiceinvoiceclient, invoiceproject, invoiceprojectcode
Timelogscomment, employee, from, to
Expenses / Feesdescription, employee, from, to
Groupsclient, company, department, role, office, groupvi, groupvii, groupviii, groupix, groupx, groupxi, groupxii

Template Expression

Templates combine plain text and code.
Code expressions are enclosed in braces { } and may include variables or logic.

Example: Plain text and a little bit of {code}.

Code Expression

Expressions may include:

  • Variables (see list above)
  • Literals: Strings enclosed in quotes " "
  • If expressions
  • Or expressions
  • Plus expressions

If Expression

Syntax: if(condition, result, fallback)

  • All three arguments are expressions.
  • Default value of result is the condition itself.
  • Default value of fallback is an empty string.
  • If the condition is true, the result is used; otherwise, the fallback is used.

Or Expression

Syntax: expression or fallback

  • Both arguments are expressions.
  • Uses the expression if it is true; otherwise, the fallback.
  • Equivalent to: if(expression, expression, fallback).
  • The “or” expression is useful when “if” is not intuitive.

Plus Expression

Syntax: expr + expr + … + expr

  • All arguments are expressions.
  • Since every expression in this DSL is a string, the “plus” expression concatenates them.

Template Examples

  • A single variable: {project}
  • Plain text with variables: {employee} timelogs {from} – {to}
  • Variable with literal fallback: {date} {comment or "Time"}
  • Variable fallback to another variable: Fee {description or project}
  • Optional value with parentheses: {if(task, task + " ") + if(project, "(" + project + ")" )}