Variables

To display document related values on your template, you have to use variables. The following section gives a list of all the available variables of your document.

In order to display the value of a variable, simply insert {{ variable_name }} in your template code.

Account

Here is the available variables on the account object:

Name Type Description
account.logo_url String The URL of your Factures.com account logo
account.company_name String The name of your Factures.com account
account.address_line_1 String The first address line of your Factures.com account
account.address_line_2 String The second address line of your Factures.com account
account.zip_code String The zip code of your Factures.com account
account.city String The city name of your Factures.com account
account.country_name String The country name of your Factures.com account
account.vat_number String The vat number of your Factures.com account
account.phone_number String The phone number of your Factures.com account
account.email String The email address of your Factures.com account
account.bank_account_number String The bank account number of your Factures.com account
account.bic String The BIC (Bank Identifier Code) of your Factures.com account

Document

Here is the available variables on the document object:

Important

Some variables on the document are only available for certain types of document. The following table indicates the availability for each of the document types (Invoice, Estimate or Credit note).

Name Type Invoice Estimate Credit note Description
document.company Object The company of the document. See the document's company section for more information.
document.number String The number of the document
document.issue_date Date The issue date of the document
document.due_date Date The due date of the document
document.expiration_date Date The expiration date of the document
document.name String The name of the document
document.top_text Text The top text of the document
document.lines Array The lines of the document. See the document lines section for more information.
document.sub_total_without_vat Decimal The subtotal amount (excl. VAT) of the document without the discount applied.
document.discount_total Decimal The amount of the discount
document.discount? Boolean True if the document has a discount
document.total_without_vat Decimal The total amount (excl. VAT) of the document with discount applied if any.
document.vat_totals Array The vat rates of the document. See the vat totals section for more information.
document.bottom_text Text The bottom text of the document
document.permalink Text The permalink of your document. Only available in emails default texts
document.invoice? Boolean True if your document is an invoice
document.estimate? Boolean True if your document is an estimate
document.credit_note? Boolean True if your document is a credit note

Document's company

Here is the available variables on the document.company object:

Name Type Description
document.company.name String The name of the company
document.company.number String The number of the company
document.company.address_line_1 String The first address line of the company
document.company.address_line_2 String The second address line of the company
document.company.zip_code String The zip code of the company
document.company.city String The city name of the company
document.company.country_name String The country name of the company
document.company.vat_number String The vat number of the company
document.company.phone_number String The phone number of the company

Document's lines

Here is the available variables for each object of the document.lines array:

Name Type Description
line.quantity String The quantity of the line
line.unit_price Decimal The unit price of the line
line.vat_rate Decimal The VAT rate of the line
line.total_without_vat Decimal The total excluding VAT of the line
line.total_with_vat Decimal The total with VAT of the line
line.description String The description of the line
line.divider? Boolean True if the line is a divider
line.product? Boolean True if the line has an associated product
line.product Object The associated product of the line

Document line's product

Here is the available variables on the line.product object:

Name Type Description
line.product.name String The name of the product
line.product.reference String The reference of the product

Document's VAT totals

Here is the available variables for each object of the document.vat_totals array:

Name Type Description
vat_total.percentage String The percentage of the vat total
vat_total.base_amount Decimal The base amount of the vat total
vat_total.amount Decimal The amount of the vat total

Page numbering

Use this specific syntax to render the current page number and the total page number. Note that this is not Liquid markup.

<p>Page $[page] of $[total]</p>
          

Join Thousands of Top Companies

Get started for free today. No credit card required. Cancel anytime.