> 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/september/milestone-xero-account-code.md).

# Milestone-specific Xero account code selection

## Problem it solves

Organisations connected to Xero can already choose which chart-of-accounts code a bill is coded to at the **fund** and **grant (funding round)** level. When a milestone bill is pushed to Xero, its account code is resolved from that hierarchy (fund, then funding round, then the organisation default).

Some milestones under the same fund/grant need to be coded to a different account than their siblings — for example a capital milestone versus operational milestones on the same contract. Previously this required manual recoding in Xero after every sync. This feature lets an admin set the account code on an individual milestone so its bill is coded correctly the first time.

## How it works

* A new **Xero Account Code** field appears on the milestone details page for organisations with the Xero integration enabled (and users who can access payments). It sits alongside the existing Xero Bill ID and "Exempt from Xero syncing" fields.
* The same field is available when **creating** milestones — in the milestone creation wizard, the milestone batch wizard, and the contract milestones wizard — next to the "Exempt from Xero syncing" option.
* It can also be set on a **milestone template** (Settings → Milestone Templates). The code is copied onto every milestone cloned from that template (through all cloning paths — wizards, provider/verifier creation, and milestone batches), so a template can seed the correct account code for all its milestones.
* The field is a dropdown populated from the organisation's live Xero chart of accounts (the same cached account list used for funds and grants), shown as `Account name (code)`. On the details page it is inline-editable.
* When a milestone bill is first created in Xero, the line item's account code is resolved with the milestone's own selection taking priority. The full precedence order is:
  1. **Milestone** account code (new — most specific)
  2. **Fund** account code
  3. **Grant / funding round** account code
  4. **Organisation** default account code
* Consistent with existing behaviour, the account code is only sent when the bill is **first created**. On a re-sync of an existing bill the code is not resent, because bills in Xero are recoded out of the suspense account and admins do not want them moved back.
* The setting has no effect for organisations that are not connected to Xero.

## UI changes

* Milestone details page: new inline "Xero Account Code" selector under the Xero section, with helper text explaining that it overrides the default account code for that milestone's bill.
* Milestone creation wizards (single, batch, and contract): new "Xero Account Code" selector alongside the existing Xero syncing option.
* Milestone template editor (Settings → Milestone Templates): new "Xero Account Code" selector; the chosen code propagates to milestones created from the template.
