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

# Year end

> Lohnausweis, Quellensteuerbescheinigung, the Swissdec ELM Jahresmeldung, and AHV splitting.

Year end produces the documents employees need for their tax return and the
declarations insurers and authorities need for the year just closed.

## Lohnausweis

The salary certificate every employee receives and files with their tax return. It is
generated from the year's payroll line items, mapped through the Lohnart catalog into
the certificate's fields.

<Steps>
  <Step title="Generate">Produced per employee from the locked runs of the year.</Step>

  <Step title="Complete the Angaben">
    Some fields need human input — expense arrangements, company car, further-education
    contributions. Editable by `HR_STAFF`+ (`tenant:lohnausweis:edit`).
  </Step>

  <Step title="Submit">
    `ADMIN`+ only (`tenant:lohnausweis:submit`). Flips `DRAFT` to `SUBMITTED` and locks the
    certificate — the Originalmeldung becomes immutable, and a later change is a corrected
    certificate, not an edit.
  </Step>
</Steps>

The Lohnausweis carries a **2D barcode** encoding its data for the tax administration.
The platform implements the official swissdec specification for it, and the reference
artefacts are committed in the repository verbatim so the barcode contract cannot drift.

## Quellensteuerbescheinigung

A separate annual document for employees taxed at source, recording what was withheld
over the year. Viewing is `HR_STAFF`+ so the payroll team can see what has been
produced; **generating** is `ADMIN`+, because the output is the employee's tax record.

## Swissdec ELM Jahresmeldung

The year-end electronic declaration to insurers and authorities, transmitted over the
Swissdec ELM standard.

The interface is a carrier grid — the recipients across the categories that must be
declared. Per carrier:

| Step   | Permission                                | Effect                                          |
| ------ | ----------------------------------------- | ----------------------------------------------- |
| View   | `tenant:jahresmeldung:view` (`HR_STAFF`+) | See the grid and prior submissions.             |
| Draft  | `tenant:jahresmeldung:edit` (`HR_STAFF`+) | Create and prepare a declaration.               |
| Submit | `tenant:jahresmeldung:submit` (`ADMIN`+)  | `DRAFT` → `TRANSMITTED`, sent to the recipient. |

<Warning>
  Submission goes to the **production** endpoint unless the declaration is explicitly marked as a
  test. Once a production submission lands at the Empfänger, corrections become formal procedures.
  Use test mode for your first declaration of any new carrier.
</Warning>

The transmitter contract — the XSD, WSDL and sample messages — is committed verbatim in
the repository as the authoritative specification.

## AHV splitting

Occasionally a year-to-date AHV wage goes **negative** — typically after a large
retroactive correction — and the amount has to be distributed manually across multiple
contribution years.

The split feeds the AHV-Lohnbescheinigung, so it is `HR_STAFF`+ to view but `ADMIN`+ to
edit: a staffer can see how a split was made but cannot file one.

## Year-end sequence

<Steps>
  <Step title="Close December">
    Lock the December run. Everything downstream reads locked runs only.
  </Step>

  <Step title="Reconcile the year">
    Compare the Lohnkonten aggregates against the FIBU postings and the monthly declarations.
    Discrepancies are far cheaper to find now than after submission.
  </Step>

  <Step title="Resolve AHV splits">
    Any negative YTD AHV wage must be distributed before the Lohnbescheinigung.
  </Step>

  <Step title="Generate and check the Lohnausweise">
    Review a sample against the payslips before submitting anything.
  </Step>

  <Step title="Generate the QST-Bescheinigungen" />

  <Step title="Transmit the ELM Jahresmeldung per carrier" />

  <Step title="Distribute to employees">
    The Lohnausweis reaches the employee through the portal and by e-mail.
  </Step>
</Steps>

<Note>
  Year end is the point at which a whole year of master-data decisions becomes visible. If a Lohnart
  was flagged wrong in February, the Lohnausweis is where it shows up. The reconciliation step
  exists to catch that before submission.
</Note>
