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

# Salary components

> Define the earnings and deductions that make up every payslip, and how each one is calculated.

export const PermissionNote = ({perm}) => <Info>
    Requires the <code>{perm}</code> permission. Ask your administrator if an
    action described here is missing from your screen — see
    [Roles & permissions](/help/concepts/roles-and-permissions).
  </Info>;

<PermissionNote perm="payroll:write" />

A **salary component** is one line on a payslip. The set of components is defined once for the organization; the payroll engine evaluates all of them for every employee, in order, each time a cycle calculates.

**Payroll → Components.**

## Anatomy of a component

| Field                | Purpose                                                                                                         |
| -------------------- | --------------------------------------------------------------------------------------------------------------- |
| **Code**             | The business key — `BASIC`, `HRA`, `PF`, `TDS`. Used by year-to-date lookups and compliance registers.          |
| **Name**             | The label on the payslip.                                                                                       |
| **Kind**             | `earning` or `deduction`.                                                                                       |
| **Calculation type** | How the amount is derived — see below.                                                                          |
| **Value**            | Rupees for a fixed amount; a percentage for the percent types.                                                  |
| **Cap base**         | Ceiling on the base a percentage is applied to. Provident fund uses this.                                       |
| **Wage ceiling**     | The component is skipped entirely when monthly compensation exceeds this. Employees' State Insurance uses this. |
| **Taxable**          | Whether this earning counts toward the taxable base.                                                            |
| **Active**           | Inactive components are ignored by the engine.                                                                  |
| **Order**            | Evaluation and display order.                                                                                   |

<Warning>
  **Codes and names are load-bearing.** Year-to-date summaries and statutory registers look components up by these values. Renaming `BASIC` will not break the calculation, but it will break the reports that expect to find it.
</Warning>

## Calculation types

<AccordionGroup>
  <Accordion title="Fixed" icon="hash">
    A flat rupee amount. Pro-rated by paid days.
  </Accordion>

  <Accordion title="PercentOfCtc" icon="percent">
    A percentage of the employee's monthly compensation. Typically how Basic is defined.
  </Accordion>

  <Accordion title="PercentOfBasic" icon="percent">
    A percentage of the Basic line. House Rent Allowance and Provident Fund usually work this way. Combined with **cap base**, this is how PF is capped at a statutory wage.
  </Accordion>

  <Accordion title="PercentOfGross" icon="percent">
    A percentage of gross earnings.
  </Accordion>

  <Accordion title="Balancing" icon="scale">
    Whatever is left over — the amount that makes the earnings sum to the employee's compensation once every other earning has been computed. A "Special allowance" line typically uses this.
  </Accordion>

  <Accordion title="AttendanceOT" icon="timer">
    The overtime line. Its amount comes from the **day's shift template** multipliers, weighted by whether each day's overtime was ordinary or on a holiday or rest day.

    <Note>
      An `AttendanceOT` component's **value field is not a rate**. It used to be, and is not any more. The component exists to switch overtime pay on and to supply the payslip line's label; the rate lives on the shift template.
    </Note>
  </Accordion>

  <Accordion title="SlabPT" icon="table">
    Professional Tax, resolved from state-wise slab bands using the employee's state, their monthly compensation, and the month.
  </Accordion>

  <Accordion title="SlabTDS" icon="table">
    Income tax deducted at source, computed from the financial year's slab configuration for the employee's tax regime: standard deduction, marginal slabs, rebate, cess, divided over twelve months.
  </Accordion>
</AccordionGroup>

## A typical set

| Code      | Name                       | Kind      | Calc type                            |
| --------- | -------------------------- | --------- | ------------------------------------ |
| `BASIC`   | Basic                      | earning   | PercentOfCtc                         |
| `HRA`     | House Rent Allowance       | earning   | PercentOfBasic                       |
| `CONV`    | Conveyance                 | earning   | Fixed                                |
| `SPECIAL` | Special Allowance          | earning   | Balancing                            |
| `OT`      | Overtime                   | earning   | AttendanceOT                         |
| `PF`      | Provident Fund             | deduction | PercentOfBasic (cap base 15,000)     |
| `ESI`     | Employees' State Insurance | deduction | PercentOfGross (wage ceiling 21,000) |
| `PT`      | Professional Tax           | deduction | SlabPT                               |
| `TDS`     | Income Tax                 | deduction | SlabTDS                              |

Order matters: `BASIC` must evaluate before anything that is a percentage of it, and `SPECIAL` (the balancing line) must come last among earnings.

## Editing

Changes take effect the next time a cycle **calculates**. They do not retroactively alter a cycle that has already been calculated — recalculate it if you want the new definition applied.

<Warning>
  Editing components mid-cycle is a good way to produce a payslip nobody can explain. Make component changes between cycles.
</Warning>

## Statutory data

The Professional Tax and income tax slabs behind `SlabPT` and `SlabTDS` are seeded reference data, not something you maintain in the app.

<Warning>
  **Two limits worth knowing.** The seeded slabs cover a subset of Indian states and one financial year — there is no screen for adding a state or rolling to a new year. And **income tax slabs are configured for the New regime only**: an employee on the Old regime produces a TDS of zero rather than an error. Check the regime on your employees' compensation records before your first live cycle.
</Warning>
