> ## Documentation Index
> Fetch the complete documentation index at: https://support.visualcare.com.au/llms.txt
> Use this file to discover all available pages before exploring further.

# Kilometres sync

> How Visualcare captures, calculates, and exports kilometre data for client billing and worker reimbursement

Visualcare captures two types of kilometre data: kilometres for client transport (charged to the client and reimbursed to the worker) and kilometres between visits (paid to the worker but not charged to the client). Both types flow into the data export process for billing and payroll.

## Types of kilometres

### KMs for transport

Transport kilometres are recorded by the worker through the mobile app or manually entered in the timesheets area. The column header in timesheets is **KM**. These kilometres are:

* **Charged to the client** as part of the invoice export
* **Reimbursed to the worker** as part of the payroll export

You can override the kilometres entered by the worker from the mobile app if needed. Remember to click **Save** after making changes.

### KMs between visits

Kilometres between visits are automatically calculated based on the client's address and the time between shifts. These settings are configured in the **Settings** → **Finance** → **Kilometre** section. These kilometres are:

* **Paid to the worker** as a reimbursement
* **Not charged to the client**

In timesheets, the **KM No Charge** column shows these values after you click the **Calc KM** button at the bottom of the screen.

<img src="https://mintcdn.com/visualcare/jtmqqsMOX3ofArS0/images/finance/kilometres-sync/image-1761890140766-0.png?fit=max&auto=format&n=jtmqqsMOX3ofArS0&q=85&s=20e9b76700c22a252c49d4f90ec3abba" alt="Timesheets page showing KM No Charge column and Calc KM button" width="287" height="77" data-path="images/finance/kilometres-sync/image-1761890140766-0.png" />

<Tip>
  To prevent the **KM No Charge** column from reverting when you next click **Calc KM**, tick the **Lock KM No Charge** checkbox for that row after making your override. Remember to click **Save**.
</Tip>

## Exporting kilometres

### KMs on invoices (charge to client)

There is no separate KM export for invoicing. Transport kilometres charged to the client are automatically added to the client's invoice as part of the standard invoice export - when you run **Export Invoices** on the Data Export page, the KM amounts are included on the invoice.

### KM export for payroll (reimburse to worker)

After you've exported timesheets, approved them, and started a pay run in your payroll software, export kilometres from the same Data Export page by clicking **Export Timesheets** → **Export KMs**. The process follows the same steps as the standard timesheet export.

<Note>
  The **KM Pay Type** in your Xero settings (**Settings** → **Data Export** → **Xero**) needs to match how your KM pay codes are set up in Xero. Select **pay item** if the codes are Ordinary Time Earnings, or **reimbursement** if they're reimbursements.
</Note>

## How Calculate KM works

When you click **Calc KM**, Visualcare uses the Google Maps API to find the quickest route between two addresses. The first time a pair of addresses is calculated, the distance is saved in the database and reused for all future lookups between those same addresses. This means subsequent calculations are instant and don't call the Google Maps API again.

<Note>
  The **KM** option in client agreements does not currently enforce limits or trigger alerts. It is a placeholder field and does not affect KM calculations or export behaviour.
</Note>

## KM charge rate showing as \$0 on timesheets

If the KM charge rate on a timesheet saves as zero even though the rate in **Settings** is greater than zero, this is caused by the KM charge rate storage setting. When the setting is configured to **Export use KM charge rate above**, the timesheet stores a zero rate by design. The export always uses the rate from Settings regardless of the value stored on the timesheet.

If you want to see the KM charge rate on the timesheet for reporting purposes, change the setting to store the rate directly on the timesheet. Either way, the exported amount uses the correct rate from Settings.

## Configuring KM between visits settings

Before using **Calc KM**, set up the kilometres between visits options in **Settings** → **Finance** → **Kilometre** section:

| Setting                              | Description                                                                                                                                                                            |
| ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Max KM Warning**                   | Flags any KM amount greater than this value for review. Applies to kilometres travelled during a shift, not between shifts                                                             |
| **Max minutes between shifts**       | If the time between two shifts exceeds this amount, the distance and time between those shifts is not calculated                                                                       |
| **Pay Code (KM Between, No Charge)** | Select the pay code from your accounting software to use for KM between visits                                                                                                         |
| **KM Between Charge/Pay**            | Controls whether KM between visits is charged to the client and/or paid to the worker. Options: **Charge and Pay**, **Charge but No Pay**, **No Charge but Pay**, **No Charge No Pay** |

Once configured, navigate to **Worker Timesheets** or **All Timesheets** and click **Calc KM**. Google Maps calculates the distance between consecutive shifts. The first shift of the day is skipped. Click **Save Changes** to apply. The KM between values are then included in the next data export.

## Running into issues?

See [Finance troubleshooting](/troubleshooting/general) for common errors and fixes.

## Related articles

<CardGroup cols={2}>
  <Card title="Exporting payroll data" icon="file-export" href="/finance/exporting-payroll-data">
    Step-by-step guide to exporting timesheet data to your payroll software
  </Card>

  <Card title="Billing to accounting software" icon="building-columns" href="/finance/billing-to-accounting-software">
    Export invoices to your accounting platform
  </Card>

  <Card title="Engagement details" icon="briefcase" href="/worker-management/engagement-details">
    Configure award details and pay rate overrides on a worker profile
  </Card>

  <Card title="Claiming and invoicing overview" icon="file-invoice-dollar" href="/finance/claiming-invoicing-overview">
    Overview of all billing and export options in Visualcare
  </Card>
</CardGroup>
