gobl 0.24.1 → 0.24.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/data/addons/br-nfe-v4.json +481 -0
  3. data/data/addons/br-nfse-v1.json +235 -0
  4. data/data/addons/co-dian-v2.json +311 -0
  5. data/data/addons/de-xrechnung-v3.json +16 -0
  6. data/data/addons/de-zugferd-v2.json +16 -0
  7. data/data/addons/es-facturae-v3.json +359 -0
  8. data/data/addons/es-tbai-v1.json +225 -0
  9. data/data/addons/es-verifactu-v1.json +609 -0
  10. data/data/addons/eu-en16931-v2017.json +92 -0
  11. data/data/addons/fr-choruspro-v1.json +260 -0
  12. data/data/addons/fr-facturx-v1.json +16 -0
  13. data/data/addons/gr-mydata-v1.json +1495 -0
  14. data/data/addons/it-sdi-v1.json +1570 -0
  15. data/data/addons/it-ticket-v1.json +144 -0
  16. data/data/addons/mx-cfdi-v4.json +908 -0
  17. data/data/addons/pl-favat-v2.json +235 -0
  18. data/data/addons/pt-saft-v1.json +950 -0
  19. data/data/catalogues/cef.json +374 -0
  20. data/data/catalogues/iso.json +19 -0
  21. data/data/catalogues/untdid.json +10669 -0
  22. data/data/currency/iso.json +2378 -0
  23. data/data/currency/non-iso.json +128 -0
  24. data/data/schemas/bill/charge.json +125 -0
  25. data/data/schemas/bill/correction-options.json +54 -0
  26. data/data/schemas/bill/delivery-details.json +41 -0
  27. data/data/schemas/bill/delivery.json +412 -0
  28. data/data/schemas/bill/discount.json +137 -0
  29. data/data/schemas/bill/invoice.json +423 -0
  30. data/data/schemas/bill/line.json +433 -0
  31. data/data/schemas/bill/order.json +401 -0
  32. data/data/schemas/bill/ordering.json +107 -0
  33. data/data/schemas/bill/payment-details.json +36 -0
  34. data/data/schemas/bill/payment.json +424 -0
  35. data/data/schemas/bill/tax.json +45 -0
  36. data/data/schemas/bill/totals.json +84 -0
  37. data/data/schemas/cal/date-time.json +13 -0
  38. data/data/schemas/cal/date.json +13 -0
  39. data/data/schemas/cal/period.json +32 -0
  40. data/data/schemas/cal/time.json +13 -0
  41. data/data/schemas/cbc/code-map.json +16 -0
  42. data/data/schemas/cbc/code.json +15 -0
  43. data/data/schemas/cbc/definition.json +67 -0
  44. data/data/schemas/cbc/key.json +15 -0
  45. data/data/schemas/cbc/meta.json +16 -0
  46. data/data/schemas/cbc/source.json +37 -0
  47. data/data/schemas/currency/amount.json +32 -0
  48. data/data/schemas/currency/code.json +734 -0
  49. data/data/schemas/currency/exchange-rate.json +43 -0
  50. data/data/schemas/dsig/digest.json +27 -0
  51. data/data/schemas/dsig/signature.json +12 -0
  52. data/data/schemas/envelope.json +41 -0
  53. data/data/schemas/head/header.json +62 -0
  54. data/data/schemas/head/link.json +42 -0
  55. data/data/schemas/head/stamp.json +27 -0
  56. data/data/schemas/i18n/string.json +18 -0
  57. data/data/schemas/l10n/code.json +13 -0
  58. data/data/schemas/l10n/iso-country-code.json +1010 -0
  59. data/data/schemas/l10n/tax-country-code.json +1022 -0
  60. data/data/schemas/note/message.json +43 -0
  61. data/data/schemas/num/amount.json +13 -0
  62. data/data/schemas/num/percentage.json +13 -0
  63. data/data/schemas/org/address.json +105 -0
  64. data/data/schemas/org/attachment.json +58 -0
  65. data/data/schemas/org/coordinates.json +33 -0
  66. data/data/schemas/org/document-ref.json +117 -0
  67. data/data/schemas/org/email.json +37 -0
  68. data/data/schemas/org/identity.json +57 -0
  69. data/data/schemas/org/image.json +70 -0
  70. data/data/schemas/org/inbox.json +49 -0
  71. data/data/schemas/org/item.json +96 -0
  72. data/data/schemas/org/name.json +59 -0
  73. data/data/schemas/org/note.json +184 -0
  74. data/data/schemas/org/party.json +129 -0
  75. data/data/schemas/org/person.json +90 -0
  76. data/data/schemas/org/registration.json +66 -0
  77. data/data/schemas/org/telephone.json +32 -0
  78. data/data/schemas/org/unit.json +350 -0
  79. data/data/schemas/org/website.json +38 -0
  80. data/data/schemas/pay/advance.json +211 -0
  81. data/data/schemas/pay/instructions.json +245 -0
  82. data/data/schemas/pay/terms.json +128 -0
  83. data/data/schemas/regimes/mx/food-vouchers.json +111 -0
  84. data/data/schemas/regimes/mx/fuel-account-balance.json +179 -0
  85. data/data/schemas/schema/object.json +12 -0
  86. data/data/schemas/tax/addon-def.json +288 -0
  87. data/data/schemas/tax/catalogue-def.json +37 -0
  88. data/data/schemas/tax/extensions.json +16 -0
  89. data/data/schemas/tax/identity.json +45 -0
  90. data/data/schemas/tax/regime-def.json +513 -0
  91. data/data/schemas/tax/set.json +139 -0
  92. data/data/schemas/tax/total.json +135 -0
  93. data/lib/gobl/extensions/tax/addon_helper.rb +37 -0
  94. data/lib/gobl/version.rb +1 -1
  95. data/lib/gobl.rb +1 -0
  96. metadata +93 -1
@@ -0,0 +1,609 @@
1
+ {
2
+ "$schema": "https://gobl.org/draft-0/tax/addon-def",
3
+ "key": "es-verifactu-v1",
4
+ "name": {
5
+ "en": "Spain VERI*FACTU V1"
6
+ },
7
+ "sources": [
8
+ {
9
+ "title": {
10
+ "en": "VERI*FACTU error response code list"
11
+ },
12
+ "url": "https://prewww2.aeat.es/static_files/common/internet/dep/aplicaciones/es/aeat/tikeV1.0/cont/ws/errores.properties"
13
+ }
14
+ ],
15
+ "extensions": [
16
+ {
17
+ "key": "es-verifactu-doc-type",
18
+ "name": {
19
+ "en": "Invoice Type Code",
20
+ "es": "Código de Tipo de Factura"
21
+ },
22
+ "desc": {
23
+ "en": "Code used to identify the type of invoice being sent. This will be\ndetermined automatically by GOBL during normalization according\nto the scenario definitions.\n\nThe codes `R2`, `R3`, and `R4` are not covered by GOBL's scenarios\nand will need to be set manually if needed.\n\nValues correspond to L2 list."
24
+ },
25
+ "sources": [
26
+ {
27
+ "title": {
28
+ "en": "Verifactu Ministerial Order",
29
+ "es": "Orden Ministerial de Verifactu"
30
+ },
31
+ "url": "https://www.boe.es/diario_boe/txt.php?id=BOE-A-2024-22138"
32
+ }
33
+ ],
34
+ "values": [
35
+ {
36
+ "code": "F1",
37
+ "name": {
38
+ "en": "Invoice (Article 6, 7.2 and 7.3 of RD 1619/2012)",
39
+ "es": "Factura (Art. 6, 7.2 y 7.3 del RD 1619/2012)"
40
+ },
41
+ "desc": {
42
+ "en": "For regular invoices."
43
+ }
44
+ },
45
+ {
46
+ "code": "F2",
47
+ "name": {
48
+ "en": "Simplified invoice (Article 6.1.d) of RD 1619/2012)",
49
+ "es": "Factura Simplificada (Art. 6.1.d) del RD 1619/2012)"
50
+ },
51
+ "desc": {
52
+ "en": "To use for B2C invoices where details about the customer are not\nnormally required."
53
+ }
54
+ },
55
+ {
56
+ "code": "F3",
57
+ "name": {
58
+ "en": "Invoice issued as replacement of simplified invoice",
59
+ "es": "Factura emitida en sustitución de facturas simplificadas"
60
+ },
61
+ "desc": {
62
+ "en": "To use when a simplified invoice is replaced by a regular invoice."
63
+ }
64
+ },
65
+ {
66
+ "code": "R1",
67
+ "name": {
68
+ "en": "Rectified invoice: articles 80.1, 80.2, and 80.6",
69
+ "es": "Factura rectificativa: art. 80 Uno, Dos y Seis LIVA"
70
+ },
71
+ "desc": {
72
+ "en": "Use this code when correcting most commercial invoices due to cancellations\nor discounts. This is currently set as the default buy may be overridden if\nneeded."
73
+ }
74
+ },
75
+ {
76
+ "code": "R2",
77
+ "name": {
78
+ "en": "Rectified invoice: article 80.3",
79
+ "es": "Factura rectificativa: artículo 80.3"
80
+ },
81
+ "desc": {
82
+ "en": "To use for customer declared insolvency proceedings when a court\nis involved."
83
+ }
84
+ },
85
+ {
86
+ "code": "R3",
87
+ "name": {
88
+ "en": "Rectified invoice: article 80.4",
89
+ "es": "Factura rectificativa: artículo 80.4"
90
+ },
91
+ "desc": {
92
+ "en": "For unpaid invoices that are not declared as related to insolvency\nand related to bad debt after a 6 or 12 month waiting period."
93
+ }
94
+ },
95
+ {
96
+ "code": "R4",
97
+ "name": {
98
+ "en": "Rectified invoice: other",
99
+ "es": "Factura rectificativa: resto"
100
+ },
101
+ "desc": {
102
+ "en": "Legal or court-imposed corrections that do not fall under any of\nthe other corrective reasons."
103
+ }
104
+ },
105
+ {
106
+ "code": "R5",
107
+ "name": {
108
+ "en": "Rectified invoice: simplified invoices",
109
+ "es": "Factura rectificativa: facturas simplificadas"
110
+ },
111
+ "desc": {
112
+ "en": "Always used when correcting simplified or B2C invoices."
113
+ }
114
+ }
115
+ ]
116
+ },
117
+ {
118
+ "key": "es-verifactu-correction-type",
119
+ "name": {
120
+ "en": "Verifactu Correction Type Code",
121
+ "es": "Código de Tipo de Corrección de Verifactu"
122
+ },
123
+ "desc": {
124
+ "en": "Correction type code used to identify the type of correction being\nmade. Values map to L3 list.\n\nCode is determined automatically according to the invoice type:\n\n| Invoice Type\t\t| Code |\n|-------------------|------|\n| `corrective`\t\t| `S` |\n| `credit-note`\t\t| `I` |\n| `debit-note`\t\t| `I` |"
125
+ },
126
+ "values": [
127
+ {
128
+ "code": "S",
129
+ "name": {
130
+ "en": "Substitution",
131
+ "es": "Por Sustitución"
132
+ }
133
+ },
134
+ {
135
+ "code": "I",
136
+ "name": {
137
+ "en": "Differences",
138
+ "es": "Por Diferencias"
139
+ }
140
+ }
141
+ ]
142
+ },
143
+ {
144
+ "key": "es-verifactu-op-class",
145
+ "name": {
146
+ "en": "Subject and Not Exempt Operation Class Code",
147
+ "es": "Clave de la Operación Sujeta y no Exenta o de la Operación no Sujeta."
148
+ },
149
+ "desc": {
150
+ "en": "Classification code for operations that are subject to tax and not exempt, or for operations not subject to tax.\n\nGOBL will attempt to automatically assign operation class codes based on tax key, but if your workflow requires more control, you may prefer to let users select the appropriate operation class and exemption code for each case.\n\nAutomatic mapping of tax combo keys to operation classes:\n\n| Operation Class | Tax Key |\n|-----------------|-------------------------|\n| `S1` | `standard`, `reduced`, `super-reduced`, `zero` |\n| `S2` | `reverse-charge` |\n| `N1` | `outside-scope` |\n| `N2` | `outside-scope` (default) |\n\nThis extension maps to the `CalificacionOperacion` field and must not be used together with the `es-verifactu-exempt` extension. Values correspond to the L9 list.\n\nFor further guidance on applying these codes, refer to the AEAT FAQ:\n * https://sede.agenciatributaria.gob.es/Sede/impuestos-tasas/iva/iva-libros-registro-iva-traves-aeat/preguntas-frecuentes/3-libro-registro-facturas-expedidas.html?faqId=b5556c3d02bc9510VgnVCM100000dc381e0aRCRD"
151
+ },
152
+ "values": [
153
+ {
154
+ "code": "S1",
155
+ "name": {
156
+ "en": "Subject and Not Exempt - Without reverse charge",
157
+ "es": "Operación Sujeta y No exenta - Sin inversión del sujeto pasivo"
158
+ },
159
+ "desc": {
160
+ "en": "General sales with VAT percent."
161
+ }
162
+ },
163
+ {
164
+ "code": "S2",
165
+ "name": {
166
+ "en": "Subject and Not Exempt - With reverse charge",
167
+ "es": "Operación Sujeta y No exenta - Con Inversión del sujeto pasivo"
168
+ },
169
+ "desc": {
170
+ "en": "Use when the supply is **subject to VAT**, VAT is **not charged by the supplier**, but the **buyer** must self-account under an applicable **reverse-charge regime**. Percent present as zero."
171
+ }
172
+ },
173
+ {
174
+ "code": "N1",
175
+ "name": {
176
+ "en": "Not Subject - Articles 7, 14, others",
177
+ "es": "Operación No Sujeta artículo 7, 14, otros"
178
+ },
179
+ "desc": {
180
+ "en": "Use when the operations fall **outside the VAT scope** under Spanish VAT law (e.g. transfers of companies, certain exchanges of goods, contributions of goods, internal operations of public entities, ...). VAT is **not chargeable** or declared."
181
+ }
182
+ },
183
+ {
184
+ "code": "N2",
185
+ "name": {
186
+ "en": "Not Subject - Due to location rules",
187
+ "es": "Operación No Sujeta por Reglas de localización"
188
+ },
189
+ "desc": {
190
+ "en": "Use when the operation is **not subject to VAT due to its place of supply** (e.g. services provided to non‑EU B2B customers that are deemed outside Spanish VAT by location rules)."
191
+ }
192
+ }
193
+ ]
194
+ },
195
+ {
196
+ "key": "es-verifactu-exempt",
197
+ "name": {
198
+ "en": "Verifactu Exemption Code",
199
+ "es": "Código de Exención de Impuesto de Verifactu"
200
+ },
201
+ "desc": {
202
+ "en": "Exemption code used to explain why the operation is exempt from taxes.\n\nThis extension maps to the field `OperacionExenta`, and **cannot** be provided\nalongside the `es-verifactu-op-class` extension. Values correspond to the\nL10 list.\n\nThe follow mappings will be made automatically by GOBL during normalization.\n\n| Tax Key | Exemption Codes |\n|-------------------|----------------------------|\n| `exempt` | `E1` (default), `E6` |\n| `export` | `E2` (default), `E3`, `E4` |\n| `intra-community` | `E5` |"
203
+ },
204
+ "values": [
205
+ {
206
+ "code": "E1",
207
+ "name": {
208
+ "en": "Exempt: pursuant to Article 20. Exemptions in internal operations.",
209
+ "es": "Exenta: por el artículo 20. Exenciones en operaciones interiores."
210
+ },
211
+ "desc": {
212
+ "en": "Use for **domestic VAT-exempt operations**: healthcare by medical professionals, education by authorised centres, social assistance, certain cultural services, financial and insurance services, letting of dwellings, etc."
213
+ }
214
+ },
215
+ {
216
+ "code": "E2",
217
+ "name": {
218
+ "en": "Exempt: pursuant to Article 21. Exemptions in exports of goods.",
219
+ "es": "Exenta: por el artículo 21. Exenciones en las exportaciones de bienes."
220
+ },
221
+ "desc": {
222
+ "en": "Use for **exports of goods outside the EU** (including the tax-free travellers regime where the sale is exported) and services directly related to those exports, under the conditions of the article."
223
+ }
224
+ },
225
+ {
226
+ "code": "E3",
227
+ "name": {
228
+ "en": "Exempt: pursuant to Article 22. Exemptions in operations asimilated to exports.",
229
+ "es": "Exenta: por el artículo 22. Exenciones en las operaciones asimiladas a las exportaciones."
230
+ },
231
+ "desc": {
232
+ "en": "Use for **operations assimilated to exports**, e.g., supplies/repairs/charter of qualifying ships or aircraft, avituallamiento (provisioning) of such vessels, and certain services directly connected with international transport."
233
+ }
234
+ },
235
+ {
236
+ "code": "E4",
237
+ "name": {
238
+ "en": "Exempt: pursuant to Articles 23 and 24. Exemptions related to temporary deposit, customs and fiscal regimes, and other situations.",
239
+ "es": "Exenta: por el artículos 23 y 24. Exenciones relativas a las situaciones de depósito temporal, regímenes aduaneros y fiscales, y otras situaciones."
240
+ },
241
+ "desc": {
242
+ "en": "Use for operations linked to **free zones, customs/duty-free warehouses and other customs or fiscal regimes** (e.g., depósitos francos, depósito temporal, perfeccionamiento activo/pasivo, depósito distinto del aduanero), while the goods remain under those regimes."
243
+ }
244
+ },
245
+ {
246
+ "code": "E5",
247
+ "name": {
248
+ "en": "Exempt: pursuant to Article 25. Exemptions in the delivery of goods destined to another Member State.",
249
+ "es": "Exenta: por el artículo 25. Exenciones en las entregas de bienes destinados a otro Estado miembro."
250
+ },
251
+ "desc": {
252
+ "en": "Use for **intra-Community supplies of goods** from Spain to another EU Member State when the buyer is VAT-identified in another Member State and the goods are shipped there"
253
+ }
254
+ },
255
+ {
256
+ "code": "E6",
257
+ "name": {
258
+ "en": "Exempt: pursuant to other reasons",
259
+ "es": "Exenta: por otra causa"
260
+ },
261
+ "desc": {
262
+ "en": "Use when the operation is exempt for a reason not covered by Articles 20–25, and a lawful exemption applies (catch-all “Exenta por otros”). Document the legal basis on the invoice text."
263
+ }
264
+ }
265
+ ]
266
+ },
267
+ {
268
+ "key": "es-verifactu-regime",
269
+ "name": {
270
+ "en": "VAT/IGIC Regime Code",
271
+ "es": "Código de Régimen de IVA/IGIC"
272
+ },
273
+ "desc": {
274
+ "en": "Identify the type of VAT or IGIC regime applied to the operation. This list combines\nlists L8A which include values for VAT, and L8B for IGIC.\n\nMaps to the field `ClaveRegimen`, and is required for all VAT and IGIC operations.\nValues correspond to L8A (VAT) and L8B (IGIC) lists.\n\nThe regime code must be assigned for each tax combo. If no regime code is provided,\nGOBL will try to assign a code from the following tax combo contexts:\n\n| Combo Context\t\t\t\t| Regime Code |\n|---------------------------|-------------|\n| Key `standard`\t\t\t| `01` |\n| Key `export`\t\t\t | `02` |\n| Has surcharge\t\t\t\t| `18` |"
275
+ },
276
+ "values": [
277
+ {
278
+ "code": "01",
279
+ "name": {
280
+ "en": "General regime operation",
281
+ "es": "Operación de régimen general"
282
+ }
283
+ },
284
+ {
285
+ "code": "02",
286
+ "name": {
287
+ "en": "Export",
288
+ "es": "Exportación"
289
+ }
290
+ },
291
+ {
292
+ "code": "03",
293
+ "name": {
294
+ "en": "Special regime for used goods, art objects, antiques and collectibles",
295
+ "es": "Operaciones a las que se aplique el régimen especial de bienes usados, objetos de arte, antigüedades y objetos de colección"
296
+ }
297
+ },
298
+ {
299
+ "code": "04",
300
+ "name": {
301
+ "en": "Special regime for investment gold",
302
+ "es": "Régimen especial del oro de inversión"
303
+ }
304
+ },
305
+ {
306
+ "code": "05",
307
+ "name": {
308
+ "en": "Special regime for travel agencies",
309
+ "es": "Régimen especial de las agencias de viajes"
310
+ }
311
+ },
312
+ {
313
+ "code": "06",
314
+ "name": {
315
+ "en": "Special regime for VAT/IGIC groups (Advanced Level)",
316
+ "es": "Régimen especial grupo de entidades en IVA/IGIC (Nivel Avanzado)"
317
+ }
318
+ },
319
+ {
320
+ "code": "07",
321
+ "name": {
322
+ "en": "Special cash accounting regime",
323
+ "es": "Régimen especial del criterio de caja"
324
+ }
325
+ },
326
+ {
327
+ "code": "08",
328
+ "name": {
329
+ "en": "Operations subject to a different regime",
330
+ "es": "Operaciones sujetas a un régimen diferente"
331
+ }
332
+ },
333
+ {
334
+ "code": "09",
335
+ "name": {
336
+ "en": "Billing of travel agency services acting as mediators in name and on behalf of others",
337
+ "es": "Facturación de las prestaciones de servicios de agencias de viaje que actúan como mediadoras en nombre y por cuenta ajena"
338
+ }
339
+ },
340
+ {
341
+ "code": "10",
342
+ "name": {
343
+ "en": "Collection of professional fees or rights on behalf of third parties",
344
+ "es": "Cobros por cuenta de terceros de honorarios profesionales o de derechos derivados de la propiedad industrial"
345
+ }
346
+ },
347
+ {
348
+ "code": "11",
349
+ "name": {
350
+ "en": "Business premises rental operations",
351
+ "es": "Operaciones de arrendamiento de local de negocio"
352
+ }
353
+ },
354
+ {
355
+ "code": "14",
356
+ "name": {
357
+ "en": "Invoice with pending VAT/IGIC accrual in work certifications for Public Administration",
358
+ "es": "Factura con IVA/IGIC pendiente de devengo en certificaciones de obra cuyo destinatario sea una Administración Pública"
359
+ }
360
+ },
361
+ {
362
+ "code": "15",
363
+ "name": {
364
+ "en": "Invoice with pending VAT/IGIC accrual in successive tract operations",
365
+ "es": "Factura con IVA/IGIC pendiente de devengo en operaciones de tracto sucesivo"
366
+ }
367
+ },
368
+ {
369
+ "code": "17",
370
+ "name": {
371
+ "en": "Operation under OSS and IOSS regimes (VAT) / Special regime for retail traders. (IGIC)",
372
+ "es": "Operación acogida a alguno de los regímenes previstos en el capítulo XI del título IX (OSS e IOSS, IVA) / Régimen especial de comerciante minorista. (IGIC)"
373
+ }
374
+ },
375
+ {
376
+ "code": "18",
377
+ "name": {
378
+ "en": "Equivalence surcharge (VAT) / Special regime for small traders or retailers (IGIC)",
379
+ "es": "Recargo de equivalencia (IVA) / Régimen especial del pequeño comerciante o minorista (IGIC)"
380
+ }
381
+ },
382
+ {
383
+ "code": "19",
384
+ "name": {
385
+ "en": "Operations included in the Special Regime for Agriculture, Livestock and Fisheries",
386
+ "es": "Operaciones de actividades incluidas en el Régimen Especial de Agricultura, Ganadería y Pesca (REAGYP)"
387
+ }
388
+ },
389
+ {
390
+ "code": "20",
391
+ "name": {
392
+ "en": "Simplified regime (VAT only)",
393
+ "es": "Régimen simplificado (IVA only)"
394
+ }
395
+ }
396
+ ]
397
+ },
398
+ {
399
+ "key": "es-verifactu-identity-type",
400
+ "name": {
401
+ "en": "Identity Type Code",
402
+ "es": "Código de Tipo de Identidad"
403
+ },
404
+ "desc": {
405
+ "en": "Identity code used to identify the type of identity document used by the customer\ndefined in the L7 list.\n\nThe regular Party Tax Identity is preferred over using a specific identity type\ncode, and will be mapped automatically as follows:\n\n- Spanish Tax IDs will be mapped to the `NIF` field.\n- EU Tax IDs will be mapped to the `IDOtro` field with code `02`.\n- Non-EU Tax IDs will be mapped to the `IDOtro` field with code `04`.\n\nVERI*FACTU will perform validation on both Spanish and EU Tax IDs, so it is important\nto provide the correct details.\n\nThe following identity `key` values will be mapped automatically to an extension by the \naddon for the following keys:\n\n- `passport`: `03`\n- `foreign`: `04`\n- `resident`: `05`\n- `other`: `06`\n\nThe `07` \"not registered in census\" code is not mapped automatically, but\ncan be provided directly if needed.\n\nExample identity of a UK passport:\n\n```\n{\n\t\"identities\": [\n\t\t{\n\t\t\t\"key\": \"passport\",\n\t\t\t\"country\": \"GB\",\n\t\t\t\"code\": \"123456789\"\n\t\t}\n\t]\n}\n```\n\nWill be normalized to:\n\n```\n{\n\t\"identities\": [\n\t\t{\n\t\t\t\"key\": \"passport\",\n\t\t\t\"country\": \"GB\",\n\t\t\t\"code\": \"123456789\",\n\t\t\t\"ext\": {\n\t\t\t\t\"es-verifactu-identity-type\": \"03\"\n\t\t\t}\n\t\t}\n\t]\n}\n```"
406
+ },
407
+ "values": [
408
+ {
409
+ "code": "02",
410
+ "name": {
411
+ "en": "NIF-VAT Identity (VIES)",
412
+ "es": "NIF-VAT (VIES)"
413
+ }
414
+ },
415
+ {
416
+ "code": "03",
417
+ "name": {
418
+ "en": "Passport",
419
+ "es": "Pasaporte"
420
+ }
421
+ },
422
+ {
423
+ "code": "04",
424
+ "name": {
425
+ "en": "Foreign Identity Document",
426
+ "es": "Documento de Identidad Extranjero"
427
+ }
428
+ },
429
+ {
430
+ "code": "05",
431
+ "name": {
432
+ "en": "Residential Certificate",
433
+ "es": "Certificado Residencia"
434
+ }
435
+ },
436
+ {
437
+ "code": "06",
438
+ "name": {
439
+ "en": "Other Identity Document",
440
+ "es": "Otro Documento Probatorio"
441
+ }
442
+ },
443
+ {
444
+ "code": "07",
445
+ "name": {
446
+ "en": "Not registered in census",
447
+ "es": "No censado"
448
+ }
449
+ }
450
+ ]
451
+ },
452
+ {
453
+ "key": "es-verifactu-simplified-art7273",
454
+ "name": {
455
+ "en": "Simplified Invoice Art. 7.2 and 7.3, RD 1619/2012",
456
+ "es": "Factura Simplificada Articulo 7,2 y 7,3 RD 1619/2012"
457
+ },
458
+ "desc": {
459
+ "en": "This extensions covers a specific use-case when the customer specifically\nrequests that the invoice includes their fiscal details, but they are\nnot registered for tax.\n\nMaps to the `FacturaSimplificadaArt7273` field in Verifactu documents.\n\nCan only be true when the invoice type (`TipoFactura`) is one of: `F1`,\n`F3`, `R1`, `R2`, `R3`, or `R4`."
460
+ },
461
+ "values": [
462
+ {
463
+ "code": "S",
464
+ "name": {
465
+ "en": "Yes",
466
+ "es": "Sí"
467
+ }
468
+ },
469
+ {
470
+ "code": "N",
471
+ "name": {
472
+ "en": "No",
473
+ "es": "No"
474
+ }
475
+ }
476
+ ]
477
+ },
478
+ {
479
+ "key": "es-verifactu-issuer-type",
480
+ "name": {
481
+ "en": "Issuer Type Code",
482
+ "es": "Emitida por Tercero o Destinatario"
483
+ },
484
+ "desc": {
485
+ "en": "Indicates whether the invoice is issued by a third party or by the customer\nthemselves.\n\nMapped to the field `EmitidaPorTerceroODestinatario` in Verifactu documents,\nwith list L6.\n\nThe `self-billed` tag will automatically be set this extension in the invoice\nto `D`.\n\nIf the `issuer` field is set in the invoice's ordering section, then this\nextension will be set to `T`."
486
+ },
487
+ "values": [
488
+ {
489
+ "code": "T",
490
+ "name": {
491
+ "en": "Issued by Third Party",
492
+ "es": "Emitida por Tercero"
493
+ }
494
+ },
495
+ {
496
+ "code": "D",
497
+ "name": {
498
+ "en": "Issued by Customer",
499
+ "es": "Emitida por Destinatario"
500
+ }
501
+ }
502
+ ]
503
+ }
504
+ ],
505
+ "tags": [
506
+ {
507
+ "schema": "bill/invoice",
508
+ "list": [
509
+ {
510
+ "key": "replacement",
511
+ "name": {
512
+ "en": "Replacement Invoice",
513
+ "es": "Factura de Sustitución"
514
+ },
515
+ "desc": {
516
+ "en": "Used under special circumstances to indicate that this invoice replaces a previously\nissued simplified invoice. The previous document was correct, but the replacement is\nnecessary to provide tax details of the customer."
517
+ }
518
+ }
519
+ ]
520
+ }
521
+ ],
522
+ "scenarios": [
523
+ {
524
+ "schema": "bill/invoice",
525
+ "list": [
526
+ {
527
+ "name": {
528
+ "en": "Standard Invoice",
529
+ "es": "Factura Estándar"
530
+ },
531
+ "desc": {
532
+ "en": "Standard invoice used for B2B transactions, where the complete fiscal details of the customer\nare available."
533
+ },
534
+ "type": [
535
+ "standard"
536
+ ],
537
+ "ext": {
538
+ "es-verifactu-doc-type": "F1"
539
+ }
540
+ },
541
+ {
542
+ "name": {
543
+ "en": "Simplified Invoice",
544
+ "es": "Factura Simplificada"
545
+ },
546
+ "desc": {
547
+ "en": "Used for B2C transactions when the client details are not available."
548
+ },
549
+ "type": [
550
+ "standard"
551
+ ],
552
+ "tags": [
553
+ "simplified"
554
+ ],
555
+ "ext": {
556
+ "es-verifactu-doc-type": "F2"
557
+ }
558
+ },
559
+ {
560
+ "name": {
561
+ "en": "Replacement Invoice",
562
+ "es": "Factura Emitida en Sustitución"
563
+ },
564
+ "desc": {
565
+ "en": "Used under special circumstances to indicate that this invoice replaces a previously\nissued simplified invoice. The previous document was correct, but the replacement is\nnecessary to provide tax details of the customer."
566
+ },
567
+ "type": [
568
+ "standard"
569
+ ],
570
+ "tags": [
571
+ "replacement"
572
+ ],
573
+ "ext": {
574
+ "es-verifactu-doc-type": "F3"
575
+ }
576
+ },
577
+ {
578
+ "name": {
579
+ "en": "Simplified Corrective Invoice",
580
+ "es": "Factura Simplificada Correctiva"
581
+ },
582
+ "desc": {
583
+ "en": "This scenario covers when a simplified invoice is being corrected either\nwith a credit or debit note, or a corrective replacement invoice.\n\nIn VERI*FACTU, only the document type `R5` is supported for corrective\ninvoices."
584
+ },
585
+ "type": [
586
+ "corrective",
587
+ "credit-note",
588
+ "debit-note"
589
+ ],
590
+ "tags": [
591
+ "simplified"
592
+ ],
593
+ "ext": {
594
+ "es-verifactu-doc-type": "R5"
595
+ }
596
+ }
597
+ ]
598
+ }
599
+ ],
600
+ "corrections": [
601
+ {
602
+ "schema": "bill/invoice",
603
+ "extensions": [
604
+ "es-verifactu-doc-type"
605
+ ],
606
+ "copy_tax": true
607
+ }
608
+ ]
609
+ }