gobl 0.21.0 → 0.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/data/regimes/at.json +55 -50
  3. data/data/regimes/be.json +55 -50
  4. data/data/regimes/ca.json +1 -1
  5. data/data/regimes/ch.json +55 -50
  6. data/data/regimes/co.json +113 -61
  7. data/data/regimes/de.json +61 -47
  8. data/data/regimes/el.json +204 -0
  9. data/data/regimes/es.json +66 -548
  10. data/data/regimes/fr.json +55 -50
  11. data/data/regimes/gb.json +59 -50
  12. data/data/regimes/it.json +60 -1311
  13. data/data/regimes/mx.json +38 -639
  14. data/data/regimes/nl.json +55 -50
  15. data/data/regimes/pl.json +103 -100
  16. data/data/regimes/pt.json +17 -349
  17. data/data/regimes/us.json +55 -50
  18. data/lib/generated/gobl/bill/correction_options.rb +2 -2
  19. data/lib/generated/gobl/bill/invoice.rb +49 -9
  20. data/lib/generated/gobl/bill/ordering.rb +34 -34
  21. data/lib/generated/gobl/bill/tax.rb +0 -5
  22. data/lib/generated/gobl/cbc/key_definition.rb +4 -9
  23. data/lib/generated/gobl/cbc/value_definition.rb +37 -0
  24. data/lib/generated/gobl/head/header.rb +5 -5
  25. data/lib/generated/gobl/head/link.rb +43 -0
  26. data/lib/generated/gobl/l10n/{country_code.rb → iso_country_code.rb} +3 -3
  27. data/lib/generated/gobl/l10n/tax_country_code.rb +277 -0
  28. data/lib/generated/gobl/org/address.rb +2 -3
  29. data/lib/generated/gobl/org/document_ref.rb +87 -0
  30. data/lib/generated/gobl/org/identity.rb +5 -0
  31. data/lib/generated/gobl/org/item.rb +2 -2
  32. data/lib/generated/gobl/org/name.rb +0 -2
  33. data/lib/generated/gobl/org/party.rb +5 -6
  34. data/lib/generated/gobl/org/person.rb +5 -0
  35. data/lib/generated/gobl/org/registration.rb +4 -0
  36. data/lib/generated/gobl/pay/advance.rb +5 -0
  37. data/lib/generated/gobl/pay/instructions.rb +5 -0
  38. data/lib/generated/gobl/tax/addon_def.rb +61 -0
  39. data/lib/generated/gobl/tax/{category.rb → category_def.rb} +11 -11
  40. data/lib/generated/gobl/tax/combo.rb +5 -0
  41. data/lib/generated/gobl/tax/correction_definition.rb +1 -1
  42. data/lib/generated/gobl/tax/correction_set.rb +13 -0
  43. data/lib/generated/gobl/tax/identity.rb +3 -3
  44. data/lib/generated/gobl/tax/{rate.rb → rate_def.rb} +11 -16
  45. data/lib/generated/gobl/tax/rate_total.rb +5 -0
  46. data/lib/generated/gobl/tax/{rate_value.rb → rate_value_def.rb} +4 -4
  47. data/lib/generated/gobl/tax/{regime.rb → regime_def.rb} +23 -13
  48. data/lib/generated/gobl/tax/scenario.rb +20 -10
  49. data/lib/generated/gobl/tax/scenario_set.rb +1 -1
  50. data/lib/generated/gobl/tax/source.rb +1 -1
  51. data/lib/generated/gobl/tax/tag_set.rb +28 -0
  52. data/lib/gobl/extensions/bill/invoice_helper.rb +6 -36
  53. data/lib/gobl/extensions/envelope_helper.rb +4 -0
  54. data/lib/gobl/version.rb +1 -1
  55. data/lib/gobl.rb +3 -2
  56. metadata +15 -11
  57. data/lib/generated/gobl/bill/document_reference.rb +0 -36
  58. data/lib/generated/gobl/bill/preceding.rb +0 -78
  59. data/lib/generated/gobl/cbc/code_definition.rb +0 -37
  60. data/lib/gobl/extensions/bill/scenario_summary.rb +0 -25
data/data/regimes/nl.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": "The Netherlands",
5
5
  "nl": "Nederland"
@@ -9,55 +9,60 @@
9
9
  "currency": "EUR",
10
10
  "tags": [
11
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
- }
12
+ "schema": "bill/invoice",
13
+ "list": [
14
+ {
15
+ "key": "simplified",
16
+ "name": {
17
+ "de": "Vereinfachte Rechnung",
18
+ "en": "Simplified Invoice",
19
+ "es": "Factura Simplificada",
20
+ "it": "Fattura Semplificata"
21
+ },
22
+ "desc": {
23
+ "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.",
24
+ "en": "Used for B2C transactions when the client details are not available, check with local authorities for limits.",
25
+ "es": "Usado para transacciones B2C cuando los detalles del cliente no están disponibles, consulte con las autoridades locales para los límites.",
26
+ "it": "Utilizzato per le transazioni B2C quando i dettagli del cliente non sono disponibili, controllare con le autorità locali per i limiti."
27
+ }
28
+ },
29
+ {
30
+ "key": "reverse-charge",
31
+ "name": {
32
+ "de": "Umkehr der Steuerschuld",
33
+ "en": "Reverse Charge",
34
+ "es": "Inversión del Sujeto Pasivo",
35
+ "it": "Inversione del soggetto passivo"
36
+ }
37
+ },
38
+ {
39
+ "key": "self-billed",
40
+ "name": {
41
+ "de": "Rechnung durch den Leistungsempfänger",
42
+ "en": "Self-billed",
43
+ "es": "Facturación por el destinatario",
44
+ "it": "Autofattura"
45
+ }
46
+ },
47
+ {
48
+ "key": "customer-rates",
49
+ "name": {
50
+ "de": "Kundensätze",
51
+ "en": "Customer rates",
52
+ "es": "Tarifas aplicables al destinatario",
53
+ "it": "Aliquote applicabili al destinatario"
54
+ }
55
+ },
56
+ {
57
+ "key": "partial",
58
+ "name": {
59
+ "de": "Teilweise",
60
+ "en": "Partial",
61
+ "es": "Parcial",
62
+ "it": "Parziale"
63
+ }
64
+ }
65
+ ]
61
66
  }
62
67
  ],
63
68
  "scenarios": [
data/data/regimes/pl.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": "Poland",
5
5
  "pl": "Polska"
@@ -9,62 +9,67 @@
9
9
  "currency": "PLN",
10
10
  "tags": [
11
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": "settlement",
64
- "name": {
65
- "en": "Settlement Invoice",
66
- "pl": "Faktura Rozliczeniowa"
67
- }
12
+ "schema": "bill/invoice",
13
+ "list": [
14
+ {
15
+ "key": "simplified",
16
+ "name": {
17
+ "de": "Vereinfachte Rechnung",
18
+ "en": "Simplified Invoice",
19
+ "es": "Factura Simplificada",
20
+ "it": "Fattura Semplificata"
21
+ },
22
+ "desc": {
23
+ "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.",
24
+ "en": "Used for B2C transactions when the client details are not available, check with local authorities for limits.",
25
+ "es": "Usado para transacciones B2C cuando los detalles del cliente no están disponibles, consulte con las autoridades locales para los límites.",
26
+ "it": "Utilizzato per le transazioni B2C quando i dettagli del cliente non sono disponibili, controllare con le autorità locali per i limiti."
27
+ }
28
+ },
29
+ {
30
+ "key": "reverse-charge",
31
+ "name": {
32
+ "de": "Umkehr der Steuerschuld",
33
+ "en": "Reverse Charge",
34
+ "es": "Inversión del Sujeto Pasivo",
35
+ "it": "Inversione del soggetto passivo"
36
+ }
37
+ },
38
+ {
39
+ "key": "self-billed",
40
+ "name": {
41
+ "de": "Rechnung durch den Leistungsempfänger",
42
+ "en": "Self-billed",
43
+ "es": "Facturación por el destinatario",
44
+ "it": "Autofattura"
45
+ }
46
+ },
47
+ {
48
+ "key": "customer-rates",
49
+ "name": {
50
+ "de": "Kundensätze",
51
+ "en": "Customer rates",
52
+ "es": "Tarifas aplicables al destinatario",
53
+ "it": "Aliquote applicabili al destinatario"
54
+ }
55
+ },
56
+ {
57
+ "key": "partial",
58
+ "name": {
59
+ "de": "Teilweise",
60
+ "en": "Partial",
61
+ "es": "Parcial",
62
+ "it": "Parziale"
63
+ }
64
+ },
65
+ {
66
+ "key": "settlement",
67
+ "name": {
68
+ "en": "Settlement Invoice",
69
+ "pl": "Faktura Rozliczeniowa"
70
+ }
71
+ }
72
+ ]
68
73
  }
69
74
  ],
70
75
  "extensions": [
@@ -74,9 +79,9 @@
74
79
  "en": "Special VAT Extensions for KSeF",
75
80
  "pl": "Rozszerzenia specjalne dla KSeF"
76
81
  },
77
- "keys": [
82
+ "values": [
78
83
  {
79
- "key": "taxi",
84
+ "value": "taxi",
80
85
  "name": {
81
86
  "en": "Taxi Rate",
82
87
  "pl": "Ryczałt dla taksówek"
@@ -93,23 +98,23 @@
93
98
  "name": {
94
99
  "en": "Zero VAT Extensions for KSeF"
95
100
  },
96
- "keys": [
101
+ "values": [
97
102
  {
98
- "key": "wdt",
103
+ "value": "wdt",
99
104
  "name": {
100
105
  "en": "WDT",
101
106
  "pl": "WDT"
102
107
  }
103
108
  },
104
109
  {
105
- "key": "domestic",
110
+ "value": "domestic",
106
111
  "name": {
107
112
  "en": "Domestic",
108
113
  "pl": "Krajowy"
109
114
  }
110
115
  },
111
116
  {
112
- "key": "export",
117
+ "value": "export",
113
118
  "name": {
114
119
  "en": "Export",
115
120
  "pl": "Eksport"
@@ -123,9 +128,9 @@
123
128
  "en": "Effective date code.",
124
129
  "pl": "Kod daty wejścia w życie."
125
130
  },
126
- "codes": [
131
+ "values": [
127
132
  {
128
- "code": "1",
133
+ "value": "1",
129
134
  "name": {
130
135
  "en": "Original",
131
136
  "pl": "Pierwotna"
@@ -136,7 +141,7 @@
136
141
  }
137
142
  },
138
143
  {
139
- "code": "2",
144
+ "value": "2",
140
145
  "name": {
141
146
  "en": "Correction",
142
147
  "pl": "Korygująca"
@@ -147,7 +152,7 @@
147
152
  }
148
153
  },
149
154
  {
150
- "code": "3",
155
+ "value": "3",
151
156
  "name": {
152
157
  "en": "Other",
153
158
  "pl": "Inna"
@@ -237,100 +242,100 @@
237
242
  "schema": "bill/invoice",
238
243
  "list": [
239
244
  {
240
- "type": [
241
- "standard"
242
- ],
243
245
  "name": {
244
246
  "en": "Regular Invoice",
245
247
  "pl": "Faktura Podstawowa"
246
248
  },
249
+ "type": [
250
+ "standard"
251
+ ],
247
252
  "codes": {
248
253
  "favat-rodzaj-faktury": "VAT"
249
254
  }
250
255
  },
251
256
  {
257
+ "name": {
258
+ "en": "Prepayment Invoice",
259
+ "pl": "Faktura Zaliczkowa"
260
+ },
252
261
  "type": [
253
262
  "standard"
254
263
  ],
255
264
  "tags": [
256
265
  "partial"
257
266
  ],
258
- "name": {
259
- "en": "Prepayment Invoice",
260
- "pl": "Faktura Zaliczkowa"
261
- },
262
267
  "codes": {
263
268
  "favat-rodzaj-faktury": "ZAL"
264
269
  }
265
270
  },
266
271
  {
272
+ "name": {
273
+ "en": "Settlement Invoice",
274
+ "pl": "Faktura Rozliczeniowa"
275
+ },
267
276
  "type": [
268
277
  "standard"
269
278
  ],
270
279
  "tags": [
271
280
  "settlement"
272
281
  ],
273
- "name": {
274
- "en": "Settlement Invoice",
275
- "pl": "Faktura Rozliczeniowa"
276
- },
277
282
  "codes": {
278
283
  "favat-rodzaj-faktury": "ROZ"
279
284
  }
280
285
  },
281
286
  {
287
+ "name": {
288
+ "en": "Simplified Invoice",
289
+ "pl": "Faktura Uproszczona"
290
+ },
282
291
  "type": [
283
292
  "standard"
284
293
  ],
285
294
  "tags": [
286
295
  "simplified"
287
296
  ],
288
- "name": {
289
- "en": "Simplified Invoice",
290
- "pl": "Faktura Uproszczona"
291
- },
292
297
  "codes": {
293
298
  "favat-rodzaj-faktury": "UPR"
294
299
  }
295
300
  },
296
301
  {
297
- "type": [
298
- "credit-note"
299
- ],
300
302
  "name": {
301
303
  "en": "Credit note",
302
304
  "pl": "Faktura korygująca"
303
305
  },
306
+ "type": [
307
+ "credit-note"
308
+ ],
304
309
  "codes": {
305
310
  "favat-rodzaj-faktury": "KOR"
306
311
  }
307
312
  },
308
313
  {
314
+ "name": {
315
+ "en": "Prepayment credit note",
316
+ "pl": "Faktura korygująca fakturę zaliczkową"
317
+ },
309
318
  "type": [
310
319
  "credit-note"
311
320
  ],
312
321
  "tags": [
313
322
  "partial"
314
323
  ],
315
- "name": {
316
- "en": "Prepayment credit note",
317
- "pl": "Faktura korygująca fakturę zaliczkową"
318
- },
319
324
  "codes": {
320
325
  "favat-rodzaj-faktury": "KOR_ZAL"
321
326
  }
322
327
  },
323
328
  {
329
+ "name": {
330
+ "en": "Settlement credit note",
331
+ "pl": "Faktura korygująca fakturę rozliczeniową"
332
+ },
324
333
  "type": [
325
334
  "credit-note"
326
335
  ],
327
336
  "tags": [
328
337
  "settlement"
329
338
  ],
330
- "name": {
331
- "en": "Settlement credit note",
332
- "pl": "Faktura korygująca fakturę rozliczeniową"
333
- },
334
339
  "codes": {
335
340
  "favat-rodzaj-faktury": "KOR_ROZ"
336
341
  }
@@ -426,9 +431,6 @@
426
431
  {
427
432
  "percent": "0.0%"
428
433
  }
429
- ],
430
- "extensions": [
431
- "pl-ksef-vat-zero"
432
434
  ]
433
435
  },
434
436
  {
@@ -444,11 +446,12 @@
444
446
  "name": {
445
447
  "en": "Special Rate",
446
448
  "pl": "Stawka Specjalna"
447
- },
448
- "extensions": [
449
- "pl-ksef-vat-special"
450
- ]
449
+ }
451
450
  }
451
+ ],
452
+ "extensions": [
453
+ "pl-ksef-vat-zero",
454
+ "pl-ksef-vat-special"
452
455
  ]
453
456
  }
454
457
  ]