Skip to content

Add Luxembourg (LU) tax regime - #918

Open
nietoarranz wants to merge 2 commits into
invopop:mainfrom
nietoarranz:feat/regime-lu
Open

Add Luxembourg (LU) tax regime#918
nietoarranz wants to merge 2 commits into
invopop:mainfrom
nietoarranz:feat/regime-lu

Conversation

@nietoarranz

@nietoarranz nietoarranz commented Aug 4, 2026

Copy link
Copy Markdown

Summary

Adds a Luxembourg (LU) tax regime so GOBL can build and validate Luxembourg invoices with local VAT rates and n° TVA identity checks.

Included

  • Regime definition (EUR, Europe/Luxembourg, credit-note corrections)
  • VAT categories/rates: general 17%, intermediate 14%, reduced 8%, super-reduced 3%, plus the temporary one-point reductions that applied in 2023
  • Tax identity validation: 8 digits with mod-89 check digits (after standard identity normalization)
  • Regime JSON data, package registration, and a sample LU→LU invoice

Design notes

  • Followed the same shape as other lightweight EU regimes (definition + categories + identity rules/normalization), using the current rules / norm packages rather than older validate hooks.
  • Checksum algorithm taken from the well-known stdnum LU TVA reference; rates and background from AED / Guichet.lu sources linked in the regime definition.
  • Identity tests cover valid numbers, bad checksums, length, and non-digit input. Validation runs on the code as stored (post-normalization), so values with separators fail as expected unless normalized first.

Intentionally out of scope

  • No Luxembourg-specific org identities or invoice-level regime rules yet (neighbors like BE/NL go further here; happy to add if useful).
  • No PEPPOL / B2G addon wiring — the description notes that e-invoicing exists nationally, but this PR only covers the tax regime baseline.
  • Corrections limited to credit notes (no debit notes / other correction types) until we have a clear local requirement.
  • Historical VAT rates start from 2015; earlier periods were not researched for this first pass.

Feedback welcome on whether identity coverage, rate history, or invoice rules should be expanded before merge.

Test plan

  • go test ./regimes/lu/...
  • Confirm data/regimes/lu.json matches the Go regime definition
  • Build/validate examples/lu/invoice-lu-lu.yaml
  • Spot-check rate resolution around the 2023 temporary rates vs current (2024+) rates

nietoarranz and others added 2 commits August 4, 2026 13:36
Introduce VAT rates, TVA identity validation with checksum, and a sample invoice for Luxembourg.

Co-authored-by: Cursor <cursoragent@cursor.com>
Include the missing rules file, regime-code schema entry, and corrected AED source URL so generate output stays committed.

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.36145% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.88%. Comparing base (510a545) to head (2ead7a7).
⚠️ Report is 38 commits behind head on main.

Files with missing lines Patch % Lines
regimes/lu/tax_identity.go 75.00% 4 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #918      +/-   ##
==========================================
- Coverage   94.90%   94.88%   -0.03%     
==========================================
  Files         323      325       +2     
  Lines       17639    17722      +83     
==========================================
+ Hits        16741    16816      +75     
- Misses        556      560       +4     
- Partials      342      346       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant