regimes: add Australia (AU) and New Zealand (NZ) GST tax regimes - #885
Open
migueltorresvalls wants to merge 1 commit into
Open
regimes: add Australia (AU) and New Zealand (NZ) GST tax regimes#885migueltorresvalls wants to merge 1 commit into
migueltorresvalls wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #885 +/- ##
==========================================
+ Coverage 94.75% 94.80% +0.04%
==========================================
Files 343 349 +6
Lines 18815 19021 +206
==========================================
+ Hits 17829 18033 +204
- Misses 600 601 +1
- Partials 386 387 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
migueltorresvalls
force-pushed
the
au-nz-regime
branch
from
June 30, 2026 17:49
a0ecfcf to
602103f
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds new GST-based tax regimes for Australia (AU) and New Zealand (NZ), including regime definitions, tax categories, tax identity validation/normalization, and regenerated embedded schema/rules/regime data.
Changes:
- Register new AU and NZ regimes and include them in the global regimes registry.
- Implement AU ABN and NZ IRD tax identity validation + normalization, with accompanying tests.
- Regenerate embedded regime/rules data and extend the regime-code JSON schema to include AU and NZ.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| regimes/regimes.go | Registers the AU and NZ regime packages for side-effect initialization. |
| regimes/au/au.go | Defines the AU regime metadata and registers rules + normalization. |
| regimes/au/tax_categories.go | Adds AU GST category and standard 10% rate definition. |
| regimes/au/tax_identity.go | Adds AU ABN format + checksum validation and normalization hook. |
| regimes/au/tax_identity_test.go | Tests AU ABN validation and normalization behavior. |
| regimes/nz/nz.go | Defines the NZ regime metadata (incl. MI name) and registers rules + normalization. |
| regimes/nz/tax_categories.go | Adds NZ GST category and standard 15% rate definition with EN/MI strings. |
| regimes/nz/tax_identity.go | Adds NZ IRD format + checksum validation and normalization hook. |
| regimes/nz/tax_identity_test.go | Tests NZ IRD validation and normalization behavior. |
| data/schemas/tax/regime-code.json | Extends the regime code schema to include AU and NZ. |
| data/rules/au.json | Generated embedded rules for AU tax identity validation. |
| data/rules/nz.json | Generated embedded rules for NZ tax identity validation. |
| data/regimes/au.json | Generated embedded AU regime definition data. |
| data/regimes/nz.json | Generated embedded NZ regime definition data. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+37
to
+45
| // isValidTaxIdentityCode reports whether the value is an ABN with valid check | ||
| // digits. Empty or non-conforming values are left to the format rule above. | ||
| func isValidTaxIdentityCode(value any) bool { | ||
| code, ok := value.(cbc.Code) | ||
| if !ok || code == "" { | ||
| return true | ||
| } | ||
| return validABN(code.String()) | ||
| } |
Comment on lines
+48
to
+57
| // isValidTaxIdentityCode reports whether the value is an IRD number within range | ||
| // and with a valid check digit. Empty or non-conforming values are left to the | ||
| // format rule above. | ||
| func isValidTaxIdentityCode(value any) bool { | ||
| code, ok := value.(cbc.Code) | ||
| if !ok || code == "" { | ||
| return true | ||
| } | ||
| return validIRD(code.String()) | ||
| } |
Comment on lines
8
to
12
| _ "github.com/invopop/gobl/regimes/ae" | ||
| _ "github.com/invopop/gobl/regimes/ar" | ||
| _ "github.com/invopop/gobl/regimes/at" | ||
| _ "github.com/invopop/gobl/regimes/au" | ||
| _ "github.com/invopop/gobl/regimes/be" |
13 tasks
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add GST-based tax regimes for Australia and New Zealand.
Changes:
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: