diff --git a/data/regimes/it.json b/data/regimes/it.json index ae723971..5bc5ca97 100644 --- a/data/regimes/it.json +++ b/data/regimes/it.json @@ -918,6 +918,22 @@ } } ], + "inbox_keys": [ + { + "key": "it-sdi-code", + "name": { + "en": "SDI Destination Code", + "it": "Codice Destinatario SDI" + } + }, + { + "key": "it-sdi-pec", + "name": { + "en": "SDI PEC Destination", + "it": "PEC Destinatario SDI" + } + } + ], "scenarios": [ { "schema": "bill/invoice", diff --git a/data/schemas/bill/correction-options.json b/data/schemas/bill/correction-options.json index 75c968c5..2baf8ac6 100644 --- a/data/schemas/bill/correction-options.json +++ b/data/schemas/bill/correction-options.json @@ -51,5 +51,5 @@ "description": "CorrectionOptions defines a structure used to pass configuration options to correct a previous invoice." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/bill/invoice.json b/data/schemas/bill/invoice.json index 3b4016cd..66ce04a1 100644 --- a/data/schemas/bill/invoice.json +++ b/data/schemas/bill/invoice.json @@ -818,5 +818,5 @@ "description": "Totals contains the summaries of all calculations for the invoice." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/cal/date-time.json b/data/schemas/cal/date-time.json index 0aeebf96..f6cc1479 100644 --- a/data/schemas/cal/date-time.json +++ b/data/schemas/cal/date-time.json @@ -10,5 +10,5 @@ "description": "Civil date time in simplified ISO format with no time zone\ninformation, for example: 2021-05-26T13:45:00" } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/cal/date.json b/data/schemas/cal/date.json index 7eb7941a..d3546de0 100644 --- a/data/schemas/cal/date.json +++ b/data/schemas/cal/date.json @@ -10,5 +10,5 @@ "description": "Civil date in simplified ISO format, like 2021-05-26" } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/cal/period.json b/data/schemas/cal/period.json index a2eebe6b..63cec391 100644 --- a/data/schemas/cal/period.json +++ b/data/schemas/cal/period.json @@ -29,5 +29,5 @@ "description": "Period represents two dates with a start and finish." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/cbc/code-map.json b/data/schemas/cbc/code-map.json index 5ca6c1c9..44515b69 100644 --- a/data/schemas/cbc/code-map.json +++ b/data/schemas/cbc/code-map.json @@ -13,5 +13,5 @@ "description": "CodeMap is a map of keys to specific codes, useful to determine regime specific codes from their key counterparts." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/cbc/code.json b/data/schemas/cbc/code.json index b66f0c82..4f872fa5 100644 --- a/data/schemas/cbc/code.json +++ b/data/schemas/cbc/code.json @@ -12,5 +12,5 @@ "description": "Alphanumerical text identifier with upper-case letters, no whitespace, nor symbols." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/cbc/key.json b/data/schemas/cbc/key.json index 2fd2c643..a7ef93bb 100644 --- a/data/schemas/cbc/key.json +++ b/data/schemas/cbc/key.json @@ -12,5 +12,5 @@ "description": "Text identifier to be used instead of a code for a more verbose but readable identifier." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/cbc/meta.json b/data/schemas/cbc/meta.json index fb892b10..a387543f 100644 --- a/data/schemas/cbc/meta.json +++ b/data/schemas/cbc/meta.json @@ -13,5 +13,5 @@ "description": "Meta defines a structure for data about the data being defined." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/cbc/note.json b/data/schemas/cbc/note.json index 7b84c6e6..1fc2116b 100644 --- a/data/schemas/cbc/note.json +++ b/data/schemas/cbc/note.json @@ -165,5 +165,5 @@ "description": "Note represents a free text of additional information that may be added to a document." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/currency/code.json b/data/schemas/currency/code.json index cf2d164d..dea929a5 100644 --- a/data/schemas/currency/code.json +++ b/data/schemas/currency/code.json @@ -675,5 +675,5 @@ "description": "ISO Currency Code" } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/currency/exchange-rate.json b/data/schemas/currency/exchange-rate.json index 0f77b25f..6889327b 100644 --- a/data/schemas/currency/exchange-rate.json +++ b/data/schemas/currency/exchange-rate.json @@ -24,5 +24,5 @@ "description": "ExchangeRate contains data on the rate to be used when converting amounts from the document's base currency to whatever is defined." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/dsig/digest.json b/data/schemas/dsig/digest.json index 36845ace..8e3b4223 100644 --- a/data/schemas/dsig/digest.json +++ b/data/schemas/dsig/digest.json @@ -24,5 +24,5 @@ "description": "Digest defines a structure to hold a digest value including the algorithm used to generate it." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/dsig/signature.json b/data/schemas/dsig/signature.json index 2690bc54..79bcbf72 100644 --- a/data/schemas/dsig/signature.json +++ b/data/schemas/dsig/signature.json @@ -9,5 +9,5 @@ "description": "JSON Web Signature in compact form." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/envelope.json b/data/schemas/envelope.json index 001bd98f..baa7aca2 100644 --- a/data/schemas/envelope.json +++ b/data/schemas/envelope.json @@ -38,5 +38,5 @@ "description": "Envelope wraps around a document adding headers and digital signatures." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/head/header.json b/data/schemas/head/header.json index f180c111..fd2ccbea 100644 --- a/data/schemas/head/header.json +++ b/data/schemas/head/header.json @@ -55,5 +55,5 @@ "description": "Header defines the metadata of the body." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/head/stamp.json b/data/schemas/head/stamp.json index 4f05a976..48817221 100644 --- a/data/schemas/head/stamp.json +++ b/data/schemas/head/stamp.json @@ -24,5 +24,5 @@ "description": "Stamp defines an official seal of approval from a third party like a governmental agency or intermediary and should thus be included in any official envelopes." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/i18n/string.json b/data/schemas/i18n/string.json index 027c8785..ae350f3d 100644 --- a/data/schemas/i18n/string.json +++ b/data/schemas/i18n/string.json @@ -15,5 +15,5 @@ "description": "Map of 2-Letter language codes to their translations." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/l10n/code.json b/data/schemas/l10n/code.json index ecdf6a18..a258cbc8 100644 --- a/data/schemas/l10n/code.json +++ b/data/schemas/l10n/code.json @@ -10,5 +10,5 @@ "description": "Code is used for short identifies like country or state codes." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/l10n/country-code.json b/data/schemas/l10n/country-code.json index ac7a5679..1e29fbec 100644 --- a/data/schemas/l10n/country-code.json +++ b/data/schemas/l10n/country-code.json @@ -1007,5 +1007,5 @@ "description": "Defines an ISO 3166-2 country code" } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/note/message.json b/data/schemas/note/message.json index b8abdfc6..00c5beef 100644 --- a/data/schemas/note/message.json +++ b/data/schemas/note/message.json @@ -34,5 +34,5 @@ ] } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/num/amount.json b/data/schemas/num/amount.json index 7d35d54c..5e755eef 100644 --- a/data/schemas/num/amount.json +++ b/data/schemas/num/amount.json @@ -10,5 +10,5 @@ "description": "Quantity with optional decimal places that determine accuracy." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/num/percentage.json b/data/schemas/num/percentage.json index b868e1a2..0a47dfee 100644 --- a/data/schemas/num/percentage.json +++ b/data/schemas/num/percentage.json @@ -10,5 +10,5 @@ "description": "Similar to an Amount, but designed for percentages and includes % symbol in JSON output." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/org/address.json b/data/schemas/org/address.json index 7ba284f5..21d88f4c 100644 --- a/data/schemas/org/address.json +++ b/data/schemas/org/address.json @@ -88,5 +88,5 @@ "description": "Address defines a globally acceptable set of attributes that describes a postal or fiscal address." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/org/coordinates.json b/data/schemas/org/coordinates.json index 0fdef129..0d118181 100644 --- a/data/schemas/org/coordinates.json +++ b/data/schemas/org/coordinates.json @@ -30,5 +30,5 @@ "description": "Coordinates describes an exact geographical location in the world." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/org/email.json b/data/schemas/org/email.json index f327277c..d1c269a1 100644 --- a/data/schemas/org/email.json +++ b/data/schemas/org/email.json @@ -32,5 +32,5 @@ "description": "Email describes the electronic mailing details." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/org/identity.json b/data/schemas/org/identity.json index 9ff2a94d..ea0debf2 100644 --- a/data/schemas/org/identity.json +++ b/data/schemas/org/identity.json @@ -38,5 +38,5 @@ "description": "Identity is used to define a code for a specific context." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/org/image.json b/data/schemas/org/image.json index 760625e8..f5af7f34 100644 --- a/data/schemas/org/image.json +++ b/data/schemas/org/image.json @@ -55,11 +55,16 @@ "$ref": "https://gobl.org/draft-0/dsig/digest", "title": "Digest", "description": "Digest can be used to ensure the image contained at the URL\nis the same one as originally intended." + }, + "meta": { + "$ref": "https://gobl.org/draft-0/cbc/meta", + "title": "Meta", + "description": "Meta contains additional information about the image." } }, "type": "object", "description": "Image describes a logo or photo that represents an entity." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/org/inbox.json b/data/schemas/org/inbox.json index 81ffd00d..9e089cae 100644 --- a/data/schemas/org/inbox.json +++ b/data/schemas/org/inbox.json @@ -38,5 +38,5 @@ "description": "Inbox is used to store data about a connection with a service that is responsible for potentially receiving copies of GOBL envelopes or other document formats defined locally." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/org/item.json b/data/schemas/org/item.json index 7aad1175..ef4515f5 100644 --- a/data/schemas/org/item.json +++ b/data/schemas/org/item.json @@ -75,5 +75,5 @@ "description": "Item is used to describe a single product or service." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/org/name.json b/data/schemas/org/name.json index d3f4f0eb..2ee78c2a 100644 --- a/data/schemas/org/name.json +++ b/data/schemas/org/name.json @@ -59,5 +59,5 @@ "description": "Name represents what a human is called." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/org/party.json b/data/schemas/org/party.json index 06552028..69d1e23c 100644 --- a/data/schemas/org/party.json +++ b/data/schemas/org/party.json @@ -112,5 +112,5 @@ "description": "Party represents a person or business entity." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/org/person.json b/data/schemas/org/person.json index 8d837dee..d8294135 100644 --- a/data/schemas/org/person.json +++ b/data/schemas/org/person.json @@ -57,5 +57,5 @@ "description": "Person represents a human, and how to contact them electronically." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/org/registration.json b/data/schemas/org/registration.json index 93e8d6ba..5bd8d7e8 100644 --- a/data/schemas/org/registration.json +++ b/data/schemas/org/registration.json @@ -50,5 +50,5 @@ "description": "Registration is used in countries that require additional information to be associated with a company usually related to a specific registration office." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/org/telephone.json b/data/schemas/org/telephone.json index 10f04c96..1a256495 100644 --- a/data/schemas/org/telephone.json +++ b/data/schemas/org/telephone.json @@ -28,5 +28,5 @@ "description": "Telephone describes what is expected for a telephone number." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/org/unit.json b/data/schemas/org/unit.json index 390177cf..93e8a2cc 100644 --- a/data/schemas/org/unit.json +++ b/data/schemas/org/unit.json @@ -219,5 +219,5 @@ "description": "Unit describes how the quantity of the product should be interpreted." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/org/website.json b/data/schemas/org/website.json index e1fe0fa0..fddc1bf4 100644 --- a/data/schemas/org/website.json +++ b/data/schemas/org/website.json @@ -34,5 +34,5 @@ "description": "Website describes what is expected for a web address." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/pay/advance.json b/data/schemas/pay/advance.json index e600c1dc..9bc9784d 100644 --- a/data/schemas/pay/advance.json +++ b/data/schemas/pay/advance.json @@ -125,5 +125,5 @@ "description": "Advance represents a single payment that has been made already, such as a deposit on an intent to purchase, or as credit from a previous invoice which was later corrected or cancelled." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/pay/instructions.json b/data/schemas/pay/instructions.json index dc2f63c8..58e18346 100644 --- a/data/schemas/pay/instructions.json +++ b/data/schemas/pay/instructions.json @@ -221,5 +221,5 @@ "description": "Online provides the details required to make a payment online using a website" } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/pay/terms.json b/data/schemas/pay/terms.json index bc004b62..d449f8cf 100644 --- a/data/schemas/pay/terms.json +++ b/data/schemas/pay/terms.json @@ -120,5 +120,5 @@ "description": "Terms defines when we expect the customer to pay, or have paid, for the contents of the document." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/regimes/mx/food-vouchers.json b/data/schemas/regimes/mx/food-vouchers.json index 8b4b7ed0..f5ef7b43 100644 --- a/data/schemas/regimes/mx/food-vouchers.json +++ b/data/schemas/regimes/mx/food-vouchers.json @@ -101,5 +101,5 @@ "description": "FoodVouchersLine represents a single food voucher issued to the e-wallet of one of the customer's employees." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/regimes/mx/fuel-account-balance.json b/data/schemas/regimes/mx/fuel-account-balance.json index c3f7ce5f..5ddb8320 100644 --- a/data/schemas/regimes/mx/fuel-account-balance.json +++ b/data/schemas/regimes/mx/fuel-account-balance.json @@ -163,5 +163,5 @@ "description": "FuelAccountTax represents a single tax applied to a fuel purchase." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/schema/object.json b/data/schemas/schema/object.json index d2802f7c..2126ff4b 100644 --- a/data/schemas/schema/object.json +++ b/data/schemas/schema/object.json @@ -9,5 +9,5 @@ "description": "Data object whose type is determined from the \u003ccode\u003e$schema\u003c/code\u003e property." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/tax/identity.json b/data/schemas/tax/identity.json index e76dc816..bd0199c0 100644 --- a/data/schemas/tax/identity.json +++ b/data/schemas/tax/identity.json @@ -43,5 +43,5 @@ "description": "Identity stores the details required to identify an entity for tax purposes." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/tax/regime.json b/data/schemas/tax/regime.json index a49a1f6c..637b9e02 100644 --- a/data/schemas/tax/regime.json +++ b/data/schemas/tax/regime.json @@ -363,6 +363,14 @@ "title": "Item Keys", "description": "ItemKeys specific for the regime that need to be added to `org.Item` data\nin line rows." }, + "inbox_keys": { + "items": { + "$ref": "#/$defs/KeyDefinition" + }, + "type": "array", + "title": "Inbox Keys", + "description": "InboxKeys specific for a region that can be used to identify where a document\nshould be forwarded too." + }, "scenarios": { "items": { "$ref": "#/$defs/ScenarioSet" @@ -530,5 +538,5 @@ "description": "Zone represents an area inside a country, like a province or a state, which shares the basic definitions of the country, but may vary in some validation rules." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/tax/set.json b/data/schemas/tax/set.json index 225faa2a..8fde8544 100644 --- a/data/schemas/tax/set.json +++ b/data/schemas/tax/set.json @@ -47,5 +47,5 @@ "description": "Set defines a list of tax categories and their rates to be used alongside taxable items." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/tax/total.json b/data/schemas/tax/total.json index b7e8dee8..d8433428 100644 --- a/data/schemas/tax/total.json +++ b/data/schemas/tax/total.json @@ -118,5 +118,5 @@ "description": "Total contains a set of Category Totals which in turn contain all the accumulated taxes contained in the document." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/data/schemas/uuid/uuid.json b/data/schemas/uuid/uuid.json index 77ef4cd5..485cb4d4 100644 --- a/data/schemas/uuid/uuid.json +++ b/data/schemas/uuid/uuid.json @@ -10,5 +10,5 @@ "description": "Universally Unique Identifier. We only recommend using versions 1 and 4 within GOBL." } }, - "$comment": "Generated with GOBL v0.62.0" + "$comment": "Generated with GOBL v0.62.1" } \ No newline at end of file diff --git a/regimes/it/examples/hotel.json b/regimes/it/examples/hotel.json index 4bc6ae10..75708f02 100644 --- a/regimes/it/examples/hotel.json +++ b/regimes/it/examples/hotel.json @@ -39,7 +39,7 @@ "name": "Mela S.r.l.", "inboxes": [ { - "key": "codice-destinatario", + "key": "it-sdi-code", "code": "M5UXCR5" } ], diff --git a/regimes/it/examples/out/hotel.json b/regimes/it/examples/out/hotel.json index 7359d88d..ec227f8c 100644 --- a/regimes/it/examples/out/hotel.json +++ b/regimes/it/examples/out/hotel.json @@ -4,7 +4,7 @@ "uuid": "8a51fd30-2a27-11ee-be56-0242ac120002", "dig": { "alg": "sha256", - "val": "8fe3ad8e45aa2459aaee53741e2b2935d73b8fcc5c822ebb5b60be4f51912197" + "val": "9464c96c31ea3e8b8c85b04273629a2867ca3326b7eeaf9edae63e4df896e8ed" }, "draft": true }, @@ -49,7 +49,7 @@ }, "inboxes": [ { - "key": "codice-destinatario", + "key": "it-sdi-code", "code": "M5UXCR5" } ], diff --git a/regimes/it/examples/out/stamp-duty.json b/regimes/it/examples/out/stamp-duty.json index 567d1eeb..2f3608de 100644 --- a/regimes/it/examples/out/stamp-duty.json +++ b/regimes/it/examples/out/stamp-duty.json @@ -4,7 +4,7 @@ "uuid": "8a51fd30-2a27-11ee-be56-0242ac120002", "dig": { "alg": "sha256", - "val": "809038b1055710b99faac4329989f66080918fac7e4e67041caafe134909d50e" + "val": "7f4f5ef772529bb005f0214a90cb3a4ac3c17efaad5b00beeb430654a890d85e" }, "draft": true }, @@ -46,7 +46,7 @@ }, "inboxes": [ { - "key": "codice-destinatario", + "key": "it-sdi-code", "code": "M5UXCR5" } ], diff --git a/regimes/it/examples/stamp-duty.json b/regimes/it/examples/stamp-duty.json index 6dc7fb4d..20180132 100644 --- a/regimes/it/examples/stamp-duty.json +++ b/regimes/it/examples/stamp-duty.json @@ -36,7 +36,7 @@ "name": "Mela S.r.l.", "inboxes": [ { - "key": "codice-destinatario", + "key": "it-sdi-code", "code": "M5UXCR5" } ], diff --git a/regimes/it/inboxes.go b/regimes/it/inboxes.go new file mode 100644 index 00000000..bceac09b --- /dev/null +++ b/regimes/it/inboxes.go @@ -0,0 +1,30 @@ +package it + +import ( + "github.com/invopop/gobl/cbc" + "github.com/invopop/gobl/i18n" + "github.com/invopop/gobl/tax" +) + +// Inbox keys to universally identify where copies of documents can be sent. +const ( + KeyInboxSDICode cbc.Key = "it-sdi-code" + KeyInboxSDIPEC cbc.Key = "it-sdi-pec" +) + +var inboxKeyDefinitions = []*tax.KeyDefinition{ + { + Key: KeyInboxSDICode, + Name: i18n.String{ + i18n.EN: "SDI Desination Code", + i18n.IT: "Codice Destinatario SDI", + }, + }, + { + Key: KeyInboxSDIPEC, + Name: i18n.String{ + i18n.EN: "SDI PEC Destination", + i18n.IT: "PEC Destinatario SDI", + }, + }, +} diff --git a/regimes/it/it.go b/regimes/it/it.go index d621ef8e..673d8f19 100644 --- a/regimes/it/it.go +++ b/regimes/it/it.go @@ -33,6 +33,7 @@ func New() *tax.Regime { }, TimeZone: "Europe/Rome", ChargeKeys: chargeKeyDefinitions, // charges.go + InboxKeys: inboxKeyDefinitions, // inboxes.go PaymentMeansKeys: paymentMeansKeyDefinitions, // pay.go IdentityTypeKeys: taxIdentityTypeDefinitions, // tax_identity.go Extensions: extensionKeys, // extensions.go diff --git a/tax/regime.go b/tax/regime.go index 3c2bc548..2ce7d157 100644 --- a/tax/regime.go +++ b/tax/regime.go @@ -69,6 +69,10 @@ type Regime struct { // in line rows. ItemKeys []*KeyDefinition `json:"item_keys,omitempty" jsonschema:"title=Item Keys"` + // InboxKeys specific to the regime that can be used to identify where a document + // should be forwarded to. + InboxKeys []*KeyDefinition `json:"inbox_keys,omitempty" jsonschema:"title=Inbox Keys"` + // Sets of scenario definitions for the regime. Scenarios []*ScenarioSet `json:"scenarios,omitempty" jsonschema:"title=Scenarios"` @@ -295,10 +299,22 @@ func (r *Regime) Validate() error { err := validation.ValidateStruct(r, validation.Field(&r.Country, validation.Required), validation.Field(&r.Name, validation.Required), + validation.Field(&r.Description), validation.Field(&r.TimeZone, validation.Required, validation.By(validateTimeZone)), + validation.Field(&r.Country), + validation.Field(&r.Zone), + validation.Field(&r.Currency), + validation.Field(&r.Tags), + validation.Field(&r.IdentityTypeKeys), + validation.Field(&r.Extensions), + validation.Field(&r.ChargeKeys), + validation.Field(&r.PaymentMeansKeys), + validation.Field(&r.ItemKeys), + validation.Field(&r.InboxKeys), validation.Field(&r.Scenarios), - validation.Field(&r.Categories, validation.Required), validation.Field(&r.Corrections), + validation.Field(&r.Categories, validation.Required), + validation.Field(&r.Zones), ) return err } diff --git a/version.go b/version.go index 4a52bf37..4e2d9cee 100644 --- a/version.go +++ b/version.go @@ -8,7 +8,7 @@ import ( type Version string // VERSION is the current version of the GOBL library. -const VERSION Version = "v0.62.0" +const VERSION Version = "v0.62.1" // Semver parses and returns semver func (v Version) Semver() *semver.Version {