> For the complete documentation index, see [llms.txt](https://wiki.roaddirect.co.nz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.roaddirect.co.nz/tracking/invoices/preview-export.md).

# Preview export

Preview export shows exactly how an invoice will look once it leaves Road Direct, and is where you send it to Xero, download it as a spreadsheet, or print it. You choose how the charges are grouped into invoice lines, check the account codes, then export.

To open it from an invoice in [Beast Mode](/tracking/invoices/beast-mode.md), click **Preview export** in the top bar, or choose **View** → **Preview export**.

## The top bar

| Button                 | What it does                                                                                  |
| ---------------------- | --------------------------------------------------------------------------------------------- |
| **Back to Beast Mode** | Returns to the invoice to make more changes.                                                  |
| **Print**              | Prints the invoice (or saves it as a PDF) straight from Road Direct.                          |
| **Export to Excel**    | Downloads the invoice lines as a spreadsheet, ready to import into another accounting system. |
| **Export to Xero**     | Creates the invoice as a draft in your connected Xero organisation.                           |

The invoice's status is shown next to its number. Once an invoice has been exported, it shows **exported**.

## Invoice options: how charges are grouped

The **Invoice Options** decide how many lines the invoice has. The preview updates as you change them, so try the options until the invoice looks right for your client.

| Option            | Choices                                     | Result                                                                                                                           |
| ----------------- | ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| **Single total?** | Ticked / unticked                           | When ticked, the whole invoice (one-off charges, labour, vehicles and equipment) becomes **one line** with a single grand total. |
| **Labour**        | **Individual lines** / **Subtotals**        | One line per labour rate per day, or one subtotal line per labour type.                                                          |
| **Vehicles**      | **Individual lines** / **Subtotals**        | One line per vehicle rate per day, or one subtotal line per vehicle type.                                                        |
| **Equipment**     | **By day** / **By item** / **Single total** | One line per day listing the equipment used, one line per equipment item, or one line for all equipment.                         |

Office services and one-off charges always appear as their own lines under **Office Services Charges / One Off Charges**.

## The invoice lines

Each line shows the **Description**, **Account Code**, **Quantity**, **Unit Price**, **Discount** and **Amount**, followed by the **Subtotal**, **GST** and **Total (inc. GST)**. Use the **GST** switch if GST shouldn't be added to this invoice.

### Where the descriptions and account codes come from

| Line                                             | Description                                                                                            | Account code                                                          |
| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| Labour and vehicle lines                         | The rate's **Invoice export description** plus the date (e.g. "Invoiced STMS and Vehicle: 20/08/2026") | The rate's **Sales account code** (Tracking → Settings → Rates)       |
| Equipment lines (**By item**)                    | The product's **Invoice export description**                                                           | The product's **Sales account code** (Tracking → Settings → Products) |
| Equipment lines (**By day** or **Single total**) | "Equipment for …" with the items and quantities                                                        | **Default accounting code for grouped equipment charges**             |
| Office services and one-off charges              | The charge's description                                                                               | **Default accounting code for office and one-off charges**            |
| **Single total?** invoice                        | **Default accounting description for invoice with a single grand total**                               | **Default accounting code for invoice with a single grand total**     |

The default codes are set in [System settings](/tracking/settings/system-settings.md). If an account code is missing or wrong on the preview, fix it there or on the rate/product, then come back to the preview.

The invoice's reference number is built from the **Reference number to be used on exported invoices** setting in System settings.

## Export to Xero

### Before your first export

1. **Connect to Xero** and check the right organisation is selected. See [Xero integration](/eboard/settings/xero-integration.md).
2. **Link the client to a Xero contact** under **Sync Xero Contacts** on the same page. If the client shows **Invalid sync detected**, unsync it and link it again.
3. **Check your account codes** exist in Xero's chart of accounts: the sales account codes on your rates and products, and the default codes in System settings.

### Export the invoice

1. Check the invoice options, lines and account codes on the preview.
2. Click **Export to Xero**.
3. If the invoice has been exported before, you're asked **"This invoice has already been exported. Are you sure you wish to export this invoice again?"** Click **Yes** to export it again, or **Cancel**.
4. When the export succeeds, you're taken back to Beast Mode. The invoice number changes to the number **Xero** gave the invoice (e.g. INV-0004), so both systems use the same number.

The invoice arrives in Xero as a **Draft**, against the client's linked contact, with the same lines, account codes and totals as the preview. If a Xero tracking category is set in [Xero settings](/tracking/settings/xero-settings.md), it's applied to every line. Review the draft in Xero, then approve and send it from Xero as usual.

{% hint style="info" %}
Exporting doesn't move the invoice to another tab in Road Direct. When you've finished with it, go to Beast Mode and choose **Workflow** → **Save as complete**.
{% endhint %}

{% hint style="warning" %}
Only re-export an invoice if you mean to. After re-exporting, check Xero to make sure you don't end up with two drafts of the same invoice.
{% endhint %}

## Export to a spreadsheet

Click **Export to Excel** to download the invoice lines, exactly as shown in the preview, as a spreadsheet. Use this to import invoices into an accounting system other than Xero, or to keep a copy.

You can also download a spreadsheet straight from Beast Mode with **Tools** → **Export to spreadsheet**.

## Print or PDF

Click **Print** to print the invoice or save it as a PDF from your browser. Printed and PDF invoices use the **GST number to appear on invoices** and **Day of the month invoices are due** settings in [System settings](/tracking/settings/system-settings.md). These settings don't affect invoices exported to Xero or a spreadsheet.

## After exporting

Go **Back to Beast Mode** and use **Workflow** → **Save as complete** so the invoice moves to the **Complete** tab on the [Invoices](/tracking/invoices.md) page.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://wiki.roaddirect.co.nz/tracking/invoices/preview-export.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
