gobl 0.21.0 → 0.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/data/regimes/at.json +55 -50
- data/data/regimes/be.json +55 -50
- data/data/regimes/ca.json +1 -1
- data/data/regimes/ch.json +55 -50
- data/data/regimes/co.json +113 -61
- data/data/regimes/de.json +61 -47
- data/data/regimes/el.json +204 -0
- data/data/regimes/es.json +66 -548
- data/data/regimes/fr.json +55 -50
- data/data/regimes/gb.json +59 -50
- data/data/regimes/it.json +60 -1311
- data/data/regimes/mx.json +38 -639
- data/data/regimes/nl.json +55 -50
- data/data/regimes/pl.json +103 -100
- data/data/regimes/pt.json +17 -349
- data/data/regimes/us.json +55 -50
- data/lib/generated/gobl/bill/correction_options.rb +2 -2
- data/lib/generated/gobl/bill/invoice.rb +49 -9
- data/lib/generated/gobl/bill/ordering.rb +34 -34
- data/lib/generated/gobl/bill/tax.rb +0 -5
- data/lib/generated/gobl/cbc/key_definition.rb +4 -9
- data/lib/generated/gobl/cbc/value_definition.rb +37 -0
- data/lib/generated/gobl/head/header.rb +5 -5
- data/lib/generated/gobl/head/link.rb +43 -0
- data/lib/generated/gobl/l10n/{country_code.rb → iso_country_code.rb} +3 -3
- data/lib/generated/gobl/l10n/tax_country_code.rb +277 -0
- data/lib/generated/gobl/org/address.rb +2 -3
- data/lib/generated/gobl/org/document_ref.rb +87 -0
- data/lib/generated/gobl/org/identity.rb +5 -0
- data/lib/generated/gobl/org/item.rb +2 -2
- data/lib/generated/gobl/org/name.rb +0 -2
- data/lib/generated/gobl/org/party.rb +5 -6
- data/lib/generated/gobl/org/person.rb +5 -0
- data/lib/generated/gobl/org/registration.rb +4 -0
- data/lib/generated/gobl/pay/advance.rb +5 -0
- data/lib/generated/gobl/pay/instructions.rb +5 -0
- data/lib/generated/gobl/tax/addon_def.rb +61 -0
- data/lib/generated/gobl/tax/{category.rb → category_def.rb} +11 -11
- data/lib/generated/gobl/tax/combo.rb +5 -0
- data/lib/generated/gobl/tax/correction_definition.rb +1 -1
- data/lib/generated/gobl/tax/correction_set.rb +13 -0
- data/lib/generated/gobl/tax/identity.rb +3 -3
- data/lib/generated/gobl/tax/{rate.rb → rate_def.rb} +11 -16
- data/lib/generated/gobl/tax/rate_total.rb +5 -0
- data/lib/generated/gobl/tax/{rate_value.rb → rate_value_def.rb} +4 -4
- data/lib/generated/gobl/tax/{regime.rb → regime_def.rb} +23 -13
- data/lib/generated/gobl/tax/scenario.rb +20 -10
- data/lib/generated/gobl/tax/scenario_set.rb +1 -1
- data/lib/generated/gobl/tax/source.rb +1 -1
- data/lib/generated/gobl/tax/tag_set.rb +28 -0
- data/lib/gobl/extensions/bill/invoice_helper.rb +6 -36
- data/lib/gobl/extensions/envelope_helper.rb +4 -0
- data/lib/gobl/version.rb +1 -1
- data/lib/gobl.rb +3 -2
- metadata +15 -11
- data/lib/generated/gobl/bill/document_reference.rb +0 -36
- data/lib/generated/gobl/bill/preceding.rb +0 -78
- data/lib/generated/gobl/cbc/code_definition.rb +0 -37
- data/lib/gobl/extensions/bill/scenario_summary.rb +0 -25
data/data/regimes/pt.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"$schema": "https://gobl.org/draft-0/tax/regime",
|
2
|
+
"$schema": "https://gobl.org/draft-0/tax/regime-def",
|
3
3
|
"name": {
|
4
4
|
"en": "Portugal",
|
5
5
|
"pt": "Portugal"
|
@@ -7,66 +7,6 @@
|
|
7
7
|
"time_zone": "Europe/Lisbon",
|
8
8
|
"country": "PT",
|
9
9
|
"currency": "EUR",
|
10
|
-
"tags": [
|
11
|
-
{
|
12
|
-
"key": "simplified",
|
13
|
-
"name": {
|
14
|
-
"de": "Vereinfachte Rechnung",
|
15
|
-
"en": "Simplified Invoice",
|
16
|
-
"es": "Factura Simplificada",
|
17
|
-
"it": "Fattura Semplificata"
|
18
|
-
},
|
19
|
-
"desc": {
|
20
|
-
"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.",
|
21
|
-
"en": "Used for B2C transactions when the client details are not available, check with local authorities for limits.",
|
22
|
-
"es": "Usado para transacciones B2C cuando los detalles del cliente no están disponibles, consulte con las autoridades locales para los límites.",
|
23
|
-
"it": "Utilizzato per le transazioni B2C quando i dettagli del cliente non sono disponibili, controllare con le autorità locali per i limiti."
|
24
|
-
}
|
25
|
-
},
|
26
|
-
{
|
27
|
-
"key": "reverse-charge",
|
28
|
-
"name": {
|
29
|
-
"de": "Umkehr der Steuerschuld",
|
30
|
-
"en": "Reverse Charge",
|
31
|
-
"es": "Inversión del Sujeto Pasivo",
|
32
|
-
"it": "Inversione del soggetto passivo"
|
33
|
-
}
|
34
|
-
},
|
35
|
-
{
|
36
|
-
"key": "self-billed",
|
37
|
-
"name": {
|
38
|
-
"de": "Rechnung durch den Leistungsempfänger",
|
39
|
-
"en": "Self-billed",
|
40
|
-
"es": "Facturación por el destinatario",
|
41
|
-
"it": "Autofattura"
|
42
|
-
}
|
43
|
-
},
|
44
|
-
{
|
45
|
-
"key": "customer-rates",
|
46
|
-
"name": {
|
47
|
-
"de": "Kundensätze",
|
48
|
-
"en": "Customer rates",
|
49
|
-
"es": "Tarifas aplicables al destinatario",
|
50
|
-
"it": "Aliquote applicabili al destinatario"
|
51
|
-
}
|
52
|
-
},
|
53
|
-
{
|
54
|
-
"key": "partial",
|
55
|
-
"name": {
|
56
|
-
"de": "Teilweise",
|
57
|
-
"en": "Partial",
|
58
|
-
"es": "Parcial",
|
59
|
-
"it": "Parziale"
|
60
|
-
}
|
61
|
-
},
|
62
|
-
{
|
63
|
-
"key": "invoice-receipt",
|
64
|
-
"name": {
|
65
|
-
"en": "Invoice-receipt",
|
66
|
-
"pt": "Fatura-recibo"
|
67
|
-
}
|
68
|
-
}
|
69
|
-
],
|
70
10
|
"extensions": [
|
71
11
|
{
|
72
12
|
"key": "pt-region",
|
@@ -74,297 +14,37 @@
|
|
74
14
|
"en": "Region Code",
|
75
15
|
"pt": "Código da Região"
|
76
16
|
},
|
77
|
-
"
|
17
|
+
"values": [
|
78
18
|
{
|
79
|
-
"
|
19
|
+
"value": "PT",
|
80
20
|
"name": {
|
81
21
|
"en": "Mainland Portugal",
|
82
22
|
"pt": "Portugal Continental"
|
83
23
|
}
|
84
24
|
},
|
85
25
|
{
|
86
|
-
"
|
26
|
+
"value": "PT-AC",
|
87
27
|
"name": {
|
88
28
|
"en": "Azores",
|
89
29
|
"pt": "Açores"
|
90
30
|
}
|
91
31
|
},
|
92
32
|
{
|
93
|
-
"
|
33
|
+
"value": "PT-MA",
|
94
34
|
"name": {
|
95
35
|
"en": "Madeira",
|
96
36
|
"pt": "Madeira"
|
97
37
|
}
|
98
38
|
}
|
99
39
|
]
|
100
|
-
},
|
101
|
-
{
|
102
|
-
"key": "pt-exemption-code",
|
103
|
-
"name": {
|
104
|
-
"en": "Tax exemption reason code",
|
105
|
-
"pt": "Código do motivo de isenção de imposto"
|
106
|
-
},
|
107
|
-
"codes": [
|
108
|
-
{
|
109
|
-
"code": "M01",
|
110
|
-
"name": {
|
111
|
-
"en": "Article 16, No. 6 of the VAT code",
|
112
|
-
"pt": "Artigo 16.°, n.° 6 do CIVA"
|
113
|
-
}
|
114
|
-
},
|
115
|
-
{
|
116
|
-
"code": "M02",
|
117
|
-
"name": {
|
118
|
-
"en": "Article 6 of the Decree-Law 198/90 of 19th June",
|
119
|
-
"pt": "Artigo 6.° do Decreto-Lei n.° 198/90, de 19 de junho"
|
120
|
-
}
|
121
|
-
},
|
122
|
-
{
|
123
|
-
"code": "M04",
|
124
|
-
"name": {
|
125
|
-
"en": "Exempt pursuant to article 13 of the VAT code",
|
126
|
-
"pt": "Isento artigo 13.° do CIVA"
|
127
|
-
}
|
128
|
-
},
|
129
|
-
{
|
130
|
-
"code": "M05",
|
131
|
-
"name": {
|
132
|
-
"en": "Exempt pursuant to article 14 of the VAT code",
|
133
|
-
"pt": "Isento artigo 14.° do CIVA"
|
134
|
-
}
|
135
|
-
},
|
136
|
-
{
|
137
|
-
"code": "M06",
|
138
|
-
"name": {
|
139
|
-
"en": "Exempt pursuant to article 15 of the VAT code",
|
140
|
-
"pt": "Isento artigo 15.° do CIVA"
|
141
|
-
}
|
142
|
-
},
|
143
|
-
{
|
144
|
-
"code": "M07",
|
145
|
-
"name": {
|
146
|
-
"en": "Exempt pursuant to article 9 of the VAT code",
|
147
|
-
"pt": "Isento artigo 9.° do CIVA"
|
148
|
-
}
|
149
|
-
},
|
150
|
-
{
|
151
|
-
"code": "M09",
|
152
|
-
"name": {
|
153
|
-
"en": "VAT - does not confer right to deduct / Article 62 paragraph b) of the VAT code",
|
154
|
-
"pt": "IVA - não confere direito a dedução / Artigo 62.° alínea b) do CIVA"
|
155
|
-
}
|
156
|
-
},
|
157
|
-
{
|
158
|
-
"code": "M10",
|
159
|
-
"name": {
|
160
|
-
"en": "VAT - exemption scheme / Article 57 of the VAT code",
|
161
|
-
"pt": "IVA - regime de isenção / Artigo 57.° do CIVA"
|
162
|
-
}
|
163
|
-
},
|
164
|
-
{
|
165
|
-
"code": "M11",
|
166
|
-
"name": {
|
167
|
-
"en": "Special scheme for tobacco / Decree-Law No. 346/85 of 23rd August",
|
168
|
-
"pt": "Regime particular do tabaco / Decreto-Lei n.° 346/85, de 23 de agosto"
|
169
|
-
}
|
170
|
-
},
|
171
|
-
{
|
172
|
-
"code": "M12",
|
173
|
-
"name": {
|
174
|
-
"en": "Margin scheme - Travel agencies / Decree-Law No. 221/85 of 3rd July",
|
175
|
-
"pt": "Regime da margem de lucro - Agências de viagens / Decreto-Lei n.° 221/85, de 3 de julho"
|
176
|
-
}
|
177
|
-
},
|
178
|
-
{
|
179
|
-
"code": "M13",
|
180
|
-
"name": {
|
181
|
-
"en": "Margin scheme - Second-hand goods / Decree-Law No. 199/96 of 18th October",
|
182
|
-
"pt": "Regime da margem de lucro - Bens em segunda mão / Decreto-Lei n.° 199/96, de 18 de outubro"
|
183
|
-
}
|
184
|
-
},
|
185
|
-
{
|
186
|
-
"code": "M14",
|
187
|
-
"name": {
|
188
|
-
"en": "Margin scheme - Works of art / Decree-Law No. 199/96 of 18th October",
|
189
|
-
"pt": "Regime da margem de lucro - Objetos de arte / Decreto-Lei n.° 199/96, de 18 de outubro"
|
190
|
-
}
|
191
|
-
},
|
192
|
-
{
|
193
|
-
"code": "M15",
|
194
|
-
"name": {
|
195
|
-
"en": "Margin scheme - Collector’s items and antiques / Decree-Law No. 199/96 of 18th October",
|
196
|
-
"pt": "Regime da margem de lucro - Objetos de coleção e antiguidades / Decreto-Lei n.° 199/96, de 18 de outubro"
|
197
|
-
}
|
198
|
-
},
|
199
|
-
{
|
200
|
-
"code": "M16",
|
201
|
-
"name": {
|
202
|
-
"en": "Exempt pursuant to Article 14 of the RITI",
|
203
|
-
"pt": "Isento artigo 14.° do RITI"
|
204
|
-
}
|
205
|
-
},
|
206
|
-
{
|
207
|
-
"code": "M19",
|
208
|
-
"name": {
|
209
|
-
"en": "Other exemptions - Temporary exemptions determined by specific legislation",
|
210
|
-
"pt": "Outras isenções - Isenções temporárias determinadas em diploma próprio"
|
211
|
-
}
|
212
|
-
},
|
213
|
-
{
|
214
|
-
"code": "M20",
|
215
|
-
"name": {
|
216
|
-
"en": "VAT - flat-rate scheme / Article 59-D No. 2 of the VAT code",
|
217
|
-
"pt": "IVA - regime forfetário / Artigo 59.°-D n.°2 do CIVA"
|
218
|
-
}
|
219
|
-
},
|
220
|
-
{
|
221
|
-
"code": "M21",
|
222
|
-
"name": {
|
223
|
-
"en": "VAT - does not confer right to deduct (or similar) - Article 72 No. 4 of the VAT code",
|
224
|
-
"pt": "IVA - não confere direito à dedução (ou expressão similar) - Artigo 72.° n.° 4 do CIVA"
|
225
|
-
}
|
226
|
-
},
|
227
|
-
{
|
228
|
-
"code": "M25",
|
229
|
-
"name": {
|
230
|
-
"en": "Consignment goods - Article 38 No. 1 paragraph a) of the VAT code",
|
231
|
-
"pt": "Mercadorias à consignação - Artigo 38.° n.° 1 alínea a) do CIVA"
|
232
|
-
}
|
233
|
-
},
|
234
|
-
{
|
235
|
-
"code": "M30",
|
236
|
-
"name": {
|
237
|
-
"en": "VAT - reverse charge / Article 2 No. 1 paragraph i) of the VAT code",
|
238
|
-
"pt": "IVA - autoliquidação / Artigo 2.° n.° 1 alínea i) do CIVA"
|
239
|
-
}
|
240
|
-
},
|
241
|
-
{
|
242
|
-
"code": "M31",
|
243
|
-
"name": {
|
244
|
-
"en": "VAT - reverse charge / Article 2 No. 1 paragraph j) of the VAT code",
|
245
|
-
"pt": "IVA - autoliquidação / Artigo 2.° n.° 1 alínea j) do CIVA"
|
246
|
-
}
|
247
|
-
},
|
248
|
-
{
|
249
|
-
"code": "M32",
|
250
|
-
"name": {
|
251
|
-
"en": "VAT - reverse charge / Article 2 No. 1 paragraph l) of the VAT code",
|
252
|
-
"pt": "IVA - autoliquidação / Artigo 2.° n.° 1 alínea I) do CIVA"
|
253
|
-
}
|
254
|
-
},
|
255
|
-
{
|
256
|
-
"code": "M33",
|
257
|
-
"name": {
|
258
|
-
"en": "VAT - reverse charge / Article 2 No. 1 paragraph m) of the VAT code",
|
259
|
-
"pt": "IVA - autoliquidação / Artigo 2.° n.° 1 alínea m) do CIVA"
|
260
|
-
}
|
261
|
-
},
|
262
|
-
{
|
263
|
-
"code": "M40",
|
264
|
-
"name": {
|
265
|
-
"en": "VAT - reverse charge / Article 6 No. 6 paragraph a) of the VAT code, to the contrary",
|
266
|
-
"pt": "IVA - autoliquidação / Artigo 6.° n.° 6 alínea a) do CIVA, a contrário"
|
267
|
-
}
|
268
|
-
},
|
269
|
-
{
|
270
|
-
"code": "M41",
|
271
|
-
"name": {
|
272
|
-
"en": "VAT - reverse charge / Article 8 No. 3 of the RITI",
|
273
|
-
"pt": "IVA - autoliquidação / Artigo 8.° n.° 3 do RITI"
|
274
|
-
}
|
275
|
-
},
|
276
|
-
{
|
277
|
-
"code": "M42",
|
278
|
-
"name": {
|
279
|
-
"en": "VAT - reverse charge / Decree-Law No. 21/2007 of 29 January",
|
280
|
-
"pt": "IVA - autoliquidação / Decreto-Lei n.° 21/2007, de 29 de janeiro"
|
281
|
-
}
|
282
|
-
},
|
283
|
-
{
|
284
|
-
"code": "M43",
|
285
|
-
"name": {
|
286
|
-
"en": "VAT - reverse charge / Decree-Law No. 362/99 of 16th September",
|
287
|
-
"pt": "IVA - autoliquidação / Decreto-Lei n.° 362/99, de 16 de setembro"
|
288
|
-
}
|
289
|
-
},
|
290
|
-
{
|
291
|
-
"code": "M99",
|
292
|
-
"name": {
|
293
|
-
"en": "Not subject to tax or not taxed",
|
294
|
-
"pt": "Não sujeito ou não tributado"
|
295
|
-
}
|
296
|
-
}
|
297
|
-
]
|
298
|
-
}
|
299
|
-
],
|
300
|
-
"scenarios": [
|
301
|
-
{
|
302
|
-
"schema": "bill/invoice",
|
303
|
-
"list": [
|
304
|
-
{
|
305
|
-
"type": [
|
306
|
-
"standard"
|
307
|
-
],
|
308
|
-
"codes": {
|
309
|
-
"at-invoice-type": "FT"
|
310
|
-
}
|
311
|
-
},
|
312
|
-
{
|
313
|
-
"type": [
|
314
|
-
"standard"
|
315
|
-
],
|
316
|
-
"tags": [
|
317
|
-
"simplified"
|
318
|
-
],
|
319
|
-
"codes": {
|
320
|
-
"at-invoice-type": "FS"
|
321
|
-
}
|
322
|
-
},
|
323
|
-
{
|
324
|
-
"type": [
|
325
|
-
"standard"
|
326
|
-
],
|
327
|
-
"tags": [
|
328
|
-
"invoice-receipt"
|
329
|
-
],
|
330
|
-
"codes": {
|
331
|
-
"at-invoice-type": "FR"
|
332
|
-
}
|
333
|
-
},
|
334
|
-
{
|
335
|
-
"type": [
|
336
|
-
"debit-note"
|
337
|
-
],
|
338
|
-
"codes": {
|
339
|
-
"at-invoice-type": "ND"
|
340
|
-
}
|
341
|
-
},
|
342
|
-
{
|
343
|
-
"type": [
|
344
|
-
"credit-note"
|
345
|
-
],
|
346
|
-
"codes": {
|
347
|
-
"at-invoice-type": "NC"
|
348
|
-
}
|
349
|
-
},
|
350
|
-
{
|
351
|
-
"tags": [
|
352
|
-
"reverse-charge"
|
353
|
-
],
|
354
|
-
"note": {
|
355
|
-
"key": "legal",
|
356
|
-
"src": "reverse-charge",
|
357
|
-
"text": "Reverse charge / Autoliquidação - Artigo 2.º n.º 1 alínea j) do Código do IVA"
|
358
|
-
}
|
359
|
-
}
|
360
|
-
]
|
361
40
|
}
|
362
41
|
],
|
363
42
|
"corrections": [
|
364
43
|
{
|
365
44
|
"schema": "bill/invoice",
|
366
45
|
"types": [
|
367
|
-
"credit-note"
|
46
|
+
"credit-note",
|
47
|
+
"debit-note"
|
368
48
|
]
|
369
49
|
}
|
370
50
|
],
|
@@ -379,7 +59,6 @@
|
|
379
59
|
"en": "Value Added Tax",
|
380
60
|
"pt": "Imposto sobre o Valor Acrescentado"
|
381
61
|
},
|
382
|
-
"rate_required": true,
|
383
62
|
"rates": [
|
384
63
|
{
|
385
64
|
"key": "standard",
|
@@ -406,10 +85,7 @@
|
|
406
85
|
"since": "2011-01-01",
|
407
86
|
"percent": "23.0%"
|
408
87
|
}
|
409
|
-
]
|
410
|
-
"map": {
|
411
|
-
"at-tax-code": "NOR"
|
412
|
-
}
|
88
|
+
]
|
413
89
|
},
|
414
90
|
{
|
415
91
|
"key": "intermediate",
|
@@ -436,10 +112,7 @@
|
|
436
112
|
"since": "2011-01-01",
|
437
113
|
"percent": "13.0%"
|
438
114
|
}
|
439
|
-
]
|
440
|
-
"map": {
|
441
|
-
"at-tax-code": "INT"
|
442
|
-
}
|
115
|
+
]
|
443
116
|
},
|
444
117
|
{
|
445
118
|
"key": "reduced",
|
@@ -466,10 +139,7 @@
|
|
466
139
|
"since": "2011-01-01",
|
467
140
|
"percent": "6.0%"
|
468
141
|
}
|
469
|
-
]
|
470
|
-
"map": {
|
471
|
-
"at-tax-code": "RED"
|
472
|
-
}
|
142
|
+
]
|
473
143
|
},
|
474
144
|
{
|
475
145
|
"key": "exempt",
|
@@ -477,17 +147,15 @@
|
|
477
147
|
"en": "Exempt",
|
478
148
|
"pt": "Isento"
|
479
149
|
},
|
480
|
-
"exempt": true
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
"
|
485
|
-
"
|
150
|
+
"exempt": true
|
151
|
+
},
|
152
|
+
{
|
153
|
+
"key": "other",
|
154
|
+
"name": {
|
155
|
+
"en": "Other",
|
156
|
+
"pt": "Outro"
|
486
157
|
}
|
487
158
|
}
|
488
|
-
],
|
489
|
-
"extensions": [
|
490
|
-
"pt-region"
|
491
159
|
]
|
492
160
|
}
|
493
161
|
]
|
data/data/regimes/us.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"$schema": "https://gobl.org/draft-0/tax/regime",
|
2
|
+
"$schema": "https://gobl.org/draft-0/tax/regime-def",
|
3
3
|
"name": {
|
4
4
|
"en": "United States of America"
|
5
5
|
},
|
@@ -8,55 +8,60 @@
|
|
8
8
|
"currency": "USD",
|
9
9
|
"tags": [
|
10
10
|
{
|
11
|
-
"
|
12
|
-
"
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
11
|
+
"schema": "bill/invoice",
|
12
|
+
"list": [
|
13
|
+
{
|
14
|
+
"key": "simplified",
|
15
|
+
"name": {
|
16
|
+
"de": "Vereinfachte Rechnung",
|
17
|
+
"en": "Simplified Invoice",
|
18
|
+
"es": "Factura Simplificada",
|
19
|
+
"it": "Fattura Semplificata"
|
20
|
+
},
|
21
|
+
"desc": {
|
22
|
+
"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.",
|
23
|
+
"en": "Used for B2C transactions when the client details are not available, check with local authorities for limits.",
|
24
|
+
"es": "Usado para transacciones B2C cuando los detalles del cliente no están disponibles, consulte con las autoridades locales para los límites.",
|
25
|
+
"it": "Utilizzato per le transazioni B2C quando i dettagli del cliente non sono disponibili, controllare con le autorità locali per i limiti."
|
26
|
+
}
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"key": "reverse-charge",
|
30
|
+
"name": {
|
31
|
+
"de": "Umkehr der Steuerschuld",
|
32
|
+
"en": "Reverse Charge",
|
33
|
+
"es": "Inversión del Sujeto Pasivo",
|
34
|
+
"it": "Inversione del soggetto passivo"
|
35
|
+
}
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"key": "self-billed",
|
39
|
+
"name": {
|
40
|
+
"de": "Rechnung durch den Leistungsempfänger",
|
41
|
+
"en": "Self-billed",
|
42
|
+
"es": "Facturación por el destinatario",
|
43
|
+
"it": "Autofattura"
|
44
|
+
}
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"key": "customer-rates",
|
48
|
+
"name": {
|
49
|
+
"de": "Kundensätze",
|
50
|
+
"en": "Customer rates",
|
51
|
+
"es": "Tarifas aplicables al destinatario",
|
52
|
+
"it": "Aliquote applicabili al destinatario"
|
53
|
+
}
|
54
|
+
},
|
55
|
+
{
|
56
|
+
"key": "partial",
|
57
|
+
"name": {
|
58
|
+
"de": "Teilweise",
|
59
|
+
"en": "Partial",
|
60
|
+
"es": "Parcial",
|
61
|
+
"it": "Parziale"
|
62
|
+
}
|
63
|
+
}
|
64
|
+
]
|
60
65
|
}
|
61
66
|
],
|
62
67
|
"corrections": [
|
@@ -25,8 +25,8 @@ module GOBL
|
|
25
25
|
|
26
26
|
# @!attribute [r] series
|
27
27
|
# Series to assign to the new corrective invoice.
|
28
|
-
# @return [
|
29
|
-
property :series,
|
28
|
+
# @return [GOBL::CBC::Code]
|
29
|
+
property :series, GOBL::CBC::Code
|
30
30
|
|
31
31
|
# @!attribute [r] stamps
|
32
32
|
# Stamps of the previous document to include in the preceding data.
|
@@ -12,6 +12,41 @@ module GOBL
|
|
12
12
|
# The Schema ID of the GOBL Invoice structure
|
13
13
|
SCHEMA_ID = 'https://gobl.org/draft-0/bill/invoice'
|
14
14
|
|
15
|
+
# Enumeration of possible values for {#$regime} with their corresponding descriptions
|
16
|
+
$REGIME_ENUM = {
|
17
|
+
'AT' => 'Austria',
|
18
|
+
'BE' => 'Belgium',
|
19
|
+
'CA' => 'Canada',
|
20
|
+
'CH' => 'Switzerland',
|
21
|
+
'CO' => 'Colombia',
|
22
|
+
'DE' => 'Germany',
|
23
|
+
'EL' => 'Greece',
|
24
|
+
'ES' => 'Spain',
|
25
|
+
'FR' => 'France',
|
26
|
+
'GB' => 'United Kingdom',
|
27
|
+
'IT' => 'Italy',
|
28
|
+
'MX' => 'Mexico',
|
29
|
+
'NL' => 'The Netherlands',
|
30
|
+
'PL' => 'Poland',
|
31
|
+
'PT' => 'Portugal',
|
32
|
+
'US' => 'United States of America'
|
33
|
+
}.freeze
|
34
|
+
|
35
|
+
# @!attribute [r] $regime
|
36
|
+
# @return [GOBL::L10n::TaxCountryCode]
|
37
|
+
property :$regime, GOBL::L10n::TaxCountryCode
|
38
|
+
validates_inclusion_of :$regime, in: $REGIME_ENUM.keys, allow_blank: true
|
39
|
+
|
40
|
+
# @!attribute [r] $addons
|
41
|
+
# Addons defines a list of keys used to identify tax addons that apply special normalization, scenarios, and validation rules to a document.
|
42
|
+
# @return [Array<GOBL::CBC::Key>]
|
43
|
+
property :$addons, [GOBL::CBC::Key]
|
44
|
+
|
45
|
+
# @!attribute [r] $tags
|
46
|
+
# Tags are used to help identify specific tax scenarios or requirements that will apply changes to the contents of the invoice. Tags by design should always be optional, it should always be possible to build a valid invoice without any tags.
|
47
|
+
# @return [Array<GOBL::CBC::Key>]
|
48
|
+
property :$tags, [GOBL::CBC::Key]
|
49
|
+
|
15
50
|
# @!attribute [r] uuid
|
16
51
|
# Universally Unique Identifier.
|
17
52
|
# @return [String]
|
@@ -22,9 +57,14 @@ module GOBL
|
|
22
57
|
'standard' => 'A regular commercial invoice document between a supplier and customer.',
|
23
58
|
'proforma' => 'For a clients validation before sending a final invoice.',
|
24
59
|
'corrective' => 'Corrected invoice that completely *replaces* the preceding document.',
|
25
|
-
'credit-note' => 'Reflects a refund either partial or complete of the preceding document. A
|
60
|
+
'credit-note' => 'Reflects a refund either partial or complete of the preceding document. A
|
26
61
|
credit note effectively *extends* the previous document.',
|
27
|
-
'debit-note' => 'An additional set of charges to be added to the preceding document.'
|
62
|
+
'debit-note' => 'An additional set of charges to be added to the preceding document.',
|
63
|
+
'other' => 'Any other type of invoice that does not fit into the standard categories and implies
|
64
|
+
that any scenarios defined in tax regimes or addons will not be applied.
|
65
|
+
|
66
|
+
This is useful for being able to create invoices with custom types in extensions,
|
67
|
+
but is not recommend for general use.'
|
28
68
|
}.freeze
|
29
69
|
|
30
70
|
# @!attribute [r] type
|
@@ -35,13 +75,13 @@ module GOBL
|
|
35
75
|
|
36
76
|
# @!attribute [r] series
|
37
77
|
# Used as a prefix to group codes.
|
38
|
-
# @return [
|
39
|
-
property :series,
|
78
|
+
# @return [GOBL::CBC::Code]
|
79
|
+
property :series, GOBL::CBC::Code
|
40
80
|
|
41
81
|
# @!attribute [r] code
|
42
82
|
# Sequential code used to identify this invoice in tax declarations.
|
43
|
-
# @return [
|
44
|
-
property :code,
|
83
|
+
# @return [GOBL::CBC::Code]
|
84
|
+
property :code, GOBL::CBC::Code
|
45
85
|
validates_presence_of :code
|
46
86
|
|
47
87
|
# @!attribute [r] issue_date
|
@@ -71,8 +111,8 @@ module GOBL
|
|
71
111
|
|
72
112
|
# @!attribute [r] preceding
|
73
113
|
# Key information regarding previous invoices and potentially details as to why they were corrected.
|
74
|
-
# @return [Array<
|
75
|
-
property :preceding, [
|
114
|
+
# @return [Array<GOBL::Org::DocumentRef>]
|
115
|
+
property :preceding, [GOBL::Org::DocumentRef]
|
76
116
|
|
77
117
|
# @!attribute [r] tax
|
78
118
|
# Special tax configuration for billing.
|
@@ -86,7 +126,7 @@ module GOBL
|
|
86
126
|
validates_presence_of :supplier
|
87
127
|
|
88
128
|
# @!attribute [r] customer
|
89
|
-
# Legal entity receiving the goods or services, may be
|
129
|
+
# Legal entity receiving the goods or services, may be nil in certain circumstances such as simplified invoices.
|
90
130
|
# @return [GOBL::Org::Party]
|
91
131
|
property :customer, GOBL::Org::Party
|
92
132
|
|