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,513 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://gobl.org/draft-0/tax/regime-def",
4
+ "$ref": "#/$defs/RegimeDef",
5
+ "$defs": {
6
+ "CategoryDef": {
7
+ "properties": {
8
+ "code": {
9
+ "$ref": "https://gobl.org/draft-0/cbc/code",
10
+ "title": "Code",
11
+ "description": "Code to be used in documents"
12
+ },
13
+ "name": {
14
+ "$ref": "https://gobl.org/draft-0/i18n/string",
15
+ "title": "Name",
16
+ "description": "Short name of the category to be used instead of code in output"
17
+ },
18
+ "title": {
19
+ "$ref": "https://gobl.org/draft-0/i18n/string",
20
+ "title": "Title",
21
+ "description": "Human name for the code to use for titles"
22
+ },
23
+ "desc": {
24
+ "$ref": "https://gobl.org/draft-0/i18n/string",
25
+ "title": "Description",
26
+ "description": "Useful description of the category."
27
+ },
28
+ "retained": {
29
+ "type": "boolean",
30
+ "title": "Retained",
31
+ "description": "Retained when true implies that the tax amount will be retained\nby the buyer on behalf of the supplier, and thus subtracted from\nthe invoice taxable base total. Typically used for taxes related to\nincome."
32
+ },
33
+ "informative": {
34
+ "type": "boolean",
35
+ "title": "Informative",
36
+ "description": "Informative when true implies that the tax amount will be calculated\nand reported but will not affect the invoice totals. Typically used\nfor taxes that are embedded in the base amount or don't impact the\nfinal payable amount."
37
+ },
38
+ "keys": {
39
+ "items": {
40
+ "$ref": "#/$defs/KeyDef"
41
+ },
42
+ "type": "array",
43
+ "title": "Keys",
44
+ "description": "Specific tax definitions inside this category."
45
+ },
46
+ "rates": {
47
+ "items": {
48
+ "$ref": "#/$defs/RateDef"
49
+ },
50
+ "type": "array",
51
+ "title": "Rates",
52
+ "description": "Rates defines the set of rates that can be used with this category."
53
+ },
54
+ "extensions": {
55
+ "items": {
56
+ "$ref": "https://gobl.org/draft-0/cbc/key"
57
+ },
58
+ "type": "array",
59
+ "title": "Extensions",
60
+ "description": "Extensions defines a list of extension keys that may be used or required\nas an alternative or alongside choosing a rate for the tax category.\nEvery key must be defined in the Regime's extensions table."
61
+ },
62
+ "map": {
63
+ "$ref": "https://gobl.org/draft-0/cbc/code-map",
64
+ "title": "Map",
65
+ "description": "Map defines a set of regime specific code mappings."
66
+ },
67
+ "sources": {
68
+ "items": {
69
+ "$ref": "https://gobl.org/draft-0/cbc/source"
70
+ },
71
+ "type": "array",
72
+ "title": "Sources",
73
+ "description": "List of sources for the information contained in this category."
74
+ },
75
+ "ext": {
76
+ "$ref": "https://gobl.org/draft-0/tax/extensions",
77
+ "title": "Extensions",
78
+ "description": "Extension key-value pairs that will be copied to the tax combo if this\ncategory is used."
79
+ },
80
+ "meta": {
81
+ "$ref": "https://gobl.org/draft-0/cbc/meta",
82
+ "title": "Meta",
83
+ "description": "Meta contains additional information about the category that is relevant\nfor local frequently used formats."
84
+ }
85
+ },
86
+ "type": "object",
87
+ "required": [
88
+ "code",
89
+ "name"
90
+ ],
91
+ "description": "CategoryDef contains the definition of a general type of tax inside a region."
92
+ },
93
+ "CorrectionDefinition": {
94
+ "properties": {
95
+ "schema": {
96
+ "type": "string",
97
+ "title": "Schema",
98
+ "description": "Partial or complete schema URL for the document type supported by correction."
99
+ },
100
+ "types": {
101
+ "items": {
102
+ "$ref": "https://gobl.org/draft-0/cbc/key"
103
+ },
104
+ "type": "array",
105
+ "title": "Types",
106
+ "description": "The types of sub-documents supported by the regime"
107
+ },
108
+ "extensions": {
109
+ "items": {
110
+ "$ref": "https://gobl.org/draft-0/cbc/key"
111
+ },
112
+ "type": "array",
113
+ "title": "Extensions",
114
+ "description": "Extension keys that can be included"
115
+ },
116
+ "reason_required": {
117
+ "type": "boolean",
118
+ "title": "Reason Required",
119
+ "description": "ReasonRequired when true implies that a reason must be provided"
120
+ },
121
+ "stamps": {
122
+ "items": {
123
+ "$ref": "https://gobl.org/draft-0/cbc/key"
124
+ },
125
+ "type": "array",
126
+ "title": "Stamps",
127
+ "description": "Stamps that must be copied from the preceding document."
128
+ },
129
+ "copy_tax": {
130
+ "type": "boolean",
131
+ "title": "Copy Tax Totals",
132
+ "description": "Copy tax from the preceding document to the document ref."
133
+ }
134
+ },
135
+ "type": "object",
136
+ "required": [
137
+ "schema"
138
+ ],
139
+ "description": "CorrectionDefinition contains details about what can be defined in ."
140
+ },
141
+ "CorrectionSet": {
142
+ "items": {
143
+ "$ref": "#/$defs/CorrectionDefinition"
144
+ },
145
+ "type": "array",
146
+ "description": "CorrectionSet defines a set of correction definitions for a selection of schemas."
147
+ },
148
+ "KeyDef": {
149
+ "properties": {
150
+ "key": {
151
+ "$ref": "https://gobl.org/draft-0/cbc/key",
152
+ "title": "Key",
153
+ "description": "Key identifies this rate within the system"
154
+ },
155
+ "name": {
156
+ "$ref": "https://gobl.org/draft-0/i18n/string",
157
+ "title": "Name",
158
+ "description": "Human name of the rate set"
159
+ },
160
+ "desc": {
161
+ "$ref": "https://gobl.org/draft-0/i18n/string",
162
+ "title": "Description",
163
+ "description": "Useful description of the rate."
164
+ },
165
+ "no_percent": {
166
+ "type": "boolean",
167
+ "title": "No Percent",
168
+ "description": "NoPercent when true implies that the rate when used in a tax Combo should\nnot define a percent value."
169
+ }
170
+ },
171
+ "type": "object",
172
+ "description": "KeyDef defines a key that can be used inside a tax category."
173
+ },
174
+ "RateDef": {
175
+ "properties": {
176
+ "rate": {
177
+ "$ref": "https://gobl.org/draft-0/cbc/key",
178
+ "title": "Rate",
179
+ "description": "Rate defines the key for which this rate applies."
180
+ },
181
+ "keys": {
182
+ "items": {
183
+ "$ref": "https://gobl.org/draft-0/cbc/key"
184
+ },
185
+ "type": "array",
186
+ "title": "Keys",
187
+ "description": "Keys identifies the set of tax keys defined in the category that this\nrate can be used with."
188
+ },
189
+ "name": {
190
+ "$ref": "https://gobl.org/draft-0/i18n/string",
191
+ "title": "Name",
192
+ "description": "Human name of the rate"
193
+ },
194
+ "desc": {
195
+ "$ref": "https://gobl.org/draft-0/i18n/string",
196
+ "title": "Description",
197
+ "description": "Useful description of the rate."
198
+ },
199
+ "values": {
200
+ "items": {
201
+ "$ref": "#/$defs/RateValueDef"
202
+ },
203
+ "type": "array",
204
+ "title": "Values",
205
+ "description": "Values contains a list of Value objects that contain the\ncurrent and historical percentage values for the rate and\nadditional filters.\nOrder is important, newer values should come before\nolder values."
206
+ },
207
+ "meta": {
208
+ "$ref": "https://gobl.org/draft-0/cbc/meta",
209
+ "title": "Meta",
210
+ "description": "Meta contains additional information about the rate that is relevant\nfor local frequently used implementations."
211
+ }
212
+ },
213
+ "type": "object",
214
+ "required": [
215
+ "rate",
216
+ "name"
217
+ ],
218
+ "description": "RateDef defines a single rate inside a category"
219
+ },
220
+ "RateValueDef": {
221
+ "properties": {
222
+ "ext": {
223
+ "$ref": "https://gobl.org/draft-0/tax/extensions",
224
+ "title": "Extensions",
225
+ "description": "Only apply this rate if one of the tags is present in the invoice.\nTags []cbc.Key `json:\"tags,omitempty\" jsonschema:\"title=Tags\"`\nExt map of keys that can be used to filter to determine if the rate applies."
226
+ },
227
+ "since": {
228
+ "$ref": "https://gobl.org/draft-0/cal/date",
229
+ "title": "Since",
230
+ "description": "Date from which this value should be applied."
231
+ },
232
+ "percent": {
233
+ "$ref": "https://gobl.org/draft-0/num/percentage",
234
+ "title": "Percent",
235
+ "description": "Percent rate that should be applied"
236
+ },
237
+ "surcharge": {
238
+ "$ref": "https://gobl.org/draft-0/num/percentage",
239
+ "title": "Surcharge",
240
+ "description": "An additional surcharge to apply."
241
+ },
242
+ "disabled": {
243
+ "type": "boolean",
244
+ "title": "Disabled",
245
+ "description": "When true, this value should no longer be used."
246
+ }
247
+ },
248
+ "type": "object",
249
+ "required": [
250
+ "percent"
251
+ ],
252
+ "description": "RateValueDef contains a percentage rate or fixed amount for a given date range."
253
+ },
254
+ "RegimeDef": {
255
+ "properties": {
256
+ "name": {
257
+ "$ref": "https://gobl.org/draft-0/i18n/string",
258
+ "title": "Name",
259
+ "description": "Name of the tax regime."
260
+ },
261
+ "description": {
262
+ "$ref": "https://gobl.org/draft-0/i18n/string",
263
+ "title": "Description",
264
+ "description": "Introductory details about the regime."
265
+ },
266
+ "time_zone": {
267
+ "type": "string",
268
+ "title": "Time Zone",
269
+ "description": "Location name for the country's central time zone. Accepted\nvalues from IANA Time Zone Database (https://iana.org/time-zones)."
270
+ },
271
+ "country": {
272
+ "$ref": "https://gobl.org/draft-0/l10n/tax-country-code",
273
+ "title": "Code",
274
+ "description": "Country code for the region"
275
+ },
276
+ "alt_country_codes": {
277
+ "items": {
278
+ "$ref": "https://gobl.org/draft-0/l10n/code"
279
+ },
280
+ "type": "array",
281
+ "title": "Alternative Country Codes",
282
+ "description": "Alternative localization codes that may be used to identify the tax regime\nin specific circumstances."
283
+ },
284
+ "zone": {
285
+ "$ref": "https://gobl.org/draft-0/l10n/code",
286
+ "title": "Zone",
287
+ "description": "Specific Locality, region, city, province, county, or similar code inside\nthe country, if needed."
288
+ },
289
+ "currency": {
290
+ "$ref": "https://gobl.org/draft-0/currency/code",
291
+ "title": "Currency",
292
+ "description": "Currency used by the country."
293
+ },
294
+ "tax_scheme": {
295
+ "$ref": "https://gobl.org/draft-0/cbc/code",
296
+ "title": "Tax Scheme",
297
+ "description": "TaxScheme defines the principal scheme of consumption tax that should be\napplied to the regime and associated with Tax IDs in some export formats\nsuch as UBL or CII. Some regimes may not have a Tax Scheme and as a\nconsequence will not use tax identities, like the US."
298
+ },
299
+ "calculator_rounding_rule": {
300
+ "$ref": "https://gobl.org/draft-0/cbc/key",
301
+ "title": "Calculator Rounding Rule",
302
+ "description": "Rounding rule to use when calculating the tax totals, default is always\n`sum-then-round`."
303
+ },
304
+ "tags": {
305
+ "items": {
306
+ "$ref": "#/$defs/TagSet"
307
+ },
308
+ "type": "array",
309
+ "title": "Tags",
310
+ "description": "Tags that can be applied at the document level to identify additional\nconsiderations."
311
+ },
312
+ "extensions": {
313
+ "items": {
314
+ "$ref": "https://gobl.org/draft-0/cbc/definition"
315
+ },
316
+ "type": "array",
317
+ "title": "Extensions",
318
+ "description": "Extensions defines the keys that can be used for extended or extra data inside the regime that\nis specific to the regime and cannot be easily determined from other GOBL structures.\nTypically these are used to define local codes for suppliers, customers, products, or tax rates."
319
+ },
320
+ "identities": {
321
+ "items": {
322
+ "$ref": "https://gobl.org/draft-0/cbc/definition"
323
+ },
324
+ "type": "array",
325
+ "title": "Identities",
326
+ "description": "Identities used in addition to regular tax identities and specific for the\nregime that may be validated against."
327
+ },
328
+ "payment_means_keys": {
329
+ "items": {
330
+ "$ref": "https://gobl.org/draft-0/cbc/definition"
331
+ },
332
+ "type": "array",
333
+ "title": "Payment Means Keys",
334
+ "description": "PaymentMeansKeys specific for the regime that extend the original\nbase payment means keys."
335
+ },
336
+ "inbox_keys": {
337
+ "items": {
338
+ "$ref": "https://gobl.org/draft-0/cbc/definition"
339
+ },
340
+ "type": "array",
341
+ "title": "Inbox Keys",
342
+ "description": "InboxKeys specific to the regime that can be used to identify where a document\nshould be forwarded to."
343
+ },
344
+ "scenarios": {
345
+ "items": {
346
+ "$ref": "#/$defs/ScenarioSet"
347
+ },
348
+ "type": "array",
349
+ "title": "Scenarios"
350
+ },
351
+ "corrections": {
352
+ "$ref": "#/$defs/CorrectionSet",
353
+ "title": "Corrections",
354
+ "description": "Configuration details for corrections to be used with correction options."
355
+ },
356
+ "categories": {
357
+ "items": {
358
+ "$ref": "#/$defs/CategoryDef"
359
+ },
360
+ "type": "array",
361
+ "title": "Categories",
362
+ "description": "List of tax categories."
363
+ }
364
+ },
365
+ "type": "object",
366
+ "required": [
367
+ "name",
368
+ "time_zone",
369
+ "country",
370
+ "currency",
371
+ "categories"
372
+ ],
373
+ "description": "RegimeDef defines the holding structure for the definitions of taxes inside a country or territory."
374
+ },
375
+ "Scenario": {
376
+ "properties": {
377
+ "name": {
378
+ "$ref": "https://gobl.org/draft-0/i18n/string",
379
+ "title": "Name",
380
+ "description": "Name of the scenario for further information."
381
+ },
382
+ "desc": {
383
+ "$ref": "https://gobl.org/draft-0/i18n/string",
384
+ "title": "Description",
385
+ "description": "Description of the scenario for documentation purposes."
386
+ },
387
+ "type": {
388
+ "items": {
389
+ "$ref": "https://gobl.org/draft-0/cbc/key"
390
+ },
391
+ "type": "array",
392
+ "title": "Type",
393
+ "description": "Type of document, if present."
394
+ },
395
+ "tags": {
396
+ "items": {
397
+ "$ref": "https://gobl.org/draft-0/cbc/key"
398
+ },
399
+ "type": "array",
400
+ "title": "Tags",
401
+ "description": "Array of tags that have been applied to the document."
402
+ },
403
+ "ext_key": {
404
+ "$ref": "https://gobl.org/draft-0/cbc/key",
405
+ "title": "Extension Key",
406
+ "description": "Extension key that must be present in the document."
407
+ },
408
+ "ext_code": {
409
+ "$ref": "https://gobl.org/draft-0/cbc/code",
410
+ "title": "Extension Code",
411
+ "description": "Extension code that along side the key must be present for a match\nto happen. This cannot be used without an `cbc.Code`. The value will\nbe copied to the note code if needed."
412
+ },
413
+ "note": {
414
+ "$ref": "#/$defs/ScenarioNote",
415
+ "title": "Note",
416
+ "description": "A note to be added to the document if the scenario is applied."
417
+ },
418
+ "codes": {
419
+ "$ref": "https://gobl.org/draft-0/cbc/code-map",
420
+ "title": "Codes",
421
+ "description": "Codes is used to define additional codes for regime specific\nsituations."
422
+ },
423
+ "ext": {
424
+ "$ref": "https://gobl.org/draft-0/tax/extensions",
425
+ "title": "Extensions",
426
+ "description": "Ext represents a set of tax extensions that should be applied to\nthe document in the appropriate \"tax\" context."
427
+ }
428
+ },
429
+ "type": "object",
430
+ "description": "Scenario is used to describe a tax scenario of a document based on the combination of document type and tag used."
431
+ },
432
+ "ScenarioNote": {
433
+ "properties": {
434
+ "key": {
435
+ "$ref": "https://gobl.org/draft-0/cbc/key",
436
+ "title": "Key",
437
+ "description": "Key specifying subject of the text"
438
+ },
439
+ "code": {
440
+ "$ref": "https://gobl.org/draft-0/cbc/code",
441
+ "title": "Code",
442
+ "description": "Code used for additional data that may be required to identify the note."
443
+ },
444
+ "src": {
445
+ "$ref": "https://gobl.org/draft-0/cbc/key",
446
+ "title": "Source",
447
+ "description": "Source of this note, especially useful when auto-generated."
448
+ },
449
+ "text": {
450
+ "type": "string",
451
+ "title": "Text",
452
+ "description": "The contents of the note"
453
+ },
454
+ "ext": {
455
+ "$ref": "https://gobl.org/draft-0/tax/extensions",
456
+ "title": "Extensions",
457
+ "description": "Extension data"
458
+ }
459
+ },
460
+ "type": "object",
461
+ "required": [
462
+ "text"
463
+ ],
464
+ "description": "ScenarioNote represents the structure of the note that needs to be added to the document."
465
+ },
466
+ "ScenarioSet": {
467
+ "properties": {
468
+ "schema": {
469
+ "type": "string",
470
+ "title": "Schema",
471
+ "description": "Partial or complete schema URL for the document type"
472
+ },
473
+ "list": {
474
+ "items": {
475
+ "$ref": "#/$defs/Scenario"
476
+ },
477
+ "type": "array",
478
+ "title": "List",
479
+ "description": "List of scenarios for the schema"
480
+ }
481
+ },
482
+ "type": "object",
483
+ "required": [
484
+ "schema",
485
+ "list"
486
+ ],
487
+ "description": "ScenarioSet is a collection of tax scenarios for a given schema that can be used to determine special codes or notes that need to be included in the final document."
488
+ },
489
+ "TagSet": {
490
+ "properties": {
491
+ "schema": {
492
+ "type": "string",
493
+ "title": "Schema",
494
+ "description": "Schema that the tags are associated with."
495
+ },
496
+ "list": {
497
+ "items": {
498
+ "$ref": "https://gobl.org/draft-0/cbc/definition"
499
+ },
500
+ "type": "array",
501
+ "title": "List",
502
+ "description": "List of tags for the schema"
503
+ }
504
+ },
505
+ "type": "object",
506
+ "required": [
507
+ "schema",
508
+ "list"
509
+ ],
510
+ "description": "TagSet defines a set of tags and their descriptions that can be used for a specific schema in the context of a Regime or Addon."
511
+ }
512
+ }
513
+ }
@@ -0,0 +1,139 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://gobl.org/draft-0/tax/set",
4
+ "$ref": "#/$defs/Set",
5
+ "$defs": {
6
+ "Combo": {
7
+ "anyOf": [
8
+ {
9
+ "if": {
10
+ "properties": {
11
+ "cat": {
12
+ "const": "VAT"
13
+ }
14
+ }
15
+ },
16
+ "then": {
17
+ "properties": {
18
+ "key": {
19
+ "oneOf": [
20
+ {
21
+ "const": "standard",
22
+ "title": "Standard"
23
+ },
24
+ {
25
+ "const": "zero",
26
+ "title": "Zero"
27
+ },
28
+ {
29
+ "const": "reverse-charge",
30
+ "title": "Reverse charge"
31
+ },
32
+ {
33
+ "const": "exempt",
34
+ "title": "Exempt"
35
+ },
36
+ {
37
+ "const": "export",
38
+ "title": "Export"
39
+ },
40
+ {
41
+ "const": "intra-community",
42
+ "title": "Intra-community"
43
+ },
44
+ {
45
+ "const": "outside-scope",
46
+ "title": "Outside scope"
47
+ }
48
+ ]
49
+ }
50
+ }
51
+ }
52
+ },
53
+ {
54
+ "if": {
55
+ "properties": {
56
+ "cat": {
57
+ "const": "GST"
58
+ }
59
+ }
60
+ },
61
+ "then": {
62
+ "properties": {
63
+ "key": {
64
+ "oneOf": [
65
+ {
66
+ "const": "standard",
67
+ "title": "Standard"
68
+ },
69
+ {
70
+ "const": "zero",
71
+ "title": "Zero"
72
+ },
73
+ {
74
+ "const": "exempt",
75
+ "title": "Exempt"
76
+ },
77
+ {
78
+ "const": "outside-scope",
79
+ "title": "Outside scope"
80
+ }
81
+ ]
82
+ }
83
+ }
84
+ }
85
+ }
86
+ ],
87
+ "properties": {
88
+ "cat": {
89
+ "$ref": "https://gobl.org/draft-0/cbc/code",
90
+ "title": "Category",
91
+ "description": "Tax category code from those available inside a region."
92
+ },
93
+ "country": {
94
+ "$ref": "https://gobl.org/draft-0/l10n/tax-country-code",
95
+ "title": "Country",
96
+ "description": "Country code override when issuing with taxes applied from different countries."
97
+ },
98
+ "key": {
99
+ "$ref": "https://gobl.org/draft-0/cbc/key",
100
+ "description": "Key helps determine the tax situation within the category."
101
+ },
102
+ "rate": {
103
+ "$ref": "https://gobl.org/draft-0/cbc/key",
104
+ "title": "Rate",
105
+ "description": "Rate within a category and for a given key to apply."
106
+ },
107
+ "percent": {
108
+ "$ref": "https://gobl.org/draft-0/num/percentage",
109
+ "title": "Percent",
110
+ "description": "Percent defines the percentage set manually or determined from the\nkey. A nil percent implies that this tax combo is either exempt or not-subject.",
111
+ "calculated": true
112
+ },
113
+ "surcharge": {
114
+ "$ref": "https://gobl.org/draft-0/num/percentage",
115
+ "title": "Surcharge",
116
+ "description": "Some countries require an additional surcharge (may be determined if key present).",
117
+ "calculated": true
118
+ },
119
+ "ext": {
120
+ "$ref": "https://gobl.org/draft-0/tax/extensions",
121
+ "title": "Extensions",
122
+ "description": "Local codes that apply for a given rate or percentage that need to be identified and validated."
123
+ }
124
+ },
125
+ "type": "object",
126
+ "required": [
127
+ "cat"
128
+ ],
129
+ "description": "Combo represents the tax combination of a category code and rate key."
130
+ },
131
+ "Set": {
132
+ "items": {
133
+ "$ref": "#/$defs/Combo"
134
+ },
135
+ "type": "array",
136
+ "description": "Set defines a list of tax categories and their rates to be used alongside taxable items."
137
+ }
138
+ }
139
+ }