Files
accounted/registry/entries/swedish-sru-filing.mdx
T
3d1ed15b6d feat(registry): move community registry source of truth into the public repo (#1458)
* feat(registry): move community registry source of truth into the public repo

The site's registry page says "Lägg till en egen" and links here, but the
MDX entries lived in the private website repo, so an external contributor
had no path to open the PR we were inviting (found by the first person who
tried). This makes the invitation real:

- registry/entries/ + registry/authors/ hold the 20 existing entries and
  2 author profiles, migrated verbatim from the website repo, which now
  syncs FROM this directory instead of owning the content
- registry/README.md documents the frontmatter convention and the flow
- scripts/validate-registry.ts (npm run validate:registry, wired into
  core-build) checks structure and rejects JSX/import/export in bodies:
  the site renders entries through MDX, which would execute those inside
  the website build
- CONTRIBUTING.md points at the registry for listing community work

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com>

* fix(registry): close MDX-safety gaps and correct six compliance claims from PR review

Review bot findings on #1458, both verified and addressed:

- The body safety gate only rejected capitalized JSX tags, but MDX also
  evaluates lowercase HTML tags (<div>, <img onerror=...>) and bare {...}
  expressions. The validator now rejects any raw tag and any brace outside
  fenced code and backtick inline code; literal tags in prose go in
  backticks. Verified: a crafted entry with all three bypasses fails, all
  existing content still passes.
- Six factual errors in migrated entries, each checked against the skill
  sources in .claude/skills/ before editing (these were live on the site
  already): traktamente 2026 is 300 kr not 260; employer contributions for
  66+ at year start (67+ from 2026) are 10.21% not "65+: 16.36%", and the
  under-18 0% claim is replaced with the documented 18-22 youth reduction;
  electronics reverse-charge threshold is 100 000 kr excl VAT per invoice
  not 250 000; half prisbasbelopp 2026 is 29 600 not 24 750; kostnadsställe
  is SIE dimension 1 not 7; SRU period suffixes encode the fiscal-year end
  range (P1 jan-apr, P2 maj-aug, P4 sep-dec) not fixed months.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com>

---------

Signed-off-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com>
Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 10:54:09 +02:00

55 lines
3.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "swedish-sru-filing — SRU-filer för INK2-inlämning till Skatteverket"
description: "SKILL.md för SRU-filgenerering. Två-filsstruktur INFO.SRU + BLANKETTER.SRU, SRU-fältkoder för INK2/INK2R/INK2S, BAS-till-SRU-kontomappning för räkenskapsschema, ISO 8859-1-encoding, beloppsformatering (hela kronor, inga öre), 12-siffrigt organisationsnummer, blankett-perioder (P1–P4), #BLANKETT/#BLANKETTSLUT, #UPPGIFT."
slug: "swedish-sru-filing"
kind: "skill"
author: "erp-mafia"
status: "live"
lang: "sv"
personas: ["developer", "byra", "finance"]
publishedAt: "2026-05-12"
updatedAt: "2026-08-08"
repoUrl: "https://github.com/erp-mafia/swedish-accounting-skills/tree/main/.claude/skills/swedish-sru-filing"
externalUrl: "https://github.com/erp-mafia/swedish-accounting-skills"
version: "community"
ogImageEyebrow: "Skill"
faq:
- q: "Vad är skillnaden mellan SRU och SIE?"
a: "SIE är bokföringssystemets eget exportformat (verifikat, balanser). SRU är Skatteverkets inlämningsformat för deklarationsblanketter (INK2, INK2R, INK2S). En SRU-fil innehåller fältvärden mappade mot specifika rader på blanketterna, inte huvudbokens kontosaldon direkt. BAS-konton mappas via SRU-koder."
- q: "Varför två filer (INFO.SRU + BLANKETTER.SRU)?"
a: "Skatteverket vill ha metadata separat från data. INFO.SRU innehåller deklarationsperiod, organisationsnummer, kontaktuppgifter. BLANKETTER.SRU innehåller själva fältvärdena per blankett. Båda filerna laddas upp samtidigt i Skatteverkets e-tjänst SKV269."
- q: "Vad händer om validering misslyckas?"
a: "Skatteverket returnerar fel-koder. Vanligaste: 'Felaktig encoding' (ska vara ISO 8859-1, inte UTF-8), 'Ogiltigt belopp' (öre inkluderade — ska vara hela kronor), 'Felaktigt organisationsnummer' (måste vara 12 siffror utan bindestreck). Skillen täcker varje vanlig felmodell."
---
## Vad skillen täcker
* Två-filsstruktur: INFO.SRU (deklarationsmetadata) + BLANKETTER.SRU (fältdata).
* SRU-fältkoder för INK2, INK2R, INK2S.
* BAS-till-SRU-mappning för räkenskapsschemat i INK2R.
* ISO 8859-1-encoding (inte UTF-8).
* Beloppsformatering: hela kronor, ingen decimal, inga tusentalsavgränsare.
* 12-siffrigt organisationsnummer utan bindestreck eller mellanslag.
* Blankett-perioder efter räkenskapsårets slutmånad: P1 (jan-apr), P2 (maj-aug), P4 (sep-dec, kalenderår), P3 (specialfall).
* Recordstruktur: #BLANKETT, #UPPGIFT, #BLANKETTSLUT, blank rad mellan blanketter.
* Avrundnings- och truncerings-regler per SFL 22:1 (skatteförfarandelagen).
* Validerings-felmönster och hur man undviker dem.
* SKV269 (Skatteverkets e-tjänst för SRU-upload).
## Installera
```bash
git clone https://github.com/erp-mafia/swedish-accounting-skills.git
cd swedish-accounting-skills
claude
```
## Pairs med
* [swedish-financial-reporting](/community/registry/swedish-financial-reporting) — INK2-fältvärdena som SRU-filen rapporterar.
* [swedish-year-end-closing](/community/registry/swedish-year-end-closing) — bokslutet som genererar siffrorna SRU-filen rapporterar.
## Licens
MIT.