Add Finland regime#748
Conversation
b8c8646 to
514fb69
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #748 +/- ##
==========================================
+ Coverage 94.75% 94.77% +0.01%
==========================================
Files 343 345 +2
Lines 18815 18894 +79
==========================================
+ Hits 17829 17906 +77
- Misses 600 601 +1
- Partials 386 387 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds a new Finland (FI) tax regime to GOBL, including VAT categories/rates, Y-tunnus (Business ID) validation, invoice requirements, and supporting generated data/examples.
Changes:
- Registered the new
firegime and added FI to the regime-code JSON schema enum. - Implemented FI VAT categories (with historical rates) plus FI-specific validation/normalization (tax identity + invoice requirements) with tests.
- Added FI example invoice documents and generated regime definition data, plus updated contributor guidance and changelog.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
regimes/regimes.go |
Registers the new Finland regime via blank import. |
regimes/fi/fi.go |
Defines FI regime metadata and dispatches validation/normalization. |
regimes/fi/tax_categories.go |
Declares FI VAT categories and historical rate values. |
regimes/fi/tax_identity.go |
Adds Y-tunnus checksum validation logic. |
regimes/fi/invoices.go |
Enforces FI invoice supplier Tax ID requirements. |
regimes/fi/tax_identity_test.go |
Tests for FI tax ID validation and normalization. |
regimes/fi/invoices_test.go |
Tests invoice validation requirement and date-based VAT calculations. |
examples/fi/invoice-fi-fi.yaml |
Adds an FI invoice example input document. |
examples/fi/out/invoice-fi-fi.json |
Adds generated JSON output for the FI example. |
data/schemas/tax/regime-code.json |
Adds "FI" to the schema enum list. |
data/regimes/fi.json |
Adds generated FI regime definition data. |
CONTRIBUTING.md |
Updates regime-addition guidance and references. |
CHANGELOG.md |
Notes the new FI regime addition. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
samlown
left a comment
There was a problem hiding this comment.
Very nice! Not much to change here. We just need to double check the situation with Finish Tax Identities to ensure a VAT ID is required for any invoice.
b7f3cfd to
3364e4c
Compare
|
Thanks for the early review, @samlown, caught me in the middle of some final polish. I've addressed your (and Copilot's) comments and this is now ready for a final review. |
|
Sorry! Too keen :-) I should have waited for the non-draft state! Just let me know when ready. |
|
Since #750 has been approved, I've amended the historic rates definitions so they reflect effective dates. I've also removed |
# Conflicts: # CHANGELOG.md
28c7ddb to
567561d
Compare
|
Hey @samlown, I've updated this branch with master and ported the regime to use validation rules. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 12 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
# Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
Summary
Sources
Pre-Review Checklist
go generate .to ensure that the Schemas and Regime data are up to date.And if you are part of the org: