> For the complete documentation index, see [llms.txt](https://help.tahua.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.tahua.io/product-news/2026/may/quickbooks-location-support.md).

# QuickBooks Location (Department) support

## Problem

Organisations syncing milestone payments to QuickBooks previously had a single GL expense account configured at the organisation level. Organisations that track spend by department (called "Locations" in Tahua, "Departments" in QuickBooks) had no way to automatically assign the correct account per grant or contract — they had to correct entries manually in QuickBooks after each sync.

## How it works

### Assigning a Location to a Funding Round, Application or Contract

When QuickBooks is connected, a **QuickBooks Location** field appears on the show (and edit) views for:

* Funding Rounds (admin grants view)
* Funding Applications
* Contracts

Admins select the relevant QuickBooks Department from a dropdown. The list is fetched and cached from QuickBooks (refreshes every 24 hours).

### Mapping Locations to GL Accounts

In **Organisation Settings → QuickBooks Integration**, a new **QuickBooks Location Accounts** section lists all available QB Departments. For each one, admins can select the GL expense account that should be used when syncing milestone bills for grants/contracts assigned to that location.

If no account is mapped for a location, the sync falls back to the organisation-level default account.

### Milestone sync behaviour

When a milestone bill is synced to QuickBooks, the system looks for a location in this order:

1. **Contract** → `quickbooks_location_id`
2. **Funding Application** → `quickbooks_location_id`
3. **Funding Round** → `quickbooks_location_id`

The first location found is used. The bill is created with:

* `DepartmentRef` set to the selected QuickBooks Department
* `AccountRef` set to the GL account mapped to that location (or the org default if no mapping exists)

If none of the three levels has a location set, the sync behaves exactly as before — using the org-level default account with no `DepartmentRef`.
