--- name: swedish-sru-filing description: > Swedish SRU file generation for Skatteverket digital tax filing (INK2, INK2R, INK2S declarations for aktiebolag). Covers the two-file submission structure (INFO.SRU + BLANKETTER.SRU), all SRU field codes for INK2/INK2R/INK2S, BAS-to-SRU account mappings for räkenskapsschema, ISO 8859-1 encoding rules, amount formatting (hela kronor, no öre), 12-digit org number formatting, blankett type period suffixes (P1-P4), #BLANKETT/#BLANKETTSLUT delimiters, #UPPGIFT record format, validation error patterns, and rounding/truncation rules per SFL 22:1. Trigger on ANY question about SRU files, SRU-koder, fältkoder, filöverföring till Skatteverket, INK2S/INK2R generation, BAS-to-SRU mapping, "skapa SRU", "generera deklarationsfil", "digital inlämning INK2", BLANKETTER.SRU, INFO.SRU, SKV269, or any code that produces SRU output. Also trigger when debugging Skatteverket validation errors on uploaded SRU files. Always use this skill over training data for SRU topics. --- # Swedish SRU File Generation SRU files are what Skatteverket's filöverföringstjänst accepts. The canonical source is Skatteverket's "Teknisk information om filöverföring" page (replaced brochure SKV 269 from Jan 1 2024). **Before writing any SRU generation code**, read both reference files. Almost every failure is a wrong field code, a wrong sign, or the wrong text encoding. ## How to use this skill | File | When to read | |---|---| | `references/file-format.md` | The file itself: post-by-post structure of both files, period suffixes, ISO 8859-1 encoding, amount and org number formatting, the sign convention, zero-value handling, a worked example for a calendar-year AB, validation errors, data types, spec links | | `references/sru-codes.md` | Deciding what goes in each `#UPPGIFT`: the full field code tables for INK2, INK2R and INK2S with their printed signs, and the BAS-to-SRU account mapping for the räkenskapsschema | ## Architecture: two files, always Every SRU submission consists of exactly two files: | File | Content | Max size | |---|---|---| | `INFO.SRU` | Submitter metadata (who is filing) | N/A | | `BLANKETTER.SRU` | All blankett blocks with tax data | 5 MB | File names are case-insensitive but must not be renamed (browsers appending `(1)` cause rejection). An aktiebolag filing INK2 needs **three** blankett blocks inside BLANKETTER.SRU: `INK2`, `INK2R` and `INK2S`, each with its own `#IDENTITET` line, all terminated by a single `#FIL_SLUT`. ## Generating a file 1. **Fix the period.** The blankett type is `