Add date variables to a recurring invoice profile
This article explains how to add date variables to a recurring invoice profile so that line items on the invoices can include dates that update automatically each time an invoice is generated.
Adding date variables involves adding a short snippet of code when creating a new recurring invoice profile or editing an existing recurring invoice profile. When an invoice is generated from the profile, this snippet of code will then insert the relevant month or year into the line item description.
Date variables for monthly invoices
If you create your invoices on a monthly basis, there are three snippets of code that you can use to insert a particular month into the line item description (for example, to include which month the work on the invoice relates to):
- ${month} will insert the month when the invoice is generated.
- ${month+n} will insert the month that is 'n' months later. For example, if the invoice is generated in January, ${month+1} would insert 'February'.
- ${month-n} will insert the month that is 'n' months earlier. For example, if the invoice is generated in April, ${month-1} would insert 'March'.
Date variables for yearly invoices
If you create your invoices on a yearly basis, there are three snippets of code that you can use to insert a particular year into the line item description (for example, to include which year the work on the invoice is related to):
- ${year} will insert the year when the invoice is generated.
- ${year+n} will insert the year that is 'n' years later. For example, if the invoice is generated in 2021, ${year+1} would insert '2022'.
- ${year-n} will insert the year that is 'n' years earlier. For example, if the invoice is generated in 2022, ${year-1} would insert '2021'.
How to add date variables to a new recurring invoice profile
1. Navigate to Recurring Invoices
To add date variables when creating a new recurring invoice profile, navigate to the ‘Work’ tab at the top of the screen and select ‘Recurring Invoices’ from the drop-down menu.
Select ‘Add recurring profile’ in the top-right corner.
2. Complete the recurring invoice profile
Enter the relevant information for the profile and select ‘Create new profile’ at the bottom of the screen.
3. Add date variables to line items on invoices in the recurring series
In the ‘Draft’ view of the recurring invoice profile, select ‘Add invoice item’.
Insert the relevant snippet of code for monthly or yearly date variables in the 'Details' field and select ‘Create and finish’.
When the invoice is created each month or year, the snippet of code will then insert the relevant date into the line item description.
4. Activate the recurring invoice profile
Review the details for the recurring invoice profile, then select ‘Activate’ to complete the process. Find out more about how to create a recurring invoice profile.
How to add date variables to an existing recurring invoice profile
1. Navigate to the relevant recurring invoice profile
To add date variables to a recurring invoice profile that you’ve already created, navigate to the ‘Work’ tab at the top of the screen and select ‘Recurring Invoices’ from the drop-down menu.
Select the relevant recurring invoice profile from the list.
2. Edit the invoice line items to add date variables to future invoices in the recurring series
Select ‘Make Draft’ in the top-left corner of the recurring invoice profile.
Next, select the ‘Edit’ button to the right of the relevant line item.
Insert the relevant snippet of code for monthly or yearly date variables in the 'Details' field and select ‘Save changes’.
When future invoices are created each month or year, the snippet of code will then insert the relevant date into the line item descriptions.
3. Activate the recurring invoice profile
Review the details for the recurring invoice profile, then select ‘Activate’ to complete the process. Find out more about how to edit a recurring invoice profile.
What happens next?
If you have added date variables to a new recurring invoice profile, the relevant month or year will appear on each invoice generated in the recurring series. If the date variables have been added to an existing recurring invoice profile, the relevant month or year will appear on all future invoices generated in the recurring series.