Invoice page variables
These variables are for the invoice page itself.
| Variable | Description |
|---|---|
| content | Displays content specified in page's admin section e.g. {{ page.invoice.content }} |
| merchant_account | Merchant or bank account e.g. {{ page.invoice.merchant_account.accepted_card_icons }} |
Invoice variables
These are the variables for the Invoice object, and should be placed within a forloop of outstanding_invoices or closed_invoices:
{% for invoice in outstanding_invoices %}
{{ invoice.name }}
{% endfor %}
| Variable | Description |
|---|---|
| outstanding_invoices | An array of all the outstanding invoices on this invoice page for the current logged in user. e.g. {% for invoice in outstanding_invoices %} |
| closed_invoices | An array of all the outstanding invoices on this invoice page for the user who is currently logged in. e.g. {% for invoice in closed_invoices %} |
| name | The name of the invoice. e.g. {{ invoice.name }} |
| name_with_amount_due | The invoice name and amount with discount applied(e.g. Invoice - $12.37). e.g. {{ invoice.name_with_amount_due }} |
| id | The invoice id. e.g. {{ invoice.id }} |
| status | The invoice id. e.g. {{ invoice.id }} |
| amount_format | The amount of the invoice due without discounts applied formatted (e.g. $12.50). e.g. {{ invoice.amount_format }} |
| amount_due_format | The amount of the invoice with discounts applied and formatted (e.g. $12.37). e.g. {{ invoice.amount_due_format }} |
| amount_with_discount_format | The amount of the invoice with discounts applied and formatted (e.g. $12.37). e.g. {{ invoice.amount_with_discount_format }} |
| closed_at | The date the invoice was closed (e.g. Nov 13 2015) e.g. {{ invoice.closed_at | date_to_string }} |
| sent_at | The date the invoice was sent to the customer (e.g. Nov 9 2015) e.g. {{ invoice.sent_at | date_to_string }} |
| pdf_url | A url for the PDF receipt that was generated for the invoice. |
| is_closed? | Checks if the invoice is closed. e.g. {{ invoice.is_closed? }} |
| is_overdue? | Checks if the invoice is overdue. e.g. {{ invoice.is_overdue? }} |
Item variables
These are the variables for the Item object, and should be placed within a forloop of items in an invoice:
{% for item in invoice.items %}
{{ item.name }}
{% endfor %}
| Variable | Description | items | An array of all the items in this invoice. e.g. {% for item in invoice.items %} |
|---|---|
| name | The name of the invoice item (e.g. Rentals ). e.g. {{ item.name }} |
| quantity | The quantity of this invoice item. e.g. {{ item.quantity }} |
| amount | The cost for this invoice item (e.g. $29.99 ). e.g. {{ item.amount }} |