Why it matters
The legal entity is not a reporting label. It is the employer of record, and it routes every statutory declaration:- AHV/ALV contributions and the AHV-Lohnbescheinigung
- Quellensteuer settlement and the QST-Bescheinigung
- BVG and the other social-insurance contracts
- The Lohnausweis and the Swissdec ELM Jahresmeldung
Off by default
Unlike every other module flag,multi-legal-entity ships disabled. A
single-employer installation keeps one invisible default entity and never sees the
entity-management UI at all. Turn it on per installation with
FEATURE_MULTI_LEGAL_ENTITY=true.
Enabling the flag does not migrate anything. Existing records stay on the default entity until you
deliberately assign them.
Permissions
Read scope vs. write scope
This distinction matters if you are building on the platform.- Reads may use the ambient resolver,
getCurrentLegalEntityId(). It answers “which entity is this user currently looking at?”. - Writes must never use it. Every write persists an explicit, tenant-validated
legalEntityId, resolved throughresolveWriteLegalEntityfrom the legal-entity module contract (or an equivalent tenant-scoped, active-entity lookup).