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

# Tax Codes

> Tax codes define the VAT and sales-tax rates your business charges on sales and pays on purchases.

Tax codes define the VAT and sales-tax rates your business charges on sales and pays on purchases. Once a tax code exists, you can pick it line-by-line on invoices and bills, and Hitaji works out the tax amount and posts it to the right GL account for you. Setting up your tax codes once means every document afterwards calculates tax consistently.

**You'll find this at:** `/settings/erp/finance/tax-codes` — in the left navigation under **Settings → ERP / Finance → Tax Codes**. (The older link `/accounting/settings/tax-codes` redirects here.)

> 📷 *Screenshot: Tax Codes settings page listing each code with its rate and kind — to be added.*

***

## Multi-business note

Tax codes are stored **per business**. Each business keeps its own set of codes, so a code like *VAT 18%* is configured independently for each business you run. Switch the active business with the business switcher before adding or editing codes.

***

## What a tax code is for

A tax code captures three things:

1. **A rate** — e.g. 18% — applied to the line amount to compute the tax.
2. **Where it may be used** — sales only, purchases only, or both (the *kind*).
3. **Which GL accounts it posts to** — the output account (tax you collect on sales) and the input account (tax you can recover on purchases).

When you add a tax code to an invoice or bill line, Hitaji multiplies the line by the rate and records the resulting tax to the correct account automatically.

***

## Creating a tax code

1. Go to **Settings → ERP / Finance → Tax Codes** (`/settings/erp/finance/tax-codes`).
2. Click **Add Tax Code**.
3. Fill in the fields below.
4. Save.

> 📷 *Screenshot: Create-tax-code form showing code, label, rate, kind, and account pickers — to be added.*

### Fields

| Field                 | Required | Notes                                                                                                                                                          |
| --------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Code**              | Yes      | A short identifier, e.g. `VAT18`. **Unique per business.** Max 20 characters.                                                                                  |
| **Label**             | Yes      | A readable name shown in pickers, e.g. "VAT 18%". Max 100 characters.                                                                                          |
| **Rate (%)**          | Yes      | The percentage applied to the line amount. Must be between **0 and 100**.                                                                                      |
| **Kind**              | No       | Where the code may be used: **Sales** (invoices), **Purchase** (bills), or **Both**. Defaults to **Both** — the common case.                                   |
| **Jurisdiction**      | No       | A label for the tax authority/region the code belongs to.                                                                                                      |
| **Output account**    | No       | The GL account **credited** when this code is used on a **sale** — your VAT Payable / output VAT account. Must be an active account in the current book.       |
| **Input account**     | No       | The GL account **debited** when this code is used on a **purchase** — your VAT Recoverable / input VAT account. Must be an active account in the current book. |
| **Compound**          | No       | Marks the code as compound (calculated on top of other taxes). Off by default.                                                                                 |
| **Included in price** | No       | If on, the line price is treated as tax-inclusive. Off by default.                                                                                             |
| **Active**            | No       | Active codes appear in pickers; inactive ones are hidden but kept for history. On by default.                                                                  |
| **Default**           | No       | Marks this as the default code to suggest. Off by default.                                                                                                     |

> **Kind vs. accounts.** The *kind* is a permission flag — it controls whether the code is allowed to appear on an invoice line or a bill line. The *output/input accounts* are the posting targets. They are independent: a "Both" code uses its output account on sales and its input account on purchases.

### Zero-rated vs. exempt (Uganda / EFRIS)

Both zero-rated and exempt supplies carry a **rate of 0%**, so the rate alone cannot tell them apart. For EFRIS e-invoicing, a tax code can also carry an **EFRIS tax category code** (Standard 18%, Zero-rated 0%, Exempt, Deemed 18%, Excise) so fiscalisation reports the correct category even when two codes both read 0.00%. Set this when you create a 0% code that must be distinguished as zero-rated versus exempt.

***

## How a tax code applies on documents

### On invoices (sales)

Each invoice line can reference a tax code. The rate computes the tax on that line.

**Behind the scenes.** When the invoice posts, the tax you charged the customer is **credited** to the code's **output account** (your VAT Payable). This is tax you have collected on behalf of the authority and now owe.

### On bills (purchases)

Each bill line can likewise reference a tax code.

**Behind the scenes.** When the bill posts, the tax you paid the supplier is **debited** to the code's **input account** (your VAT Recoverable) — tax you can reclaim.

### On expenses

Expenses handle tax slightly differently from invoices and bills. Instead of selecting a tax *code*, an expense carries one or more **tax lines** entered directly on the expense. Each expense tax line records:

* the **GL account** for that tax (for example, Input VAT),
* a **description** (e.g. "VAT 18%"),
* an optional **rate** (shown for reference),
* and the **tax amount** itself.

So on an expense you enter the tax amount (and pick its account) directly, rather than letting a stored tax code calculate it. This is useful for ad-hoc or receipt-driven claims where the tax is already printed on the document.

***

## Editing a tax code

Open a code and change any field. The rate must still be between 0 and 100, and any output/input account must still be an active account in the current book. Editing a code affects future documents; documents already posted keep the tax they were calculated with.

***

## Deleting a tax code

A tax code is **soft-deleted**. **You cannot delete a code that is still in use** — if any invoice line or bill line references it, Hitaji blocks the deletion with a count, e.g. *"TaxCode VAT18 is referenced by 12 invoice/bill line(s) and cannot be deleted"*. Deactivate the code instead (clear **Active**) so it disappears from pickers while keeping its history intact.

***

## Access & permissions

* **Viewing** tax codes requires the `accounting:read` scope.
* **Creating, editing and deleting** tax codes requires `accounting:admin` or `accounting:config`.

***

## Related

* [Withholding tax](/accounting/user/masters/withholding-tax) — tax you withhold from vendor payments.
* [Customers & Vendors (Contacts)](/accounting/user/masters/contacts)
* [Categories](/accounting/user/masters/categories)
* [Payment terms](/accounting/user/masters/payment-terms)
