Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p

### Added

- `regimes/au`: New tax regime for Australia — GST and ABN tax identity validation (weighted modulus-89 checksum).
- `regimes/nz`: New tax regime for New Zealand — GST, IRD number validation (weighted modulus-11 checksum), and te reo Māori (`mi`) translations.
- `bill`: `PaymentDetails.Payer` party — the party responsible for making payment of the invoice if not the customer, the counterpart of the existing `Payee`.

## [v0.501.0] - 2026-06-16
Expand Down
88 changes: 88 additions & 0 deletions data/regimes/au.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"$schema": "https://gobl.org/draft-0/tax/regime-def",
"name": {
"en": "Australia"
},
"description": {
"en": "Australia's Goods and Services Tax (GST) is a broad-based tax of 10%\napplied to most goods, services and other items sold or consumed in\nAustralia. It is administered by the Australian Taxation Office (ATO).\n\nBusinesses are identified by their Australian Business Number (ABN), an\n11-digit identifier whose validity is confirmed with a weighted\nmodulus-89 check."
},
"sources": [
{
"title": {
"en": "ATO - GST"
},
"url": "https://www.ato.gov.au/businesses-and-organisations/gst-excise-and-indirect-taxes/gst"
}
],
"time_zone": "Australia/Sydney",
"country": "AU",
"currency": "AUD",
"tax_scheme": "GST",
"categories": [
{
"code": "GST",
"name": {
"en": "GST"
},
"title": {
"en": "Goods and Services Tax"
},
"keys": [
{
"key": "standard",
"name": {
"en": "Standard"
}
},
{
"key": "zero",
"name": {
"en": "Zero"
}
},
{
"key": "exempt",
"name": {
"en": "Exempt"
},
"no_percent": true
},
{
"key": "outside-scope",
"name": {
"en": "Outside scope"
},
"no_percent": true
}
],
"rates": [
{
"rate": "general",
"keys": [
"standard"
],
"name": {
"en": "Standard Rate"
},
"desc": {
"en": "Applies to most goods and services unless they are GST-free or input-taxed."
},
"values": [
{
"since": "2000-07-01",
"percent": "10.0%"
}
]
}
],
"sources": [
{
"title": {
"en": "ATO - GST"
},
"url": "https://www.ato.gov.au/businesses-and-organisations/gst-excise-and-indirect-taxes/gst"
}
]
}
]
}
94 changes: 94 additions & 0 deletions data/regimes/nz.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"$schema": "https://gobl.org/draft-0/tax/regime-def",
"name": {
"en": "New Zealand",
"mi": "Aotearoa"
},
"description": {
"en": "New Zealand's Goods and Services Tax (GST) is a broad-based tax of 15%\napplied to most goods and services supplied in New Zealand. It is\nadministered by Inland Revenue (IRD).\n\nBusinesses are identified by their IRD number, an 8 or 9 digit\nidentifier whose validity is confirmed with a weighted modulus-11 check."
},
"sources": [
{
"title": {
"en": "Inland Revenue - GST",
"mi": "Te Tari Taake - GST"
},
"url": "https://www.ird.govt.nz/gst"
}
],
"time_zone": "Pacific/Auckland",
"country": "NZ",
"currency": "NZD",
"tax_scheme": "GST",
"categories": [
{
"code": "GST",
"name": {
"en": "GST",
"mi": "GST"
},
"title": {
"en": "Goods and Services Tax",
"mi": "Tāke mō ngā Rawa me ngā Ratonga"
},
"keys": [
{
"key": "standard",
"name": {
"en": "Standard"
}
},
{
"key": "zero",
"name": {
"en": "Zero"
}
},
{
"key": "exempt",
"name": {
"en": "Exempt"
},
"no_percent": true
},
{
"key": "outside-scope",
"name": {
"en": "Outside scope"
},
"no_percent": true
}
],
"rates": [
{
"rate": "general",
"keys": [
"standard"
],
"name": {
"en": "Standard Rate",
"mi": "Pāpātanga Paerewa"
},
"desc": {
"en": "Applies to most goods and services unless they are zero-rated or exempt.",
"mi": "Ka pā ki te nuinga o ngā rawa me ngā ratonga ki te kore rātou e tāke-kore, e tāke-whakawātea rānei."
},
"values": [
{
"since": "2010-10-01",
"percent": "15.0%"
}
]
}
],
"sources": [
{
"title": {
"en": "Inland Revenue - GST rate"
},
"url": "https://www.ird.govt.nz/gst"
}
]
}
]
}
32 changes: 32 additions & 0 deletions data/rules/au.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"id": "GOBL-AU",
"package": "au",
"subsets": [
{
"id": "GOBL-AU-TAX-IDENTITY",
"object": "tax.Identity",
"subsets": [
{
"guard": "code in [AU]",
"subsets": [
{
"field": "code",
"assert": [
{
"id": "GOBL-AU-TAX-IDENTITY-01",
"desc": "invoice tax id code must be a valid 11-digit ABN",
"tests": "matches ^[0-9]{11}$"
},
{
"id": "GOBL-AU-TAX-IDENTITY-02",
"desc": "invoice tax id code checksum must be valid",
"tests": "valid"
}
]
}
]
}
]
}
]
}
32 changes: 32 additions & 0 deletions data/rules/nz.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"id": "GOBL-NZ",
"package": "nz",
"subsets": [
{
"id": "GOBL-NZ-TAX-IDENTITY",
"object": "tax.Identity",
"subsets": [
{
"guard": "code in [NZ]",
"subsets": [
{
"field": "code",
"assert": [
{
"id": "GOBL-NZ-TAX-IDENTITY-01",
"desc": "invoice tax id code must be a valid IRD number",
"tests": "matches ^[0-9]{8,9}$"
},
{
"id": "GOBL-NZ-TAX-IDENTITY-02",
"desc": "invoice tax id code checksum must be valid",
"tests": "valid"
}
]
}
]
}
]
}
]
}
8 changes: 8 additions & 0 deletions data/schemas/tax/regime-code.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
"const": "AT",
"title": "Austria"
},
{
"const": "AU",
"title": "Australia"
},
{
"const": "BE",
"title": "Belgium"
Expand Down Expand Up @@ -85,6 +89,10 @@
"const": "NO",
"title": "Norway"
},
{
"const": "NZ",
"title": "New Zealand"
},
{
"const": "PL",
"title": "Poland"
Expand Down
56 changes: 56 additions & 0 deletions regimes/au/au.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// Package au provides the tax regime definition for Australia.
package au

import (
"github.com/invopop/gobl/cbc"
"github.com/invopop/gobl/currency"
"github.com/invopop/gobl/i18n"
"github.com/invopop/gobl/norm"
"github.com/invopop/gobl/pkg/here"
"github.com/invopop/gobl/rules"
"github.com/invopop/gobl/tax"
)

// CountryCode is the tax country code for Australia.
const CountryCode = "AU"

func init() {
tax.RegisterRegimeDef(New())
rules.Register("au", rules.GOBL.Add(CountryCode),
taxIdentityRules(),
)
norm.Register(
norm.When(tax.IdentityIn(CountryCode), norm.For(normalizeTaxIdentity)),
)
}

// New provides the tax regime definition for Australia.
func New() *tax.RegimeDef {
return &tax.RegimeDef{
Country: CountryCode,
Currency: currency.AUD,
TaxScheme: tax.CategoryGST,
Name: i18n.String{
i18n.EN: "Australia",
},
Description: i18n.String{
i18n.EN: here.Doc(`
Australia's Goods and Services Tax (GST) is a broad-based tax of 10%
applied to most goods, services and other items sold or consumed in
Australia. It is administered by the Australian Taxation Office (ATO).

Businesses are identified by their Australian Business Number (ABN), an
11-digit identifier whose validity is confirmed with a weighted
modulus-89 check.
`),
},
Sources: []*cbc.Source{
{
Title: i18n.NewString("ATO - GST"),
URL: "https://www.ato.gov.au/businesses-and-organisations/gst-excise-and-indirect-taxes/gst",
},
},
TimeZone: "Australia/Sydney",
Categories: taxCategories(),
}
}
49 changes: 49 additions & 0 deletions regimes/au/tax_categories.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package au

import (
"github.com/invopop/gobl/cal"
"github.com/invopop/gobl/cbc"
"github.com/invopop/gobl/i18n"
"github.com/invopop/gobl/num"
"github.com/invopop/gobl/tax"
)

func taxCategories() []*tax.CategoryDef {
return []*tax.CategoryDef{
{
Code: tax.CategoryGST,
Name: i18n.String{
i18n.EN: "GST",
},
Title: i18n.String{
i18n.EN: "Goods and Services Tax",
},
Retained: false,
Keys: tax.GlobalGSTKeys(),
Rates: []*tax.RateDef{
{
Keys: []cbc.Key{tax.KeyStandard},
Rate: tax.RateGeneral,
Name: i18n.String{
i18n.EN: "Standard Rate",
},
Description: i18n.String{
i18n.EN: "Applies to most goods and services unless they are GST-free or input-taxed.",
},
Values: []*tax.RateValueDef{
{
Since: cal.NewDate(2000, 7, 1),
Percent: num.MakePercentage(100, 3),
},
},
},
},
Sources: []*cbc.Source{
{
Title: i18n.NewString("ATO - GST"),
URL: "https://www.ato.gov.au/businesses-and-organisations/gst-excise-and-indirect-taxes/gst",
},
},
},
}
}
Loading
Loading