Skip to content

Add Chile (CL) tax regime#1

Draft
AdrianArencibia wants to merge 12 commits intomainfrom
chile-regime
Draft

Add Chile (CL) tax regime#1
AdrianArencibia wants to merge 12 commits intomainfrom
chile-regime

Conversation

@AdrianArencibia
Copy link
Owner

@AdrianArencibia AdrianArencibia commented Feb 21, 2026

Adds a new Chile (CL) tax regime, including VAT (IVA) metadata and Chilean RUT tax identity normalization/validation, plus generated regime data and example documents.

Changes

  • Register new CL regime and add its regime definition (timezone, currency, VAT category/rate).
  • Implement RUT normalization + Modulo 11 check-digit validation with tests.
  • Add generated regime JSON/schema updates and Chile invoice examples/docs.

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.
  • 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.
  • Requested a review from Copilot and fixed or dismissed (with a reason) all the feedback raised.

Only after checking off all the previous items:

  • Marked this PR as ready for review and requested one from @samlown.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new Chile (CL) tax regime to GOBL, including VAT (IVA) metadata and Chilean RUT tax identity normalization/validation, plus generated regime data and example documents.

Changes:

  • Register new CL regime and add its regime definition (timezone, currency, VAT category/rate).
  • Implement RUT normalization + Modulo 11 check-digit validation with tests.
  • Add generated regime JSON/schema updates and Chile invoice examples/docs.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
regimes/regimes.go Registers the cl regime package via blank import.
regimes/cl/cl.go Defines the Chile regime (currency, VAT scheme, timezone) and hooks validator/normalizer.
regimes/cl/tax_identity.go Implements RUT format validation + Modulo 11 check digit calculation and identity normalization.
regimes/cl/tax_identity_test.go Adds tests for normalization, validation, and nil/unsupported inputs.
regimes/cl/tax_categories.go Adds IVA (VAT) category definition and standard 19% rate since 2003-10-01.
regimes/cl/README.md Documents IVA, RUT format, and e-invoicing background for Chile regime.
examples/cl/invoice-standard.json Adds a Chile invoice input example using CLP and CL tax IDs.
examples/cl/out/invoice-standard.json Adds the generated output envelope for the example invoice.
data/schemas/tax/regime-code.json Adds CL to the allowed regime codes schema.
data/regimes/cl.json Adds generated serialized Chile regime definition.
CHANGELOG.md Notes the addition of the Chile regime under Unreleased.

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

Copy link

Copilot AI left a comment

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 10 out of 11 changed files in this pull request and generated 2 comments.


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

Copy link

Copilot AI left a comment

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 10 out of 11 changed files in this pull request and generated 2 comments.


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

Copy link

Copilot AI left a comment

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 10 out of 11 changed files in this pull request and generated 2 comments.


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

Copy link

Copilot AI left a comment

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 13 out of 16 changed files in this pull request and generated 3 comments.


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

Copy link

Copilot AI left a comment

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 13 out of 16 changed files in this pull request and generated 1 comment.


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

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.

2 participants