gobl 0.20.0 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/data/regimes/at.json +155 -0
  4. data/data/regimes/be.json +164 -0
  5. data/data/regimes/ca.json +9 -0
  6. data/data/regimes/ch.json +153 -0
  7. data/data/regimes/co.json +80 -122
  8. data/data/regimes/de.json +2 -2
  9. data/data/regimes/es.json +71 -62
  10. data/data/regimes/fr.json +2 -2
  11. data/data/regimes/gb.json +8 -0
  12. data/data/regimes/gr.json +591 -0
  13. data/data/regimes/it.json +37 -22
  14. data/data/regimes/mx.json +15 -3
  15. data/data/regimes/nl.json +8 -0
  16. data/data/regimes/pl.json +65 -8
  17. data/data/regimes/pt.json +50 -39
  18. data/data/regimes/us.json +9 -0
  19. data/lib/generated/gobl/bill/charge.rb +6 -7
  20. data/lib/generated/gobl/bill/correction_options.rb +5 -1
  21. data/lib/generated/gobl/bill/delivery.rb +0 -1
  22. data/lib/generated/gobl/bill/discount.rb +5 -6
  23. data/lib/generated/gobl/bill/document_reference.rb +2 -3
  24. data/lib/generated/gobl/bill/invoice.rb +4 -5
  25. data/lib/generated/gobl/bill/line.rb +3 -4
  26. data/lib/generated/gobl/bill/line_charge.rb +0 -1
  27. data/lib/generated/gobl/bill/line_discount.rb +0 -1
  28. data/lib/generated/gobl/bill/ordering.rb +0 -1
  29. data/lib/generated/gobl/bill/outlay.rb +3 -4
  30. data/lib/generated/gobl/bill/payment.rb +0 -1
  31. data/lib/generated/gobl/bill/preceding.rb +4 -5
  32. data/lib/generated/gobl/bill/tax.rb +5 -1
  33. data/lib/generated/gobl/bill/totals.rb +0 -1
  34. data/lib/generated/gobl/cal/date.rb +0 -1
  35. data/lib/generated/gobl/cal/date_time.rb +0 -1
  36. data/lib/generated/gobl/cal/period.rb +0 -1
  37. data/lib/generated/gobl/cbc/code.rb +0 -1
  38. data/lib/generated/gobl/cbc/code_definition.rb +0 -1
  39. data/lib/generated/gobl/cbc/code_map.rb +0 -1
  40. data/lib/generated/gobl/cbc/key.rb +0 -1
  41. data/lib/generated/gobl/cbc/key_definition.rb +0 -1
  42. data/lib/generated/gobl/cbc/meta.rb +0 -1
  43. data/lib/generated/gobl/cbc/note.rb +0 -1
  44. data/lib/generated/gobl/currency/amount.rb +33 -0
  45. data/lib/generated/gobl/currency/code.rb +118 -105
  46. data/lib/generated/gobl/currency/exchange_rate.rb +17 -7
  47. data/lib/generated/gobl/dsig/digest.rb +0 -1
  48. data/lib/generated/gobl/dsig/signature.rb +0 -1
  49. data/lib/generated/gobl/envelope.rb +0 -1
  50. data/lib/generated/gobl/head/header.rb +2 -3
  51. data/lib/generated/gobl/head/stamp.rb +0 -1
  52. data/lib/generated/gobl/i18n/string.rb +0 -1
  53. data/lib/generated/gobl/l10n/code.rb +0 -1
  54. data/lib/generated/gobl/l10n/country_code.rb +0 -1
  55. data/lib/generated/gobl/note/message.rb +5 -1
  56. data/lib/generated/gobl/org/address.rb +3 -4
  57. data/lib/generated/gobl/org/coordinates.rb +0 -1
  58. data/lib/generated/gobl/org/email.rb +3 -4
  59. data/lib/generated/gobl/org/identity.rb +3 -4
  60. data/lib/generated/gobl/org/image.rb +3 -4
  61. data/lib/generated/gobl/org/inbox.rb +3 -4
  62. data/lib/generated/gobl/org/item.rb +8 -4
  63. data/lib/generated/gobl/org/name.rb +3 -4
  64. data/lib/generated/gobl/org/party.rb +8 -4
  65. data/lib/generated/gobl/org/person.rb +3 -4
  66. data/lib/generated/gobl/org/registration.rb +7 -3
  67. data/lib/generated/gobl/org/telephone.rb +3 -4
  68. data/lib/generated/gobl/org/unit.rb +0 -1
  69. data/lib/generated/gobl/org/website.rb +4 -5
  70. data/lib/generated/gobl/pay/advance.rb +3 -4
  71. data/lib/generated/gobl/pay/card.rb +0 -1
  72. data/lib/generated/gobl/pay/credit_transfer.rb +0 -1
  73. data/lib/generated/gobl/pay/direct_debit.rb +0 -1
  74. data/lib/generated/gobl/pay/due_date.rb +0 -1
  75. data/lib/generated/gobl/pay/instructions.rb +0 -1
  76. data/lib/generated/gobl/pay/online.rb +12 -8
  77. data/lib/generated/gobl/pay/terms.rb +0 -1
  78. data/lib/generated/gobl/regimes/mx/food_vouchers.rb +0 -1
  79. data/lib/generated/gobl/regimes/mx/food_vouchers_employee.rb +0 -1
  80. data/lib/generated/gobl/regimes/mx/food_vouchers_line.rb +0 -1
  81. data/lib/generated/gobl/regimes/mx/fuel_account_balance.rb +0 -1
  82. data/lib/generated/gobl/regimes/mx/fuel_account_item.rb +0 -1
  83. data/lib/generated/gobl/regimes/mx/fuel_account_line.rb +0 -2
  84. data/lib/generated/gobl/regimes/mx/fuel_account_tax.rb +11 -9
  85. data/lib/generated/gobl/schema/object.rb +0 -1
  86. data/lib/generated/gobl/tax/category.rb +1 -2
  87. data/lib/generated/gobl/tax/category_total.rb +0 -1
  88. data/lib/generated/gobl/tax/combo.rb +1 -2
  89. data/lib/generated/gobl/tax/correction_definition.rb +0 -1
  90. data/lib/generated/gobl/tax/extensions.rb +0 -1
  91. data/lib/generated/gobl/tax/identity.rb +10 -16
  92. data/lib/generated/gobl/tax/rate.rb +0 -1
  93. data/lib/generated/gobl/tax/rate_total.rb +1 -2
  94. data/lib/generated/gobl/tax/rate_total_surcharge.rb +0 -1
  95. data/lib/generated/gobl/tax/rate_value.rb +5 -1
  96. data/lib/generated/gobl/tax/regime.rb +15 -11
  97. data/lib/generated/gobl/tax/scenario.rb +0 -1
  98. data/lib/generated/gobl/tax/scenario_set.rb +0 -1
  99. data/lib/generated/gobl/tax/set.rb +0 -1
  100. data/lib/generated/gobl/tax/source.rb +0 -1
  101. data/lib/generated/gobl/tax/total.rb +0 -1
  102. data/lib/gobl/version.rb +1 -1
  103. metadata +7 -3
  104. data/lib/generated/gobl/uuid/uuid.rb +0 -17
data/data/regimes/co.json CHANGED
@@ -63,213 +63,171 @@
63
63
  }
64
64
  }
65
65
  ],
66
- "identity_types": [
66
+ "extensions": [
67
67
  {
68
- "key": "tin",
68
+ "key": "co-dian-municipality",
69
69
  "name": {
70
- "en": "TIN - Tax Identification Number",
71
- "es": "NIT - Número de Identificación Tributaria"
70
+ "en": "DIAN Municipality Code",
71
+ "es": "Código de municipio DIAN"
72
72
  },
73
- "map": {
74
- "dian-additional-account-id": "1",
75
- "dian-company-id": "31"
76
- }
73
+ "desc": {
74
+ "en": "The municipality code as defined by the DIAN.\n\nFor further details on the list of possible codes, see:\n\n * https://www.dian.gov.co/atencionciudadano/formulariosinstructivos/Formularios/2007/Codigos_municipios_2007.pdf\n * https://github.com/ALAxHxC/MunicipiosDane"
75
+ },
76
+ "pattern": "^\\d{5}$"
77
77
  },
78
78
  {
79
- "key": "civil",
79
+ "key": "co-dian-correction",
80
+ "name": {
81
+ "en": "DIAN Correction Code",
82
+ "es": "Código de corrección DIAN"
83
+ },
84
+ "codes": [
85
+ {
86
+ "code": "1",
87
+ "name": {
88
+ "en": "Partial refund",
89
+ "es": "Devolución parcial"
90
+ },
91
+ "desc": {
92
+ "en": "Partial refund of part of the goods or services.",
93
+ "es": "Devolución de parte de los bienes; no aceptación de partes del servicio."
94
+ }
95
+ },
96
+ {
97
+ "code": "2",
98
+ "name": {
99
+ "en": "Revoked",
100
+ "es": "Anulación"
101
+ },
102
+ "desc": {
103
+ "en": "Previous document has been completely cancelled.",
104
+ "es": "Anulación de la factura anterior."
105
+ }
106
+ },
107
+ {
108
+ "code": "3",
109
+ "name": {
110
+ "en": "Discount",
111
+ "es": "Descuento"
112
+ },
113
+ "desc": {
114
+ "en": "Partial or total discount.",
115
+ "es": "Rebaja o descuento parcial o total."
116
+ }
117
+ },
118
+ {
119
+ "code": "4",
120
+ "name": {
121
+ "en": "Adjustment",
122
+ "es": "Ajuste"
123
+ },
124
+ "desc": {
125
+ "en": "Price adjustment.",
126
+ "es": "Ajuste de precio."
127
+ }
128
+ },
129
+ {
130
+ "code": "5",
131
+ "name": {
132
+ "en": "Other",
133
+ "es": "Otros"
134
+ }
135
+ }
136
+ ]
137
+ }
138
+ ],
139
+ "identity_keys": [
140
+ {
141
+ "key": "co-civil-register",
80
142
  "name": {
81
143
  "en": "Civil Registry",
82
144
  "es": "Registro Civil"
83
145
  },
84
146
  "map": {
85
- "dian-additional-account-id": "2",
86
147
  "dian-company-id": "11"
87
148
  }
88
149
  },
89
150
  {
90
- "key": "card",
151
+ "key": "co-id-card",
91
152
  "name": {
92
153
  "en": "Identity Card",
93
154
  "es": "Tarjeta de Identidad"
94
155
  },
95
156
  "map": {
96
- "dian-additional-account-id": "2",
97
157
  "dian-company-id": "12"
98
158
  }
99
159
  },
100
160
  {
101
- "key": "citizen",
161
+ "key": "co-citizen-id",
102
162
  "name": {
103
163
  "en": "Citizen Identity Card",
104
164
  "es": "Cédula de ciudadanía"
105
165
  },
106
166
  "map": {
107
- "dian-additional-account-id": "2",
108
167
  "dian-company-id": "13"
109
168
  }
110
169
  },
111
170
  {
112
- "key": "card+foreigner",
171
+ "key": "co-foreigner-id-card",
113
172
  "name": {
114
173
  "en": "Foreigner Identity Card",
115
174
  "es": "Tarjeta de Extranjería"
116
175
  },
117
176
  "map": {
118
- "dian-additional-account-id": "2",
119
177
  "dian-company-id": "21"
120
178
  }
121
179
  },
122
180
  {
123
- "key": "citizen+foreigner",
181
+ "key": "co-foreigner-id",
124
182
  "name": {
125
- "en": "Foreigner Citizen Identity Card",
183
+ "en": "Foreigner Citizen Identity",
126
184
  "es": "Cédula de extranjería"
127
185
  },
128
186
  "map": {
129
- "dian-additional-account-id": "2",
130
187
  "dian-company-id": "22"
131
188
  }
132
189
  },
133
190
  {
134
- "key": "tin+individual",
135
- "name": {
136
- "en": "TIN of an individual",
137
- "es": "NIT de persona natural"
138
- },
139
- "map": {
140
- "dian-additional-account-id": "2",
141
- "dian-company-id": "31"
142
- }
143
- },
144
- {
145
- "key": "passport",
191
+ "key": "co-passport",
146
192
  "name": {
147
193
  "en": "Passport",
148
194
  "es": "Pasaporte"
149
195
  },
150
196
  "map": {
151
- "dian-additional-account-id": "2",
152
197
  "dian-company-id": "41"
153
198
  }
154
199
  },
155
200
  {
156
- "key": "foreign",
201
+ "key": "co-foreign-id",
157
202
  "name": {
158
203
  "en": "Foreign Document",
159
204
  "es": "Documento de identificación extranjero"
160
205
  },
161
206
  "map": {
162
- "dian-additional-account-id": "2",
163
207
  "dian-company-id": "42"
164
208
  }
165
209
  },
166
210
  {
167
- "key": "pep",
211
+ "key": "co-pep",
168
212
  "name": {
169
213
  "en": "PEP - Special Permit to Stay",
170
214
  "es": "PEP - Permiso Especial de Permanencia"
171
215
  },
172
216
  "map": {
173
- "dian-additional-account-id": "2",
174
217
  "dian-company-id": "47"
175
218
  }
176
219
  },
177
220
  {
178
- "key": "tin+foreign",
179
- "name": {
180
- "en": "Foreign TIN",
181
- "es": "NIT de otro país"
182
- },
183
- "map": {
184
- "dian-additional-account-id": "1",
185
- "dian-company-id": "50"
186
- }
187
- },
188
- {
189
- "key": "nuip",
221
+ "key": "co-nuip",
190
222
  "name": {
191
223
  "en": "NUIP - National Unique Personal Identification Number",
192
224
  "es": "NUIP - Número Único de Identificación Personal"
193
225
  },
194
226
  "map": {
195
- "dian-additional-account-id": "2",
196
227
  "dian-company-id": "91"
197
228
  }
198
229
  }
199
230
  ],
200
- "extensions": [
201
- {
202
- "key": "co-dian-municipality",
203
- "name": {
204
- "en": "DIAN Municipality Code",
205
- "es": "Código de municipio DIAN"
206
- },
207
- "desc": {
208
- "en": "The municipality code as defined by the DIAN.\n\nFor further details on the list of possible codes, see:\n\n * https://www.dian.gov.co/atencionciudadano/formulariosinstructivos/Formularios/2007/Codigos_municipios_2007.pdf\n * https://github.com/ALAxHxC/MunicipiosDane"
209
- },
210
- "pattern": "^\\d{5}$"
211
- },
212
- {
213
- "key": "co-dian-correction",
214
- "name": {
215
- "en": "DIAN Correction Code",
216
- "es": "Código de corrección DIAN"
217
- },
218
- "codes": [
219
- {
220
- "code": "1",
221
- "name": {
222
- "en": "Partial refund",
223
- "es": "Devolución parcial"
224
- },
225
- "desc": {
226
- "en": "Partial refund of part of the goods or services.",
227
- "es": "Devolución de parte de los bienes; no aceptación de partes del servicio."
228
- }
229
- },
230
- {
231
- "code": "2",
232
- "name": {
233
- "en": "Revoked",
234
- "es": "Anulación"
235
- },
236
- "desc": {
237
- "en": "Previous document has been completely cancelled.",
238
- "es": "Anulación de la factura anterior."
239
- }
240
- },
241
- {
242
- "code": "3",
243
- "name": {
244
- "en": "Discount",
245
- "es": "Descuento"
246
- },
247
- "desc": {
248
- "en": "Partial or total discount.",
249
- "es": "Rebaja o descuento parcial o total."
250
- }
251
- },
252
- {
253
- "code": "4",
254
- "name": {
255
- "en": "Adjustment",
256
- "es": "Ajuste"
257
- },
258
- "desc": {
259
- "en": "Price adjustment.",
260
- "es": "Ajuste de precio."
261
- }
262
- },
263
- {
264
- "code": "5",
265
- "name": {
266
- "en": "Other",
267
- "es": "Otros"
268
- }
269
- }
270
- ]
271
- }
272
- ],
273
231
  "corrections": [
274
232
  {
275
233
  "schema": "bill/invoice",
data/data/regimes/de.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "https://gobl.org/draft-0/tax/regime",
3
3
  "name": {
4
- "en": "Germany",
5
- "fr": "Deutschland"
4
+ "de": "Deutschland",
5
+ "en": "Germany"
6
6
  },
7
7
  "time_zone": "Europe/Berlin",
8
8
  "country": "DE",
data/data/regimes/es.json CHANGED
@@ -138,58 +138,6 @@
138
138
  }
139
139
  }
140
140
  ],
141
- "identity_types": [
142
- {
143
- "key": "fiscal",
144
- "name": {
145
- "en": "National Tax Identity",
146
- "es": "Número de Identificación Fiscal"
147
- },
148
- "map": {
149
- "ticketbai-id-type": "02"
150
- }
151
- },
152
- {
153
- "key": "passport",
154
- "name": {
155
- "en": "Passport",
156
- "es": "Pasaporte"
157
- },
158
- "map": {
159
- "ticketbai-id-type": "03"
160
- }
161
- },
162
- {
163
- "key": "foreign",
164
- "name": {
165
- "en": "National ID Card or similar from a foreign country",
166
- "es": "Documento oficial de identificación expedido por el país o territorio de residencia"
167
- },
168
- "map": {
169
- "ticketbai-id-type": "04"
170
- }
171
- },
172
- {
173
- "key": "resident",
174
- "name": {
175
- "en": "Residential permit",
176
- "es": "Certificado de residencia"
177
- },
178
- "map": {
179
- "ticketbai-id-type": "05"
180
- }
181
- },
182
- {
183
- "key": "other",
184
- "name": {
185
- "en": "An other type of source not listed",
186
- "es": "Otro documento probatorio"
187
- },
188
- "map": {
189
- "ticketbai-id-type": "06"
190
- }
191
- }
192
- ],
193
141
  "extensions": [
194
142
  {
195
143
  "key": "es-facturae-correction",
@@ -398,7 +346,7 @@
398
346
  "es": "Código de Exención de TicketBAI"
399
347
  },
400
348
  "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."
349
+ "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."
402
350
  },
403
351
  "codes": [
404
352
  {
@@ -446,15 +394,36 @@
446
394
  {
447
395
  "code": "OT",
448
396
  "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."
397
+ "en": "Not subject: pursuant to Article 7 of the VAT Law - other cases of non-subject",
398
+ "es": "No sujeto: por el artículo 7 de la Ley del IVA - otros supuestos de no sujeción"
451
399
  }
452
400
  },
453
401
  {
454
402
  "code": "RL",
455
403
  "name": {
456
- "en": "Not subject: pursuant to localization rules.",
457
- "es": "No sujeto: por reglas de localización."
404
+ "en": "Not subject: pursuant to localization rules",
405
+ "es": "No sujeto: por reglas de localización"
406
+ }
407
+ },
408
+ {
409
+ "code": "VT",
410
+ "name": {
411
+ "en": "Not subject: sales made on behalf of third parties (amount not computable for VAT or IRPF purposes)",
412
+ "es": "No sujeto: ventas realizadas por cuenta de terceros (importe no computable a efectos de IVA ni de IRPF)"
413
+ }
414
+ },
415
+ {
416
+ "code": "IE",
417
+ "name": {
418
+ "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",
419
+ "es": "No sujeto en el TAI por reglas de localización, pero repercute impuesto extranjero, IPS/IGIC o IVA de otro estado miembro UE"
420
+ }
421
+ },
422
+ {
423
+ "code": "S2",
424
+ "name": {
425
+ "en": "Subject and not exempt: with reverse charge",
426
+ "es": "Sujeto y no exenta: con inversión del sujeto pasivo"
458
427
  }
459
428
  }
460
429
  ]
@@ -512,6 +481,48 @@
512
481
  ]
513
482
  }
514
483
  ],
484
+ "identity_keys": [
485
+ {
486
+ "key": "es-passport",
487
+ "name": {
488
+ "en": "Passport",
489
+ "es": "Pasaporte"
490
+ },
491
+ "map": {
492
+ "ticketbai-id-type": "03"
493
+ }
494
+ },
495
+ {
496
+ "key": "es-foreign-id",
497
+ "name": {
498
+ "en": "National ID Card or similar from a foreign country",
499
+ "es": "Documento oficial de identificación expedido por el país o territorio de residencia"
500
+ },
501
+ "map": {
502
+ "ticketbai-id-type": "04"
503
+ }
504
+ },
505
+ {
506
+ "key": "es-resident",
507
+ "name": {
508
+ "en": "Residential permit",
509
+ "es": "Certificado de residencia"
510
+ },
511
+ "map": {
512
+ "ticketbai-id-type": "05"
513
+ }
514
+ },
515
+ {
516
+ "key": "es-other",
517
+ "name": {
518
+ "en": "An other type of source not listed",
519
+ "es": "Otro documento probatorio"
520
+ },
521
+ "map": {
522
+ "ticketbai-id-type": "06"
523
+ }
524
+ }
525
+ ],
515
526
  "scenarios": [
516
527
  {
517
528
  "schema": "bill/invoice",
@@ -690,8 +701,8 @@
690
701
  {
691
702
  "schema": "bill/invoice",
692
703
  "types": [
693
- "corrective",
694
704
  "credit-note",
705
+ "corrective",
695
706
  "debit-note"
696
707
  ],
697
708
  "extensions": [
@@ -721,9 +732,6 @@
721
732
  "en": "Zero Rate",
722
733
  "es": "Tipo Cero"
723
734
  },
724
- "desc": {
725
- "en": "May be applied to exports and intra-community supplies."
726
- },
727
735
  "values": [
728
736
  {
729
737
  "percent": "0.0%"
@@ -862,7 +870,8 @@
862
870
  }
863
871
  ],
864
872
  "extensions": [
865
- "es-tbai-product"
873
+ "es-tbai-product",
874
+ "es-tbai-exemption"
866
875
  ],
867
876
  "map": {
868
877
  "facturae-tax-type-code": "01"
data/data/regimes/fr.json CHANGED
@@ -84,8 +84,8 @@
84
84
  {
85
85
  "schema": "bill/invoice",
86
86
  "types": [
87
- "corrective",
88
- "credit-note"
87
+ "credit-note",
88
+ "corrective"
89
89
  ]
90
90
  }
91
91
  ],
data/data/regimes/gb.json CHANGED
@@ -76,6 +76,14 @@
76
76
  ]
77
77
  }
78
78
  ],
79
+ "corrections": [
80
+ {
81
+ "schema": "bill/invoice",
82
+ "types": [
83
+ "credit-note"
84
+ ]
85
+ }
86
+ ],
79
87
  "categories": [
80
88
  {
81
89
  "code": "VAT",