> ## 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.

# Salary components

> A salary component is a single line that can appear on a payslip — one earning (basic pay, housing allowance, transport, a bonus) or one deduction (a loan…

A salary component is a single line that can appear on a payslip — one earning (basic pay, housing allowance, transport, a bonus) or one deduction (a loan repayment, a voluntary saving, income tax). You define each component once, give it a short **abbreviation**, and then reuse it across as many salary structures as you like. Think of components as the vocabulary of your payroll: structures are the sentences you build from them.

Components come in three flavours: ordinary **earnings**, ordinary **deductions**, and **statutory** items (PAYE, NSSF, LST). The first two you control completely — a flat amount or a formula. Statutory items are different: you only declare *what kind* they are, and the system computes the figure at run time. This page covers all three.

**You'll find this at:** `/settings/erp/finance/payroll-components`

> The old link `/payroll/setup/components` still works and redirects here.

> 📷 *Screenshot: the Salary Components list with the "New Component" button — to be added.*

> **Multi-business:** components belong to the selected business. Check the business switcher before creating one.

***

## Earnings, deductions and statutory items

| Kind          | What it is                                               | How its amount is set                                                                  |
| ------------- | -------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| **Earning**   | Money added to pay — basic, allowances, bonuses          | Flat amount, or a formula                                                              |
| **Deduction** | Money taken off pay — loan repayments, voluntary savings | Flat amount, or a formula                                                              |
| **Statutory** | Government-mandated — PAYE, NSSF, LST                    | **Computed at run time by the statutory engine — you cannot set an amount or formula** |

A component's **Type** is either `Earning` or `Deduction`. Marking it **Statutory** on top of that tells the system the figure is owed to / withheld for the government and must be computed, not typed in.

***

## Creating a component

From the list, choose **New Component**. The form (the Salary Component modal) has these fields:

| Field                      | Label                                | Control                | Required                            | Notes                                                                                       |
| -------------------------- | ------------------------------------ | ---------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------- |
| Name                       | **Name**                             | Text                   | Yes                                 | e.g. "Basic Salary", "Housing Allowance" (up to 255 chars)                                  |
| Abbreviation               | **Abbreviation**                     | Text (auto-uppercased) | Yes                                 | The code other formulas reference — e.g. `BASIC`, `HRA`. Must be unique within the business |
| Type                       | **Type**                             | Select                 | Yes                                 | `Earning` or `Deduction`                                                                    |
| Statutory                  | **Statutory component**              | Toggle                 | No                                  | Turn on for PAYE / NSSF / LST                                                               |
| Statutory kind             | **Statutory kind**                   | Select                 | Only if Statutory is on             | `PAYE`, `NSSF`, `LST`, or `OTHER`                                                           |
| Tax applicable             | **Tax applicable**                   | Toggle                 | No                                  | Whether this earning counts toward the taxable base (default on)                            |
| Depends on payment days    | **Depends on payment days**          | Toggle                 | No                                  | Pro-rate by days actually paid in the period                                                |
| Calculate from a formula   | **Calculate from a formula**         | Toggle                 | No                                  | Switches the value between a formula and a flat amount                                      |
| Formula                    | **Formula expression**               | Text area              | If "Calculate from a formula" is on | e.g. `base * 0.1`                                                                           |
| Fixed amount               | **Fixed amount**                     | Number                 | If not formula-driven               | An optional flat default value for the component                                            |
| Income-tax component       | **Is Income Tax Component**          | Toggle                 | No                                  | The tax engine writes the computed PAYE onto this deduction line                            |
| Variable on taxable salary | **Variable Based on Taxable Salary** | Toggle                 | No                                  | Marks a PAYE-style deduction                                                                |
| Active                     | **Active**                           | Toggle                 | No                                  | Inactive components are skipped (default on)                                                |

Choose **Create** (or **Save changes** when editing). Click any row in the list to edit it.

### Flat amount vs formula

A non-statutory component can carry **either** a flat amount **or** a formula — never both. The flat amount is an optional *default*; in practice the real per-employee figure is usually set on the structure or assignment (see [Salary structures](/hr/user/payroll/salary-structures)). Turn on **Calculate from a formula** when the amount depends on other values.

### Component codes used in formulas

Formulas refer to other values by code. The built-in codes are:

| Code                 | Meaning                                                 |
| -------------------- | ------------------------------------------------------- |
| `base`               | The employee's base pay (from the structure assignment) |
| `gross`              | Gross pay accumulated so far in this slip               |
| `payment_days`       | Days actually paid in the period                        |
| `total_working_days` | Total working days in the period                        |

You can also reference **any other non-statutory component by its abbreviation** — for example `BASIC * 0.4` or `HRA + TRANSPORT`. Formulas support arithmetic (`+ - * / %`), comparisons, `&&`/`||`/`!`, the ternary `condition ? a : b`, and the functions `min`, `max`, `abs`, `round`, `floor`, `ceil`. They cannot reference statutory components (those are computed afterwards).

***

## Statutory components are computed, not entered

This is the most important rule on the page. When **Statutory** is on, the system **rejects** any attempt to give the component a fixed amount, a formula, a "calculate from formula" flag, or a condition. You declare only the **kind** (PAYE, NSSF, LST), and the actual figure is produced at run time by the statutory engine using:

* the **income-tax slabs** in effect for the period (for PAYE — see [Income-tax slabs](/hr/user/payroll/income-tax-slabs)), and
* the configured NSSF / LST rates for the business.

If you try to save a statutory component with an inline amount or formula you'll see an error like *"Statutory salary components must not carry an inline amount, formula, condition... they are driven by the statutory registry."* That is by design.

The statutory **kinds** map to dedicated payable accounts in your books:

| Kind    | Posts to (payable)                 |
| ------- | ---------------------------------- |
| `PAYE`  | PAYE payable                       |
| `NSSF`  | NSSF payable (employee + employer) |
| `LST`   | LST payable                        |
| `OTHER` | Tax payable (catch-all)            |

> Once a component is created as statutory you cannot later change its kind or turn it back into an ordinary component — set it inactive instead.

***

## Editing and removing

* **Edit:** click a row. Most fields can be changed; the statutory kind is locked after creation.
* **Delete:** a component can only be deleted if no active salary structure still references it, and statutory components can't be deleted at all. The clean way to retire a component is to switch **Active** off — it then stays in history but is skipped on new runs.

***

## Permissions

| Action                 | Permission       |
| ---------------------- | ---------------- |
| View components        | `payroll:read`   |
| Create / edit / delete | `payroll:config` |

***

## Behind the scenes — the accounting

Each component can be mapped to a **GL account** per business (the account it debits or credits when payroll posts). Earnings debit a salary/expense account; deductions credit a liability or asset account; statutory items credit their dedicated payable. If a component has no explicit mapping, the run falls back to a blanket payroll-expenses account (for earnings) or salary-payable (for deductions). The full posting is shown on [Running payroll → Behind the scenes](/hr/user/payroll/running-payroll).

***

## Related

* [Salary structures](/hr/user/payroll/salary-structures) — combine components into a pay template
* [Income-tax slabs](/hr/user/payroll/income-tax-slabs) — the PAYE bands behind statutory PAYE
* [Running payroll](/hr/user/payroll/running-payroll) — where components are evaluated and posted
* [Payroll overview](/hr/user/payroll/overview) — how the whole chain fits together
