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,412 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://gobl.org/draft-0/bill/delivery",
|
|
4
|
+
"$ref": "#/$defs/Delivery",
|
|
5
|
+
"$defs": {
|
|
6
|
+
"Delivery": {
|
|
7
|
+
"properties": {
|
|
8
|
+
"$regime": {
|
|
9
|
+
"$ref": "https://gobl.org/draft-0/l10n/tax-country-code",
|
|
10
|
+
"oneOf": [
|
|
11
|
+
{
|
|
12
|
+
"const": "AE",
|
|
13
|
+
"title": "United Arab Emirates"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"const": "AT",
|
|
17
|
+
"title": "Austria"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"const": "BE",
|
|
21
|
+
"title": "Belgium"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"const": "BR",
|
|
25
|
+
"title": "Brazil"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"const": "CA",
|
|
29
|
+
"title": "Canada"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"const": "CH",
|
|
33
|
+
"title": "Switzerland"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"const": "CO",
|
|
37
|
+
"title": "Colombia"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"const": "DE",
|
|
41
|
+
"title": "Germany"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"const": "EL",
|
|
45
|
+
"title": "Greece"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"const": "ES",
|
|
49
|
+
"title": "Spain"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"const": "FR",
|
|
53
|
+
"title": "France"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"const": "GB",
|
|
57
|
+
"title": "United Kingdom"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"const": "IE",
|
|
61
|
+
"title": "Ireland"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"const": "IN",
|
|
65
|
+
"title": "India"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"const": "IT",
|
|
69
|
+
"title": "Italy"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"const": "MX",
|
|
73
|
+
"title": "Mexico"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"const": "NL",
|
|
77
|
+
"title": "The Netherlands"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"const": "PL",
|
|
81
|
+
"title": "Poland"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"const": "PT",
|
|
85
|
+
"title": "Portugal"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"const": "SE",
|
|
89
|
+
"title": "Sweden"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"const": "SG",
|
|
93
|
+
"title": "Singapore"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"const": "US",
|
|
97
|
+
"title": "United States of America"
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"title": "Tax Regime"
|
|
101
|
+
},
|
|
102
|
+
"$addons": {
|
|
103
|
+
"items": {
|
|
104
|
+
"$ref": "https://gobl.org/draft-0/cbc/key",
|
|
105
|
+
"oneOf": [
|
|
106
|
+
{
|
|
107
|
+
"const": "br-nfe-v4",
|
|
108
|
+
"title": "Brazil NF-e 4.00"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"const": "br-nfse-v1",
|
|
112
|
+
"title": "Brazil NFS-e 1.X"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"const": "co-dian-v2",
|
|
116
|
+
"title": "Colombia DIAN UBL 2.X"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"const": "de-xrechnung-v3",
|
|
120
|
+
"title": "German XRechnung 3.X"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"const": "de-zugferd-v2",
|
|
124
|
+
"title": "German ZUGFeRD 2.X"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"const": "es-facturae-v3",
|
|
128
|
+
"title": "Spain FacturaE"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"const": "es-tbai-v1",
|
|
132
|
+
"title": "Spain TicketBAI"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"const": "es-verifactu-v1",
|
|
136
|
+
"title": "Spain VERI*FACTU V1"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"const": "eu-en16931-v2017",
|
|
140
|
+
"title": "EN 16931-1:2017"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"const": "fr-choruspro-v1",
|
|
144
|
+
"title": "Chorus Pro"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"const": "fr-facturx-v1",
|
|
148
|
+
"title": "French Factur-X v1"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"const": "gr-mydata-v1",
|
|
152
|
+
"title": "Greece MyData v1.x"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"const": "it-sdi-v1",
|
|
156
|
+
"title": "Italy SDI FatturaPA v1.x"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"const": "it-ticket-v1",
|
|
160
|
+
"title": "Italy AdE ticket v1.x"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"const": "mx-cfdi-v4",
|
|
164
|
+
"title": "Mexican SAT CFDI v4.X"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"const": "pl-favat-v2",
|
|
168
|
+
"title": "Polish KSeF FA_VAT v2.x"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"const": "pt-saft-v1",
|
|
172
|
+
"title": "Portugal SAF-T"
|
|
173
|
+
}
|
|
174
|
+
]
|
|
175
|
+
},
|
|
176
|
+
"type": "array",
|
|
177
|
+
"title": "Addons",
|
|
178
|
+
"description": "Addons defines a list of keys used to identify tax addons that apply special\nnormalization, scenarios, and validation rules to a document."
|
|
179
|
+
},
|
|
180
|
+
"$tags": {
|
|
181
|
+
"items": {
|
|
182
|
+
"$ref": "https://gobl.org/draft-0/cbc/key"
|
|
183
|
+
},
|
|
184
|
+
"type": "array",
|
|
185
|
+
"title": "Tags",
|
|
186
|
+
"description": "Tags are used to help identify specific tax scenarios or requirements that may\napply changes to the contents of the document or imply a specific meaning.\nConverters may use tags to help identify specific situations that do not have\na specific extension, for example; self-billed or partial invoices may be\nidentified by their respective tags."
|
|
187
|
+
},
|
|
188
|
+
"uuid": {
|
|
189
|
+
"type": "string",
|
|
190
|
+
"format": "uuid",
|
|
191
|
+
"title": "UUID",
|
|
192
|
+
"description": "Universally Unique Identifier."
|
|
193
|
+
},
|
|
194
|
+
"type": {
|
|
195
|
+
"$ref": "https://gobl.org/draft-0/cbc/key",
|
|
196
|
+
"oneOf": [
|
|
197
|
+
{
|
|
198
|
+
"const": "advice",
|
|
199
|
+
"title": "Delivery Advice",
|
|
200
|
+
"description": "A delivery or despatch advice document send by the supplier to indicate how\nan order is to be delivered."
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"const": "note",
|
|
204
|
+
"title": "Delivery Note",
|
|
205
|
+
"description": "A delivery note is a document accompanying a shipment of goods that lists the\nitems included in the shipment."
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"const": "waybill",
|
|
209
|
+
"title": "Waybill",
|
|
210
|
+
"description": "A waybill is a document issued by a carrier giving details and instructions\nrelating to the shipment of a consignment of goods."
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"const": "receipt",
|
|
214
|
+
"title": "Delivery Receipt",
|
|
215
|
+
"description": "A delivery receipt is a document that is signed by the person who receives\ngoods to confirm that they have been received."
|
|
216
|
+
}
|
|
217
|
+
],
|
|
218
|
+
"title": "Type",
|
|
219
|
+
"description": "Type of delivery document.",
|
|
220
|
+
"enum": "advice"
|
|
221
|
+
},
|
|
222
|
+
"series": {
|
|
223
|
+
"$ref": "https://gobl.org/draft-0/cbc/code",
|
|
224
|
+
"title": "Series",
|
|
225
|
+
"description": "Series is used to identify groups of deliveries by date, business area, project,\ntype, customer, a combination of any, or other company specific data.\nIf the output format does not support the series as a separate field, it will be\nprepended to the code for presentation with a dash (`-`) for separation."
|
|
226
|
+
},
|
|
227
|
+
"code": {
|
|
228
|
+
"$ref": "https://gobl.org/draft-0/cbc/code",
|
|
229
|
+
"title": "Code",
|
|
230
|
+
"description": "Code is a sequential identifier that uniquely identifies the delivery. The code can\nbe left empty initially, but is **required** to **sign** the document."
|
|
231
|
+
},
|
|
232
|
+
"issue_date": {
|
|
233
|
+
"$ref": "https://gobl.org/draft-0/cal/date",
|
|
234
|
+
"title": "Issue Date",
|
|
235
|
+
"description": "When the delivery document is to be issued.",
|
|
236
|
+
"calculated": true
|
|
237
|
+
},
|
|
238
|
+
"issue_time": {
|
|
239
|
+
"$ref": "https://gobl.org/draft-0/cal/time",
|
|
240
|
+
"title": "Issue Time",
|
|
241
|
+
"description": "IssueTime is an optional field that may be useful to indicate the time of day when\nthe delivery was issued. Some regions and formats may require this field to be set.\nAn empty string will be automatically updated to reflect the current time, otherwise\nthe field can be left with a nil value.",
|
|
242
|
+
"calculated": true
|
|
243
|
+
},
|
|
244
|
+
"value_date": {
|
|
245
|
+
"$ref": "https://gobl.org/draft-0/cal/date",
|
|
246
|
+
"title": "Value Date",
|
|
247
|
+
"description": "When the taxes of this delivery become accountable, if none set, the issue date is used."
|
|
248
|
+
},
|
|
249
|
+
"currency": {
|
|
250
|
+
"$ref": "https://gobl.org/draft-0/currency/code",
|
|
251
|
+
"title": "Currency",
|
|
252
|
+
"description": "Currency for all delivery totals.",
|
|
253
|
+
"calculated": true
|
|
254
|
+
},
|
|
255
|
+
"exchange_rates": {
|
|
256
|
+
"items": {
|
|
257
|
+
"$ref": "https://gobl.org/draft-0/currency/exchange-rate"
|
|
258
|
+
},
|
|
259
|
+
"type": "array",
|
|
260
|
+
"title": "Exchange Rates",
|
|
261
|
+
"description": "Exchange rates to be used when converting the invoices monetary values into other currencies."
|
|
262
|
+
},
|
|
263
|
+
"ordering": {
|
|
264
|
+
"$ref": "https://gobl.org/draft-0/bill/ordering",
|
|
265
|
+
"title": "Ordering",
|
|
266
|
+
"description": "Ordering details for the delivery, including links to other documents."
|
|
267
|
+
},
|
|
268
|
+
"preceding": {
|
|
269
|
+
"items": {
|
|
270
|
+
"$ref": "https://gobl.org/draft-0/org/document-ref"
|
|
271
|
+
},
|
|
272
|
+
"type": "array",
|
|
273
|
+
"title": "Preceding Details",
|
|
274
|
+
"description": "Key information regarding previous delivery documents that this one will either\nextend or replace."
|
|
275
|
+
},
|
|
276
|
+
"tracking": {
|
|
277
|
+
"$ref": "#/$defs/Tracking",
|
|
278
|
+
"title": "Tracking",
|
|
279
|
+
"description": "Tracking is used to define specific codes or IDs that may be used to\nidentify and track delivery."
|
|
280
|
+
},
|
|
281
|
+
"despatch_date": {
|
|
282
|
+
"$ref": "https://gobl.org/draft-0/cal/date",
|
|
283
|
+
"title": "Despatch Date",
|
|
284
|
+
"description": "DespatchDate is the date when the goods are expected to be despatched."
|
|
285
|
+
},
|
|
286
|
+
"receive_date": {
|
|
287
|
+
"$ref": "https://gobl.org/draft-0/cal/date",
|
|
288
|
+
"title": "Receive Date",
|
|
289
|
+
"description": "ReceiveDate is the date when the goods are expected to be received."
|
|
290
|
+
},
|
|
291
|
+
"tax": {
|
|
292
|
+
"$ref": "https://gobl.org/draft-0/bill/tax",
|
|
293
|
+
"title": "Tax",
|
|
294
|
+
"description": "Special tax configuration for calculating totals."
|
|
295
|
+
},
|
|
296
|
+
"supplier": {
|
|
297
|
+
"$ref": "https://gobl.org/draft-0/org/party",
|
|
298
|
+
"title": "Supplier",
|
|
299
|
+
"description": "The entity supplying the goods or services and usually responsible for paying taxes."
|
|
300
|
+
},
|
|
301
|
+
"customer": {
|
|
302
|
+
"$ref": "https://gobl.org/draft-0/org/party",
|
|
303
|
+
"title": "Customer",
|
|
304
|
+
"description": "Legal entity receiving the goods or services, may be nil in certain circumstances such as simplified invoices."
|
|
305
|
+
},
|
|
306
|
+
"despatcher": {
|
|
307
|
+
"$ref": "https://gobl.org/draft-0/org/party",
|
|
308
|
+
"title": "Despatcher",
|
|
309
|
+
"description": "The party who will despatch the goods defined in the invoice."
|
|
310
|
+
},
|
|
311
|
+
"receiver": {
|
|
312
|
+
"$ref": "https://gobl.org/draft-0/org/party",
|
|
313
|
+
"title": "Receiver",
|
|
314
|
+
"description": "The party who will receive delivery of the goods defined in the invoice."
|
|
315
|
+
},
|
|
316
|
+
"courier": {
|
|
317
|
+
"$ref": "https://gobl.org/draft-0/org/party",
|
|
318
|
+
"title": "Courier",
|
|
319
|
+
"description": "The courier responsible for delivering the goods."
|
|
320
|
+
},
|
|
321
|
+
"lines": {
|
|
322
|
+
"items": {
|
|
323
|
+
"$ref": "https://gobl.org/draft-0/bill/line"
|
|
324
|
+
},
|
|
325
|
+
"type": "array",
|
|
326
|
+
"title": "Lines",
|
|
327
|
+
"description": "List of lines representing each of the items to be ordered."
|
|
328
|
+
},
|
|
329
|
+
"discounts": {
|
|
330
|
+
"items": {
|
|
331
|
+
"$ref": "https://gobl.org/draft-0/bill/discount"
|
|
332
|
+
},
|
|
333
|
+
"type": "array",
|
|
334
|
+
"title": "Discounts",
|
|
335
|
+
"description": "Discounts or allowances applied to order totals"
|
|
336
|
+
},
|
|
337
|
+
"charges": {
|
|
338
|
+
"items": {
|
|
339
|
+
"$ref": "https://gobl.org/draft-0/bill/charge"
|
|
340
|
+
},
|
|
341
|
+
"type": "array",
|
|
342
|
+
"title": "Charges",
|
|
343
|
+
"description": "Charges or surcharges applied to order totals"
|
|
344
|
+
},
|
|
345
|
+
"totals": {
|
|
346
|
+
"$ref": "https://gobl.org/draft-0/bill/totals",
|
|
347
|
+
"title": "Totals",
|
|
348
|
+
"description": "Summary of all the order totals, including taxes (calculated).",
|
|
349
|
+
"calculated": true
|
|
350
|
+
},
|
|
351
|
+
"notes": {
|
|
352
|
+
"items": {
|
|
353
|
+
"$ref": "https://gobl.org/draft-0/org/note"
|
|
354
|
+
},
|
|
355
|
+
"type": "array",
|
|
356
|
+
"title": "Notes",
|
|
357
|
+
"description": "Unstructured information that is relevant to the delivery, such as correction or additional\nlegal details."
|
|
358
|
+
},
|
|
359
|
+
"complements": {
|
|
360
|
+
"items": {
|
|
361
|
+
"$ref": "https://gobl.org/draft-0/schema/object"
|
|
362
|
+
},
|
|
363
|
+
"type": "array",
|
|
364
|
+
"title": "Complements",
|
|
365
|
+
"description": "Additional complementary objects that add relevant information to the delivery."
|
|
366
|
+
},
|
|
367
|
+
"meta": {
|
|
368
|
+
"$ref": "https://gobl.org/draft-0/cbc/meta",
|
|
369
|
+
"title": "Meta",
|
|
370
|
+
"description": "Additional semi-structured data that doesn't fit into the body of the delivery."
|
|
371
|
+
},
|
|
372
|
+
"attachments": {
|
|
373
|
+
"items": {
|
|
374
|
+
"$ref": "https://gobl.org/draft-0/org/attachment"
|
|
375
|
+
},
|
|
376
|
+
"type": "array",
|
|
377
|
+
"title": "Attachments",
|
|
378
|
+
"description": "Attachments provide additional information or supporting documents that are not included\nin the main document. It is important that attachments are not used for alternative\nversions of the PDF, for that, see \"links\" inside the envelope headers."
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
"type": "object",
|
|
382
|
+
"required": [
|
|
383
|
+
"type",
|
|
384
|
+
"issue_date",
|
|
385
|
+
"supplier"
|
|
386
|
+
],
|
|
387
|
+
"description": "Delivery document used to describe the delivery of goods or potentially also services.",
|
|
388
|
+
"recommended": [
|
|
389
|
+
"$regime",
|
|
390
|
+
"series",
|
|
391
|
+
"code",
|
|
392
|
+
"lines"
|
|
393
|
+
]
|
|
394
|
+
},
|
|
395
|
+
"Tracking": {
|
|
396
|
+
"properties": {
|
|
397
|
+
"code": {
|
|
398
|
+
"$ref": "https://gobl.org/draft-0/cbc/code",
|
|
399
|
+
"title": "Code",
|
|
400
|
+
"description": "Code used for tracking"
|
|
401
|
+
},
|
|
402
|
+
"website": {
|
|
403
|
+
"$ref": "https://gobl.org/draft-0/org/website",
|
|
404
|
+
"title": "Website",
|
|
405
|
+
"description": "Website to access for more tracking details"
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
"type": "object",
|
|
409
|
+
"description": "Tracking stores tracking information about a delivery."
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://gobl.org/draft-0/bill/discount",
|
|
4
|
+
"$ref": "#/$defs/Discount",
|
|
5
|
+
"$defs": {
|
|
6
|
+
"Discount": {
|
|
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 discounts (calculated)",
|
|
18
|
+
"calculated": true
|
|
19
|
+
},
|
|
20
|
+
"key": {
|
|
21
|
+
"$ref": "https://gobl.org/draft-0/cbc/key",
|
|
22
|
+
"anyOf": [
|
|
23
|
+
{
|
|
24
|
+
"const": "early-completion",
|
|
25
|
+
"title": "Bonus for works ahead of schedule"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"const": "military",
|
|
29
|
+
"title": "Military Discount"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"const": "work-accident",
|
|
33
|
+
"title": "Work Accident Discount"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"const": "special-agreement",
|
|
37
|
+
"title": "Special Agreement Discount"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"const": "production-error",
|
|
41
|
+
"title": "Production Error Discount"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"const": "new-outlet",
|
|
45
|
+
"title": "New Outlet Discount"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"const": "sample",
|
|
49
|
+
"title": "Sample Discount"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"const": "end-of-range",
|
|
53
|
+
"title": "End of Range Discount"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"const": "incoterm",
|
|
57
|
+
"title": "Incoterm Discount"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"const": "pos-threshold",
|
|
61
|
+
"title": "Point of Sale Threshold Discount"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"const": "special-rebate",
|
|
65
|
+
"title": "Special Rebate"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"const": "temporary",
|
|
69
|
+
"title": "Temporary"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"const": "standard",
|
|
73
|
+
"title": "Standard"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"const": "yearly-turnover",
|
|
77
|
+
"title": "Yearly Turnover"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"pattern": "^(?:[a-z]|[a-z0-9][a-z0-9-+]*[a-z0-9])$",
|
|
81
|
+
"title": "Other"
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"title": "Key",
|
|
85
|
+
"description": "Key for identifying the type of discount being applied."
|
|
86
|
+
},
|
|
87
|
+
"code": {
|
|
88
|
+
"$ref": "https://gobl.org/draft-0/cbc/code",
|
|
89
|
+
"title": "Code",
|
|
90
|
+
"description": "Code to used to refer to the this discount by the issuer"
|
|
91
|
+
},
|
|
92
|
+
"reason": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"title": "Reason",
|
|
95
|
+
"description": "Text description as to why the discount was applied"
|
|
96
|
+
},
|
|
97
|
+
"base": {
|
|
98
|
+
"$ref": "https://gobl.org/draft-0/num/amount",
|
|
99
|
+
"title": "Base",
|
|
100
|
+
"description": "Base represents the value used as a base for percent calculations instead\nof the invoice's sum of lines."
|
|
101
|
+
},
|
|
102
|
+
"percent": {
|
|
103
|
+
"$ref": "https://gobl.org/draft-0/num/percentage",
|
|
104
|
+
"title": "Percent",
|
|
105
|
+
"description": "Percentage to apply to the base or invoice's sum."
|
|
106
|
+
},
|
|
107
|
+
"amount": {
|
|
108
|
+
"$ref": "https://gobl.org/draft-0/num/amount",
|
|
109
|
+
"title": "Amount",
|
|
110
|
+
"description": "Amount to apply (calculated if percent present).",
|
|
111
|
+
"calculated": true
|
|
112
|
+
},
|
|
113
|
+
"taxes": {
|
|
114
|
+
"$ref": "https://gobl.org/draft-0/tax/set",
|
|
115
|
+
"title": "Taxes",
|
|
116
|
+
"description": "List of taxes to apply to the discount"
|
|
117
|
+
},
|
|
118
|
+
"ext": {
|
|
119
|
+
"$ref": "https://gobl.org/draft-0/tax/extensions",
|
|
120
|
+
"title": "Extensions",
|
|
121
|
+
"description": "Extension codes that apply to the discount"
|
|
122
|
+
},
|
|
123
|
+
"meta": {
|
|
124
|
+
"$ref": "https://gobl.org/draft-0/cbc/meta",
|
|
125
|
+
"title": "Meta",
|
|
126
|
+
"description": "Additional semi-structured information."
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"type": "object",
|
|
130
|
+
"required": [
|
|
131
|
+
"i",
|
|
132
|
+
"amount"
|
|
133
|
+
],
|
|
134
|
+
"description": "Discount represents an allowance applied to the complete document independent from the individual lines."
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|