Skip to content

regimes: add Iceland (IS) tax regime - #888

Open
smoltuna wants to merge 6 commits into
invopop:mainfrom
smoltuna:feat/is-regime
Open

regimes: add Iceland (IS) tax regime#888
smoltuna wants to merge 6 commits into
invopop:mainfrom
smoltuna:feat/is-regime

Conversation

@smoltuna

@smoltuna smoltuna commented Jul 1, 2026

Copy link
Copy Markdown

Adds Iceland (IS) as a new tax regime, modelled on the recently merged Norway (regimes/no) and mirroring recent patterns from PR #885 (AU/NZ).

Iceland was picked from countries not already in the repo or being added by other open PRs, for its manageable scope, English-language primary sources, and the goal of producing a first regime that is small and easy to review. Happy to adjust anything that doesn't quite fit the project's standards.

VAT is called Virðisaukaskattur (VSK) in Iceland. Iceland's Kennitala is a single 10-digit ID number issued by Þjóðskrá Íslands for both individuals and legal entities; for domestic VAT registrants it also serves as the VSK number.

  • VAT category at 24% standard + 11% reduced, with historical rate values back to Iceland's VAT introduction (22% in 1990). Zero-rated and exempt supplies via tax.KeyZero / tax.KeyExempt from tax.GlobalVATKeys() — no dedicated RateDef.
  • Kennitala mod-11 validator on the 10-digit form (positions 0–5 = DDMMYY birth/registration date, 6–7 random, 8 check digit, 9 century marker). The check-digit algorithm on positions 0–7 is identical to Norway's organisasjonsnummer — same weights [3, 2, 7, 6, 5, 4, 3, 2], same case analysis (remainder 0 → check 0; remainder 1 → never issued). Only the container differs (10 digits with date-encoded positions).

Kennitala and VSK. A compliant Icelandic invoice from a VAT-registered seller carries the seller's and the buyer's Kennitala and the seller's VSK number (invoicedataextraction, Skatturinn), but Skatturinn does not issue a separate VSK number to domestic registrants — the Kennitala is the VSK number, and the "VSK" label is assigned upon VAT registration (LookupTax). When used in international contexts the ISO country prefix is added to the Kennitala (e.g. IS5012031230).

  • The regime validates Kennitala as the party's tax identity (since it's also the VSK number); framework normalization strips the ISO country prefix, whitespace and separators. Foreign entities registered for Icelandic VAT may receive a distinct VSK number; that variant is not covered here.
  • Icelandic (is) translations on the regime, tax category, rate names and descriptions.
  • Two example invoices demonstrating the standard rate and the reduced rate.
  • Sub-threshold suppliers. Iceland does not mandate VAT registration below the 2,000,000 ISK / 12-month turnover threshold. The regime provides validation when a tax identity is present but does not enforce presence: an empty code passes.

Out of scope

  • PEPPOL BIS 3.0 / TS-236 e-invoicing. Iceland's B2G mandate (in force since January 2020) shares the EN 16931 semantic model already covered by the existing addons/eu/en16931; the Icelandic profile would sit in a future addons/is/peppol.
  • Simplified invoices Not implemented to keep the initial scope small; recent regime PRs suggest simplified-invoice support may be requested before merge, following the NO Add Norway (NO) tax regime #728 pattern.

Sources

Pre-Review Checklist

  • Opened this PR as a draft
  • Read the CONTRIBUTING.md guide.
  • Performed a self-review of my code.
  • Added thorough tests with at least 90% code coverage. (95.8% on regimes/is/)
  • Modified or created example GOBL documents to show my changes in use, if appropriate.
  • Added links to the source of the changes in tax regimes or addons, either structured or in the comments.
  • Run go generate . to ensure that the Schemas and Regime data are up to date.
  • Reviewed and fixed all linter warnings.
  • Been obsessive with pointer nil checks to avoid panics.
  • Updated the CHANGELOG.md with an overview of my changes.
  • Marked this PR as ready for review.

And if you are part of the org:

  • Requested a review from Copilot and fixed or dismissed (with a reason) all the feedback raised.
  • Requested a review from @samlown.

@smoltuna
smoltuna marked this pull request as ready for review July 1, 2026 20:41
Copilot AI review requested due to automatic review settings July 1, 2026 20:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Iceland (IS) as a new tax regime to GOBL, including VAT category/rates, Kennitala (tax identity) validation + normalization hooks, generated embedded regime/rules/schema updates, and example invoices.

Changes:

  • Register the IS regime and provide its tax.RegimeDef (VAT @ 24%/11% with historical values and sources).
  • Add Kennitala (10-digit, mod-11) tax identity validation rules and normalization, with unit tests.
  • Add Iceland invoice examples (YAML inputs + generated envelope JSON outputs) and regenerate embedded regime/rule/schema data; update the changelog.

Reviewed changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
regimes/regimes.go Registers the new IS regime package for side-effect init.
regimes/is/is.go Defines and registers the Iceland regime (currency, VAT scheme, timezone, sources).
regimes/is/tax_categories.go Defines Iceland VAT category with standard/reduced rates and history.
regimes/is/tax_identity.go Adds Kennitala validation + normalization wiring for tax.Identity.
regimes/is/tax_identity_test.go Tests Kennitala validation and normalization behavior.
examples/is/invoice-is-standard.yaml Standard-rate Iceland invoice example (authoring input).
examples/is/invoice-is-reduced.yaml Reduced-rate Iceland invoice example (authoring input).
examples/is/out/invoice-is-standard.json Generated envelope output for the standard example.
examples/is/out/invoice-is-reduced.json Generated envelope output for the reduced example.
data/schemas/tax/regime-code.json Adds IS to the regime-code JSON schema enum.
data/rules/is.json Generated rules export for Iceland tax identity validation.
data/regimes/is.json Generated embedded regime definition export for Iceland.
CHANGELOG.md Notes the new Iceland regime addition in the unreleased section.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread regimes/is/tax_identity.go
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 2, 2026 10:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 13 changed files in this pull request and generated 1 comment.

Comment thread regimes/is/tax_identity.go
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 2, 2026 11:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 13 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings July 2, 2026 11:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 13 changed files in this pull request and generated 1 comment.

Comment thread regimes/is/tax_identity.go
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 2, 2026 11:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@samlown samlown added the regime Related to a specific regime. label Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

regime Related to a specific regime.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants