Skip to content

Commit

Permalink
Updating schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
samlown committed Mar 14, 2024
1 parent 57c8188 commit a9901d1
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 60 deletions.
2 changes: 2 additions & 0 deletions data/schemas/bill/invoice.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,13 @@
},
"series": {
"type": "string",
"pattern": "^([A-Za-z0-9][A-Za-z0-9 /\\._-]?)*[A-Za-z0-9]$",
"title": "Series",
"description": "Used as a prefix to group codes."
},
"code": {
"type": "string",
"pattern": "^([A-Za-z0-9][A-Za-z0-9 /\\._-]?)*[A-Za-z0-9]$",
"title": "Code",
"description": "Sequential code used to identify this invoice in tax declarations."
},
Expand Down
5 changes: 0 additions & 5 deletions data/schemas/tax/identity.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
"title": "Country Code",
"description": "ISO country code for Where the tax identity was issued."
},
"zone": {
"$ref": "https://gobl.org/draft-0/l10n/code",
"title": "Zone Code",
"description": "Where inside the country the tax identity holder is based for tax purposes\nlike a village, town, district, city, county, state or province. For some\nareas, this could be a regular post or zip code. See the regime packages\nfor specific validation rules."
},
"type": {
"$ref": "https://gobl.org/draft-0/cbc/key",
"title": "Type",
Expand Down
66 changes: 15 additions & 51 deletions data/schemas/tax/regime.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@
"$ref": "https://gobl.org/draft-0/i18n/string",
"title": "Description",
"description": "Description offering more details about when the code should be used."
},
"meta": {
"$ref": "https://gobl.org/draft-0/cbc/meta",
"title": "Meta",
"description": "Meta defines any additional details that may be useful or associated\nwith the code."
}
},
"type": "object",
Expand Down Expand Up @@ -177,9 +182,14 @@
"title": "Keys",
"description": "Keys is used instead of codes to define a further sub-set of keys that\ncan be used alongside this one."
},
"pattern": {
"type": "string",
"title": "Pattern",
"description": "Pattern is used to validate the key value instead of using a fixed value\nfrom the code or key definitions."
},
"map": {
"$ref": "https://gobl.org/draft-0/cbc/code-map",
"title": "Map",
"title": "Code Map",
"description": "Map helps map local keys to specific codes, useful for converting the\ndescribed key into a local code."
}
},
Expand Down Expand Up @@ -248,13 +258,13 @@
},
"RateValue": {
"properties": {
"zones": {
"tags": {
"items": {
"$ref": "https://gobl.org/draft-0/l10n/code"
"$ref": "https://gobl.org/draft-0/cbc/key"
},
"type": "array",
"title": "Zones",
"description": "Only use this value if one of the zones matches."
"title": "Tags",
"description": "Only apply this rate if one of the tags is present in the invoice."
},
"since": {
"$ref": "https://gobl.org/draft-0/cal/date",
Expand Down Expand Up @@ -385,13 +395,6 @@
"type": "array",
"title": "Categories",
"description": "List of tax categories."
},
"zones": {
"items": {
"$ref": "#/$defs/Zone"
},
"type": "array",
"description": "List of zones to identify specific areas, regions, or provinces inside a country\ntha may be required for tax purposes."
}
},
"type": "object",
Expand Down Expand Up @@ -488,45 +491,6 @@
"url"
],
"description": "Source describes where the information for the taxes comes from."
},
"Zone": {
"properties": {
"code": {
"$ref": "https://gobl.org/draft-0/l10n/code",
"title": "Code",
"description": "Unique zone code."
},
"name": {
"$ref": "https://gobl.org/draft-0/i18n/string",
"title": "Name",
"description": "Name of the zone to be use if a locality or region is not applicable."
},
"locality": {
"$ref": "https://gobl.org/draft-0/i18n/string",
"title": "Locality",
"description": "Village, town, district, or city name which should coincide with\naddress data."
},
"region": {
"$ref": "https://gobl.org/draft-0/i18n/string",
"title": "Region",
"description": "Province, county, or state which should match address data."
},
"codes": {
"$ref": "https://gobl.org/draft-0/cbc/code-map",
"title": "Codes",
"description": "Codes defines a set of regime specific code mappings."
},
"meta": {
"$ref": "https://gobl.org/draft-0/cbc/meta",
"title": "Meta",
"description": "Any additional information"
}
},
"type": "object",
"required": [
"code"
],
"description": "Zone represents an area inside a country, like a province or a state, which shares the basic definitions of the country, but may vary in some validation rules."
}
},
"$comment": "Generated with GOBL v0.68.0"
Expand Down
9 changes: 5 additions & 4 deletions regimes/co/examples/simple.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"name": "EXAMPLE SUPPLIER S.A.S.",
"tax_id": {
"country": "CO",
"code": "9014514812",
"zone": "11001"
"code": "9014514812"
},
"ext": {
"co-dian-municipality": "11001"
Expand All @@ -27,8 +26,10 @@
"name": "EXAMPLE CUSTOMER S.A.S.",
"tax_id": {
"country": "CO",
"code": "9014514805",
"zone": "11001"
"code": "9014514805"
},
"ext": {
"co-dian-municipality": "11001"
},
"addresses": [
{
Expand Down

0 comments on commit a9901d1

Please sign in to comment.