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

# Payroll overview

> The Swiss payroll engine — what it covers, how a year runs, and where the boundaries are.

Swiss HR Easy runs Swiss payroll end to end: master data, a monthly Lohnabrechnung with
a calculation engine, payslips, bank payments, the transfer into financial accounting,
the authority notifications, and the year-end set.

## The payroll year

```mermaid theme={null}
flowchart TB
  A[Master data<br/>Lohnarten · Kontenplan · Versicherungen · Stammdaten] --> B
  B[Monthly run: open] --> C[Compute]
  C --> D[Review and correct]
  D --> E[Lock]
  E --> F[Payslip dispatch]
  E --> G[pain.001 payment batch]
  E --> H[FIBU transfer]
  E --> I[Behörden-Meldungen<br/>EMA · QST]
  G --> J[camt reconciliation]
  E --> K[Year end:<br/>Lohnausweis · QST-Bescheinigung · ELM Jahresmeldung]
```

## What each part does

<CardGroup cols={2}>
  <Card title="Master data" icon="database" href="/guides/payroll/master-data">
    Lohnarten, Kontenplan, Versicherungen, and the tenant Stammdaten the engine reads.
  </Card>

  <Card title="The monthly run" icon="calendar-days" href="/guides/payroll/monthly-run">
    Open, compute, correct, lock, and dispatch payslips.
  </Card>

  <Card title="Payments and accounting" icon="building-columns" href="/guides/payroll/payments-and-accounting">
    pain.001 batches, camt reconciliation, and the FIBU transfer.
  </Card>

  <Card title="Year end" icon="file-invoice" href="/guides/payroll/year-end">
    Lohnausweis, Quellensteuerbescheinigung, and the Swissdec ELM Jahresmeldung.
  </Card>
</CardGroup>

## Money is never a float

The engine and the earnings builder do all CHF arithmetic in **decimal**, end to end.

This is [ADR-007](/development/adr), and it was not a purity exercise. Floating-point
math produced real, reproducible drift on three paths: hourly rates multiplied across
prorated periods, Quellensteuer tariffs carrying four decimal places, and twelve-month
booking-batch aggregates that no longer reconciled against the cantonal tariff source.
Rounding to rappen at the end does not always recover sub-cent drift accumulated along
the way.

<Warning>
  If you extend the payroll engine, keep decimal arithmetic through the whole chain. Converting to
  `number` anywhere in the middle reintroduces exactly the drift the ADR was written to eliminate.
</Warning>

## Separation of duties

Payroll is where the platform's permission tiers are strictest. The pattern is
consistent: **HR staff can see, administrators can commit.**

| Action                               | `HR_STAFF` | `ADMIN`+ |
| ------------------------------------ | :--------: | :------: |
| View runs, batches, declarations     |      ●     |     ●    |
| Open a run, compute, add corrections |            |     ●    |
| Lock a run                           |            |     ●    |
| Dispatch payslips by e-mail          |            |     ●    |
| Export pain.001 to the bank          |            |     ●    |
| Reconcile camt statements            |            |     ●    |
| Transfer to financial accounting     |            |     ●    |
| Submit a Behörden-Meldung            |            |     ●    |
| Submit the Lohnausweis               |            |     ●    |
| Transmit the ELM Jahresmeldung       |            |     ●    |
| Edit master data                     |            |     ●    |

The reasoning is the same each time: once a payslip is mailed, money has left the
company, or a regulator has the data, corrections become a formal procedure rather than
an edit.

`SYSTEM_ADMIN` has **no** payroll access at all — it is a technical operations role.

## Multi-entity payroll

On installations with multiple Rechtsträger, the legal entity determines the AHV
settlement number, the QST account, the BVG and other insurance contracts, and the
recipient of every declaration. Runs, batches and declarations are scoped to the
entity. See [Legal entities](/concepts/legal-entities).

## Turning payroll off

Installations that keep payroll in another system use Swiss HR Easy for everything up
to the payroll boundary and export instead. The
[bexio integration](/guides/payroll/bexio) and the Lohnbüro export cover that case.
