Skip to content

Commit a2dac5b

Browse files
authored
Merge pull request #287 from invopop/release-0.76
Release 0.76
2 parents 7a07577 + be6c706 commit a2dac5b

File tree

14 files changed

+289
-30
lines changed

14 files changed

+289
-30
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ All notable changes to GOBL will be documented in this file.
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). See also the [GOBL versions](https://docs.gobl.org/overview/versions) documentation site for more details.
66

7-
## [vX.XX.X] - XXXX-XX-XX
7+
## [v0.76.0] - 2024-05-13
88

99
Finally, invoice multi-currency support! It's been a very long time coming, but we've finalized the details on how to handle currency conversion in invoices and potentially other documents.
1010

@@ -14,6 +14,7 @@ Finally, invoice multi-currency support! It's been a very long time coming, but
1414
- Automatic conversion of invoice line item prices into invoice currency based on exchange rates defined in invoice if no alternative prices provided.
1515
- If an invoice has a currency that is different from that of the tax regime, a validation rule ensures that an exchange rate is defined.
1616
- `currency.Amount` - new model that combines a currency with an amount.
17+
- BE: added Belgium regime.
1718

1819
### Changed
1920

data/regimes/be.json

+164
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
{
2+
"$schema": "https://gobl.org/draft-0/tax/regime",
3+
"name": {
4+
"en": "Belgium"
5+
},
6+
"time_zone": "Europe/Brussels",
7+
"country": "BE",
8+
"currency": "EUR",
9+
"tags": [
10+
{
11+
"key": "simplified",
12+
"name": {
13+
"de": "Vereinfachte Rechnung",
14+
"en": "Simplified Invoice",
15+
"es": "Factura Simplificada",
16+
"it": "Fattura Semplificata"
17+
},
18+
"desc": {
19+
"de": "Wird für B2C-Transaktionen verwendet, wenn die Kundendaten nicht verfügbar sind. Bitte wenden Sie sich an die örtlichen Behörden, um die Grenzwerte zu ermitteln.",
20+
"en": "Used for B2C transactions when the client details are not available, check with local authorities for limits.",
21+
"es": "Usado para transacciones B2C cuando los detalles del cliente no están disponibles, consulte con las autoridades locales para los límites.",
22+
"it": "Utilizzato per le transazioni B2C quando i dettagli del cliente non sono disponibili, controllare con le autorità locali per i limiti."
23+
}
24+
},
25+
{
26+
"key": "reverse-charge",
27+
"name": {
28+
"de": "Umkehr der Steuerschuld",
29+
"en": "Reverse Charge",
30+
"es": "Inversión del Sujeto Pasivo",
31+
"it": "Inversione del soggetto passivo"
32+
}
33+
},
34+
{
35+
"key": "self-billed",
36+
"name": {
37+
"de": "Rechnung durch den Leistungsempfänger",
38+
"en": "Self-billed",
39+
"es": "Facturación por el destinatario",
40+
"it": "Autofattura"
41+
}
42+
},
43+
{
44+
"key": "customer-rates",
45+
"name": {
46+
"de": "Kundensätze",
47+
"en": "Customer rates",
48+
"es": "Tarifas aplicables al destinatario",
49+
"it": "Aliquote applicabili al destinatario"
50+
}
51+
},
52+
{
53+
"key": "partial",
54+
"name": {
55+
"de": "Teilweise",
56+
"en": "Partial",
57+
"es": "Parcial",
58+
"it": "Parziale"
59+
}
60+
}
61+
],
62+
"scenarios": [
63+
{
64+
"schema": "bill/invoice",
65+
"list": [
66+
{
67+
"tags": [
68+
"reverse-charge"
69+
],
70+
"note": {
71+
"key": "legal",
72+
"src": "reverse-charge",
73+
"text": "Reverse charge: Customer to account for VAT to the relevant tax authority."
74+
}
75+
}
76+
]
77+
}
78+
],
79+
"corrections": [
80+
{
81+
"schema": "bill/invoice",
82+
"types": [
83+
"credit-note"
84+
]
85+
}
86+
],
87+
"categories": [
88+
{
89+
"code": "VAT",
90+
"name": {
91+
"en": "VAT"
92+
},
93+
"title": {
94+
"en": "Value Added Tax"
95+
},
96+
"rates": [
97+
{
98+
"key": "standard",
99+
"name": {
100+
"de": "Standardsatz",
101+
"en": "Standard Rate",
102+
"fr": "Taux standard",
103+
"nl": "Standaardtarief"
104+
},
105+
"values": [
106+
{
107+
"since": "2011-01-04",
108+
"percent": "21.0%"
109+
}
110+
]
111+
},
112+
{
113+
"key": "intermediate",
114+
"name": {
115+
"de": "Mittlerer Satz",
116+
"en": "Intermediate Rate",
117+
"fr": "Taux intermédiaire",
118+
"nl": "Tussentarief"
119+
},
120+
"values": [
121+
{
122+
"since": "2011-01-01",
123+
"percent": "12.0%"
124+
}
125+
]
126+
},
127+
{
128+
"key": "reduced",
129+
"name": {
130+
"de": "Ermäßigter Satz",
131+
"en": "Reduced Rate",
132+
"fr": "Taux réduit",
133+
"nl": "Verlaagd Tarief"
134+
},
135+
"values": [
136+
{
137+
"since": "2011-01-04",
138+
"percent": "6.0%"
139+
}
140+
]
141+
},
142+
{
143+
"key": "zero",
144+
"name": {
145+
"en": "Zero Rate"
146+
},
147+
"values": [
148+
{
149+
"percent": "0.0%"
150+
}
151+
]
152+
}
153+
],
154+
"sources": [
155+
{
156+
"title": {
157+
"en": "VAT rates | FPS Finance"
158+
},
159+
"url": "https://finance.belgium.be/en/enterprises/vat/vat-obligation/rates-and-calculation/vat-rates#q1"
160+
}
161+
]
162+
}
163+
]
164+
}

data/regimes/es.json

+28-9
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@
398398
"es": "Código de Exención de TicketBAI"
399399
},
400400
"desc": {
401-
"en": "Codes used by TicketBAI for both \"exempt\" and \"not-subject\"\ntransactions. In the TicketBAI format these are separated,\nbut in order to simplify GOBL and be more closely aligned with\nother countries we've combined them into one."
401+
"en": "Codes used by TicketBAI for both \"exempt\", \"not-subject\", and reverse\ncharge transactions. In the TicketBAI format these are separated,\nbut in order to simplify GOBL and be more closely aligned with\nother countries we've combined them into one."
402402
},
403403
"codes": [
404404
{
@@ -446,15 +446,36 @@
446446
{
447447
"code": "OT",
448448
"name": {
449-
"en": "Not subject: pursuant to Article 7 of the VAT Law. Other cases of non-subject.",
450-
"es": "No sujeto: por el artículo 7 de la Ley del IVA. Otros supuestos de no sujeción."
449+
"en": "Not subject: pursuant to Article 7 of the VAT Law - other cases of non-subject",
450+
"es": "No sujeto: por el artículo 7 de la Ley del IVA - otros supuestos de no sujeción"
451451
}
452452
},
453453
{
454454
"code": "RL",
455455
"name": {
456-
"en": "Not subject: pursuant to localization rules.",
457-
"es": "No sujeto: por reglas de localización."
456+
"en": "Not subject: pursuant to localization rules",
457+
"es": "No sujeto: por reglas de localización"
458+
}
459+
},
460+
{
461+
"code": "VT",
462+
"name": {
463+
"en": "Not subject: sales made on behalf of third parties (amount not computable for VAT or IRPF purposes)",
464+
"es": "No sujeto: ventas realizadas por cuenta de terceros (importe no computable a efectos de IVA ni de IRPF)"
465+
}
466+
},
467+
{
468+
"code": "IE",
469+
"name": {
470+
"en": "Not subject in the TAI due to localization rules, but foreign tax, IPS/IGIC or VAT from another EU member state is passed on",
471+
"es": "No sujeto en el TAI por reglas de localización, pero repercute impuesto extranjero, IPS/IGIC o IVA de otro estado miembro UE"
472+
}
473+
},
474+
{
475+
"code": "S2",
476+
"name": {
477+
"en": "Subject and not exempt: with reverse charge",
478+
"es": "Sujeto y no exenta: con inversión del sujeto pasivo"
458479
}
459480
}
460481
]
@@ -721,9 +742,6 @@
721742
"en": "Zero Rate",
722743
"es": "Tipo Cero"
723744
},
724-
"desc": {
725-
"en": "May be applied to exports and intra-community supplies."
726-
},
727745
"values": [
728746
{
729747
"percent": "0.0%"
@@ -862,7 +880,8 @@
862880
}
863881
],
864882
"extensions": [
865-
"es-tbai-product"
883+
"es-tbai-product",
884+
"es-tbai-exemption"
866885
],
867886
"map": {
868887
"facturae-tax-type-code": "01"

data/regimes/mx.json

+14-2
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,27 @@
6161
}
6262
],
6363
"extensions": [
64+
{
65+
"key": "mx-cfdi-issue-place",
66+
"name": {
67+
"en": "Place of Issue",
68+
"es": "Lugar de Expedición"
69+
},
70+
"desc": {
71+
"en": "Post code of where the invoice was issued. In CFDI, this translates to the 'LugarExpedicion'.",
72+
"es": "Código postal de donde se emitió la factura. En CFDI se traduce a 'LugarExpedicion'."
73+
},
74+
"pattern": "^[0-9]{5}$"
75+
},
6476
{
6577
"key": "mx-cfdi-post-code",
6678
"name": {
6779
"en": "Post Code",
6880
"es": "Código Postal"
6981
},
7082
"desc": {
71-
"en": "Post code of where the invoice was issued.\nIn CFDI, this translates to the 'LugarExpedicion' in the case of the supplier\nand 'DomicilioFiscalReceptor' for customers.\nExample value: '01000'.",
72-
"es": "Código postal de donde se emitió la factura.\nEn CFDI se traduce a 'LugarExpedicion' en el caso del emisor, y\n'DomicilioFiscalReceptor' para el receptor.\nValor de ejemplor: '01000'."
83+
"en": "Post code of a supplier or customer to use instead of an address. Example: \"01000\".",
84+
"es": "Código postal de un emisor o receptor para usar en lugar de una dirección. Ejemplo: \"01000\"."
7385
},
7486
"pattern": "^[0-9]{5}$"
7587
},

data/schemas/bill/invoice.json

+5
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,11 @@
782782
"title": "Tags",
783783
"description": "Special tax tags that apply to this invoice according to local requirements."
784784
},
785+
"ext": {
786+
"$ref": "https://gobl.org/draft-0/tax/extensions",
787+
"title": "Extensions",
788+
"description": "Additional extensions that are applied to the invoice as a whole as opposed to specific\nsections."
789+
},
785790
"meta": {
786791
"$ref": "https://gobl.org/draft-0/cbc/meta",
787792
"title": "Meta",

data/schemas/currency/amount.json

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://gobl.org/draft-0/currency/amount",
4+
"$ref": "#/$defs/Amount",
5+
"$defs": {
6+
"Amount": {
7+
"properties": {
8+
"label": {
9+
"type": "string",
10+
"title": "Label",
11+
"description": "Label allows for additional information to be added to the\ncurrency Amount that may be useful."
12+
},
13+
"currency": {
14+
"$ref": "https://gobl.org/draft-0/currency/code",
15+
"title": "Currency",
16+
"description": "Code defines the currency for this amount."
17+
},
18+
"value": {
19+
"$ref": "https://gobl.org/draft-0/num/amount",
20+
"title": "Value",
21+
"description": "Value is the amount in the currency."
22+
}
23+
},
24+
"type": "object",
25+
"required": [
26+
"currency",
27+
"value"
28+
],
29+
"description": "An Amount represents a monetary value in a specific currency."
30+
}
31+
}
32+
}

data/schemas/currency/exchange-rate.json

+17-6
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,34 @@
55
"$defs": {
66
"ExchangeRate": {
77
"properties": {
8-
"currency": {
8+
"from": {
99
"$ref": "https://gobl.org/draft-0/currency/code",
10-
"title": "Currency",
11-
"description": "ISO currency code this rate represents."
10+
"title": "From",
11+
"description": "Currency code this will be converted from."
12+
},
13+
"to": {
14+
"$ref": "https://gobl.org/draft-0/currency/code",
15+
"title": "To",
16+
"description": "Currency code this exchange rate will convert into."
1217
},
1318
"amount": {
1419
"$ref": "https://gobl.org/draft-0/num/amount",
1520
"title": "Amount",
16-
"description": "How much is 1.00 of this currency worth in the documents currency."
21+
"description": "How much is 1 of the \"from\" currency worth in the \"to\" currency."
22+
},
23+
"at": {
24+
"$ref": "https://gobl.org/draft-0/cal/date-time",
25+
"title": "At",
26+
"description": "At represents the date and time (which may be 00:00:00) when the\ncurrency rate amount was determined."
1727
}
1828
},
1929
"type": "object",
2030
"required": [
21-
"currency",
31+
"from",
32+
"to",
2233
"amount"
2334
],
24-
"description": "ExchangeRate contains data on the rate to be used when converting amounts from the document's base currency to whatever is defined."
35+
"description": "ExchangeRate contains data on the rate to be used when converting amounts from one currency into another."
2536
}
2637
}
2738
}

data/schemas/org/item.json

+8
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@
4949
"title": "Price",
5050
"description": "Base price of a single unit to be sold."
5151
},
52+
"alt_prices": {
53+
"items": {
54+
"$ref": "https://gobl.org/draft-0/currency/amount"
55+
},
56+
"type": "array",
57+
"title": "Alternative Prices",
58+
"description": "AltPrices defines a list of prices with their currencies that may be used\nas an alternative to the item's base price."
59+
},
5260
"unit": {
5361
"$ref": "https://gobl.org/draft-0/org/unit",
5462
"title": "Unit",

0 commit comments

Comments
 (0)