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.
- checksums.yaml +4 -4
- data/data/addons/br-nfe-v4.json +481 -0
- data/data/addons/br-nfse-v1.json +235 -0
- data/data/addons/co-dian-v2.json +311 -0
- data/data/addons/de-xrechnung-v3.json +16 -0
- data/data/addons/de-zugferd-v2.json +16 -0
- data/data/addons/es-facturae-v3.json +359 -0
- data/data/addons/es-tbai-v1.json +225 -0
- data/data/addons/es-verifactu-v1.json +609 -0
- data/data/addons/eu-en16931-v2017.json +92 -0
- data/data/addons/fr-choruspro-v1.json +260 -0
- data/data/addons/fr-facturx-v1.json +16 -0
- data/data/addons/gr-mydata-v1.json +1495 -0
- data/data/addons/it-sdi-v1.json +1570 -0
- data/data/addons/it-ticket-v1.json +144 -0
- data/data/addons/mx-cfdi-v4.json +908 -0
- data/data/addons/pl-favat-v2.json +235 -0
- data/data/addons/pt-saft-v1.json +950 -0
- data/data/catalogues/cef.json +374 -0
- data/data/catalogues/iso.json +19 -0
- data/data/catalogues/untdid.json +10669 -0
- data/data/currency/iso.json +2378 -0
- data/data/currency/non-iso.json +128 -0
- data/data/schemas/bill/charge.json +125 -0
- data/data/schemas/bill/correction-options.json +54 -0
- data/data/schemas/bill/delivery-details.json +41 -0
- data/data/schemas/bill/delivery.json +412 -0
- data/data/schemas/bill/discount.json +137 -0
- data/data/schemas/bill/invoice.json +423 -0
- data/data/schemas/bill/line.json +433 -0
- data/data/schemas/bill/order.json +401 -0
- data/data/schemas/bill/ordering.json +107 -0
- data/data/schemas/bill/payment-details.json +36 -0
- data/data/schemas/bill/payment.json +424 -0
- data/data/schemas/bill/tax.json +45 -0
- data/data/schemas/bill/totals.json +84 -0
- data/data/schemas/cal/date-time.json +13 -0
- data/data/schemas/cal/date.json +13 -0
- data/data/schemas/cal/period.json +32 -0
- data/data/schemas/cal/time.json +13 -0
- data/data/schemas/cbc/code-map.json +16 -0
- data/data/schemas/cbc/code.json +15 -0
- data/data/schemas/cbc/definition.json +67 -0
- data/data/schemas/cbc/key.json +15 -0
- data/data/schemas/cbc/meta.json +16 -0
- data/data/schemas/cbc/source.json +37 -0
- data/data/schemas/currency/amount.json +32 -0
- data/data/schemas/currency/code.json +734 -0
- data/data/schemas/currency/exchange-rate.json +43 -0
- data/data/schemas/dsig/digest.json +27 -0
- data/data/schemas/dsig/signature.json +12 -0
- data/data/schemas/envelope.json +41 -0
- data/data/schemas/head/header.json +62 -0
- data/data/schemas/head/link.json +42 -0
- data/data/schemas/head/stamp.json +27 -0
- data/data/schemas/i18n/string.json +18 -0
- data/data/schemas/l10n/code.json +13 -0
- data/data/schemas/l10n/iso-country-code.json +1010 -0
- data/data/schemas/l10n/tax-country-code.json +1022 -0
- data/data/schemas/note/message.json +43 -0
- data/data/schemas/num/amount.json +13 -0
- data/data/schemas/num/percentage.json +13 -0
- data/data/schemas/org/address.json +105 -0
- data/data/schemas/org/attachment.json +58 -0
- data/data/schemas/org/coordinates.json +33 -0
- data/data/schemas/org/document-ref.json +117 -0
- data/data/schemas/org/email.json +37 -0
- data/data/schemas/org/identity.json +57 -0
- data/data/schemas/org/image.json +70 -0
- data/data/schemas/org/inbox.json +49 -0
- data/data/schemas/org/item.json +96 -0
- data/data/schemas/org/name.json +59 -0
- data/data/schemas/org/note.json +184 -0
- data/data/schemas/org/party.json +129 -0
- data/data/schemas/org/person.json +90 -0
- data/data/schemas/org/registration.json +66 -0
- data/data/schemas/org/telephone.json +32 -0
- data/data/schemas/org/unit.json +350 -0
- data/data/schemas/org/website.json +38 -0
- data/data/schemas/pay/advance.json +211 -0
- data/data/schemas/pay/instructions.json +245 -0
- data/data/schemas/pay/terms.json +128 -0
- data/data/schemas/regimes/mx/food-vouchers.json +111 -0
- data/data/schemas/regimes/mx/fuel-account-balance.json +179 -0
- data/data/schemas/schema/object.json +12 -0
- data/data/schemas/tax/addon-def.json +288 -0
- data/data/schemas/tax/catalogue-def.json +37 -0
- data/data/schemas/tax/extensions.json +16 -0
- data/data/schemas/tax/identity.json +45 -0
- data/data/schemas/tax/regime-def.json +513 -0
- data/data/schemas/tax/set.json +139 -0
- data/data/schemas/tax/total.json +135 -0
- data/lib/gobl/extensions/tax/addon_helper.rb +37 -0
- data/lib/gobl/version.rb +1 -1
- data/lib/gobl.rb +1 -0
- metadata +93 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"priority": 100,
|
|
4
|
+
"iso_code": "BCH",
|
|
5
|
+
"name": "Bitcoin Cash",
|
|
6
|
+
"symbol": "₿",
|
|
7
|
+
"disambiguate_symbol": "₿CH",
|
|
8
|
+
"alternate_symbols": ["BCH"],
|
|
9
|
+
"subunit_name": "Satoshi",
|
|
10
|
+
"subunits": 8,
|
|
11
|
+
"template": "%n %u",
|
|
12
|
+
"decimal_mark": ".",
|
|
13
|
+
"thousands_separator": ",",
|
|
14
|
+
"iso_numeric": "",
|
|
15
|
+
"smallest_denomination": 1
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"priority": 100,
|
|
19
|
+
"iso_code": "BTC",
|
|
20
|
+
"name": "Bitcoin",
|
|
21
|
+
"symbol": "₿",
|
|
22
|
+
"alternate_symbols": [],
|
|
23
|
+
"subunit_name": "Satoshi",
|
|
24
|
+
"subunits": 8,
|
|
25
|
+
"decimal_mark": ".",
|
|
26
|
+
"thousands_separator": ",",
|
|
27
|
+
"iso_numeric": "",
|
|
28
|
+
"smallest_denomination": 1
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"priority": 100,
|
|
32
|
+
"iso_code": "JEP",
|
|
33
|
+
"name": "Jersey Pound",
|
|
34
|
+
"symbol": "£",
|
|
35
|
+
"disambiguate_symbol": "JEP",
|
|
36
|
+
"alternate_symbols": [],
|
|
37
|
+
"subunit_name": "Penny",
|
|
38
|
+
"subunits": 2,
|
|
39
|
+
"decimal_mark": ".",
|
|
40
|
+
"thousands_separator": ",",
|
|
41
|
+
"iso_numeric": "",
|
|
42
|
+
"smallest_denomination": 1
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"priority": 100,
|
|
46
|
+
"iso_code": "GGP",
|
|
47
|
+
"name": "Guernsey Pound",
|
|
48
|
+
"symbol": "£",
|
|
49
|
+
"disambiguate_symbol": "GGP",
|
|
50
|
+
"alternate_symbols": [],
|
|
51
|
+
"subunit_name": "Penny",
|
|
52
|
+
"subunits": 2,
|
|
53
|
+
"decimal_mark": ".",
|
|
54
|
+
"thousands_separator": ",",
|
|
55
|
+
"iso_numeric": "",
|
|
56
|
+
"smallest_denomination": 1
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"priority": 100,
|
|
60
|
+
"iso_code": "IMP",
|
|
61
|
+
"name": "Isle of Man Pound",
|
|
62
|
+
"symbol": "£",
|
|
63
|
+
"disambiguate_symbol": "IMP",
|
|
64
|
+
"alternate_symbols": ["M£"],
|
|
65
|
+
"subunit_name": "Penny",
|
|
66
|
+
"subunits": 2,
|
|
67
|
+
"decimal_mark": ".",
|
|
68
|
+
"thousands_separator": ",",
|
|
69
|
+
"iso_numeric": "",
|
|
70
|
+
"smallest_denomination": 1
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"priority": 100,
|
|
74
|
+
"iso_code": "XFU",
|
|
75
|
+
"name": "UIC Franc",
|
|
76
|
+
"symbol": "",
|
|
77
|
+
"disambiguate_symbol": "XFU",
|
|
78
|
+
"alternate_symbols": [],
|
|
79
|
+
"subunit_name": "",
|
|
80
|
+
"subunits": 2,
|
|
81
|
+
"decimal_mark": ".",
|
|
82
|
+
"thousands_separator": ",",
|
|
83
|
+
"iso_numeric": "",
|
|
84
|
+
"smallest_denomination": 1
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"priority": 100,
|
|
88
|
+
"iso_code": "GBX",
|
|
89
|
+
"name": "British Penny",
|
|
90
|
+
"symbol": "",
|
|
91
|
+
"disambiguate_symbol": "GBX",
|
|
92
|
+
"alternate_symbols": [],
|
|
93
|
+
"subunit_name": "",
|
|
94
|
+
"subunits": 1,
|
|
95
|
+
"decimal_mark": ".",
|
|
96
|
+
"thousands_separator": ",",
|
|
97
|
+
"iso_numeric": "",
|
|
98
|
+
"smallest_denomination": 1
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"priority": 100,
|
|
102
|
+
"iso_code": "CNH",
|
|
103
|
+
"name": "Chinese Renminbi Yuan Offshore",
|
|
104
|
+
"symbol": "¥",
|
|
105
|
+
"disambiguate_symbol": "CNH",
|
|
106
|
+
"alternate_symbols": ["CN¥", "元", "CN元"],
|
|
107
|
+
"subunit_name": "Fen",
|
|
108
|
+
"subunits": 2,
|
|
109
|
+
"decimal_mark": ".",
|
|
110
|
+
"thousands_separator": ",",
|
|
111
|
+
"iso_numeric": "",
|
|
112
|
+
"smallest_denomination": 1
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"priority": 100,
|
|
116
|
+
"iso_code": "USDC",
|
|
117
|
+
"name": "USD Coin",
|
|
118
|
+
"symbol": "USDC",
|
|
119
|
+
"disambiguate_symbol": "USDC",
|
|
120
|
+
"alternate_symbols": [],
|
|
121
|
+
"subunit_name": "Cent",
|
|
122
|
+
"subunits": 2,
|
|
123
|
+
"decimal_mark": ".",
|
|
124
|
+
"thousands_separator": ",",
|
|
125
|
+
"iso_numeric": "",
|
|
126
|
+
"smallest_denomination": 1
|
|
127
|
+
}
|
|
128
|
+
]
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://gobl.org/draft-0/bill/charge",
|
|
4
|
+
"$ref": "#/$defs/Charge",
|
|
5
|
+
"$defs": {
|
|
6
|
+
"Charge": {
|
|
7
|
+
"properties": {
|
|
8
|
+
"uuid": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"format": "uuid",
|
|
11
|
+
"title": "UUID",
|
|
12
|
+
"description": "Universally Unique Identifier."
|
|
13
|
+
},
|
|
14
|
+
"i": {
|
|
15
|
+
"type": "integer",
|
|
16
|
+
"title": "Index",
|
|
17
|
+
"description": "Line number inside the list of charges (calculated).",
|
|
18
|
+
"calculated": true
|
|
19
|
+
},
|
|
20
|
+
"key": {
|
|
21
|
+
"$ref": "https://gobl.org/draft-0/cbc/key",
|
|
22
|
+
"anyOf": [
|
|
23
|
+
{
|
|
24
|
+
"const": "stamp-duty",
|
|
25
|
+
"title": "Stamp Duty"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"const": "outlay",
|
|
29
|
+
"title": "Outlay"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"const": "tax",
|
|
33
|
+
"title": "Tax"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"const": "customs",
|
|
37
|
+
"title": "Customs"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"const": "delivery",
|
|
41
|
+
"title": "Delivery"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"const": "packing",
|
|
45
|
+
"title": "Packing"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"const": "handling",
|
|
49
|
+
"title": "Handling"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"const": "insurance",
|
|
53
|
+
"title": "Insurance"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"const": "storage",
|
|
57
|
+
"title": "Storage"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"const": "admin",
|
|
61
|
+
"title": "Administration"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"const": "cleaning",
|
|
65
|
+
"title": "Cleaning"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"pattern": "^(?:[a-z]|[a-z0-9][a-z0-9-+]*[a-z0-9])$",
|
|
69
|
+
"title": "Other"
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"title": "Key",
|
|
73
|
+
"description": "Key for grouping or identifying charges for tax purposes. A suggested list of\nkeys is provided, but these may be extended by the issuer."
|
|
74
|
+
},
|
|
75
|
+
"code": {
|
|
76
|
+
"$ref": "https://gobl.org/draft-0/cbc/code",
|
|
77
|
+
"title": "Code",
|
|
78
|
+
"description": "Code to used to refer to the this charge by the issuer"
|
|
79
|
+
},
|
|
80
|
+
"reason": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"title": "Reason",
|
|
83
|
+
"description": "Text description as to why the charge was applied"
|
|
84
|
+
},
|
|
85
|
+
"base": {
|
|
86
|
+
"$ref": "https://gobl.org/draft-0/num/amount",
|
|
87
|
+
"title": "Base",
|
|
88
|
+
"description": "Base represents the value used as a base for percent calculations instead\nof the invoice's sum of lines."
|
|
89
|
+
},
|
|
90
|
+
"percent": {
|
|
91
|
+
"$ref": "https://gobl.org/draft-0/num/percentage",
|
|
92
|
+
"title": "Percent",
|
|
93
|
+
"description": "Percentage to apply to the sum of all lines"
|
|
94
|
+
},
|
|
95
|
+
"amount": {
|
|
96
|
+
"$ref": "https://gobl.org/draft-0/num/amount",
|
|
97
|
+
"title": "Amount",
|
|
98
|
+
"description": "Amount to apply (calculated if percent present)",
|
|
99
|
+
"calculated": true
|
|
100
|
+
},
|
|
101
|
+
"taxes": {
|
|
102
|
+
"$ref": "https://gobl.org/draft-0/tax/set",
|
|
103
|
+
"title": "Taxes",
|
|
104
|
+
"description": "List of taxes to apply to the charge"
|
|
105
|
+
},
|
|
106
|
+
"ext": {
|
|
107
|
+
"$ref": "https://gobl.org/draft-0/tax/extensions",
|
|
108
|
+
"title": "Extensions",
|
|
109
|
+
"description": "Extension codes that apply to the charge"
|
|
110
|
+
},
|
|
111
|
+
"meta": {
|
|
112
|
+
"$ref": "https://gobl.org/draft-0/cbc/meta",
|
|
113
|
+
"title": "Meta",
|
|
114
|
+
"description": "Additional semi-structured information."
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"type": "object",
|
|
118
|
+
"required": [
|
|
119
|
+
"i",
|
|
120
|
+
"amount"
|
|
121
|
+
],
|
|
122
|
+
"description": "Charge represents a surchange applied to the complete document independent from the individual lines."
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://gobl.org/draft-0/bill/correction-options",
|
|
4
|
+
"$ref": "#/$defs/CorrectionOptions",
|
|
5
|
+
"$defs": {
|
|
6
|
+
"CorrectionOptions": {
|
|
7
|
+
"properties": {
|
|
8
|
+
"type": {
|
|
9
|
+
"$ref": "https://gobl.org/draft-0/cbc/key",
|
|
10
|
+
"title": "Type",
|
|
11
|
+
"description": "The type of corrective invoice to produce."
|
|
12
|
+
},
|
|
13
|
+
"issue_date": {
|
|
14
|
+
"$ref": "https://gobl.org/draft-0/cal/date",
|
|
15
|
+
"title": "Issue Date",
|
|
16
|
+
"description": "When the new corrective invoice's issue date should be set to."
|
|
17
|
+
},
|
|
18
|
+
"series": {
|
|
19
|
+
"$ref": "https://gobl.org/draft-0/cbc/code",
|
|
20
|
+
"title": "Series",
|
|
21
|
+
"description": "Series to assign to the new corrective invoice."
|
|
22
|
+
},
|
|
23
|
+
"stamps": {
|
|
24
|
+
"items": {
|
|
25
|
+
"$ref": "https://gobl.org/draft-0/head/stamp"
|
|
26
|
+
},
|
|
27
|
+
"type": "array",
|
|
28
|
+
"title": "Stamps",
|
|
29
|
+
"description": "Stamps of the previous document to include in the preceding data."
|
|
30
|
+
},
|
|
31
|
+
"reason": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"title": "Reason",
|
|
34
|
+
"description": "Human readable reason for the corrective operation."
|
|
35
|
+
},
|
|
36
|
+
"ext": {
|
|
37
|
+
"$ref": "https://gobl.org/draft-0/tax/extensions",
|
|
38
|
+
"title": "Extensions",
|
|
39
|
+
"description": "Extensions for region specific requirements that may be added in the preceding\nor at the document level, according to the local rules."
|
|
40
|
+
},
|
|
41
|
+
"copy_tax": {
|
|
42
|
+
"type": "boolean",
|
|
43
|
+
"title": "Copy Tax Totals",
|
|
44
|
+
"description": "CopyTax when true will copy the tax totals from the previous document to the\npreceding document data."
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"type": "object",
|
|
48
|
+
"required": [
|
|
49
|
+
"type"
|
|
50
|
+
],
|
|
51
|
+
"description": "CorrectionOptions defines a structure used to pass configuration options to correct a previous invoice."
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://gobl.org/draft-0/bill/delivery-details",
|
|
4
|
+
"$ref": "#/$defs/DeliveryDetails",
|
|
5
|
+
"$defs": {
|
|
6
|
+
"DeliveryDetails": {
|
|
7
|
+
"properties": {
|
|
8
|
+
"receiver": {
|
|
9
|
+
"$ref": "https://gobl.org/draft-0/org/party",
|
|
10
|
+
"title": "Receiver",
|
|
11
|
+
"description": "The party who will receive delivery of the goods defined in the invoice and is not responsible for taxes."
|
|
12
|
+
},
|
|
13
|
+
"identities": {
|
|
14
|
+
"items": {
|
|
15
|
+
"$ref": "https://gobl.org/draft-0/org/identity"
|
|
16
|
+
},
|
|
17
|
+
"type": "array",
|
|
18
|
+
"title": "Identities",
|
|
19
|
+
"description": "Identities is used to define specific codes or IDs that may be used to\nidentify the delivery."
|
|
20
|
+
},
|
|
21
|
+
"date": {
|
|
22
|
+
"$ref": "https://gobl.org/draft-0/cal/date",
|
|
23
|
+
"title": "Date",
|
|
24
|
+
"description": "When the goods should be expected."
|
|
25
|
+
},
|
|
26
|
+
"period": {
|
|
27
|
+
"$ref": "https://gobl.org/draft-0/cal/period",
|
|
28
|
+
"title": "Period",
|
|
29
|
+
"description": "Period of time in which to expect delivery if a specific date is not available."
|
|
30
|
+
},
|
|
31
|
+
"meta": {
|
|
32
|
+
"$ref": "https://gobl.org/draft-0/cbc/meta",
|
|
33
|
+
"title": "Meta",
|
|
34
|
+
"description": "Additional custom data."
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"type": "object",
|
|
38
|
+
"description": "DeliveryDetails covers the details of the destination for the products described in the invoice body."
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|