eu-en16931-v2017
Support for the European Norm (EN) 16931-1:2017 standard for electronic invoicing.
This addon ensures the basic rules and mappings are applied to the GOBL document
ensure that it is compliant and easily convertible to other formats.
We strongly recommend checking the output and specifically the extension codes
used to ensure that any assumptions do not need be adjusted.
Tax Code Extension Mappings
The following tables show how GOBL tax keys/categories are mapped to UNTDID 5305 tax category codes:VAT
| GOBL Tax Key | UNTDID 5305 Code | Description |
|---|---|---|
| standard | S | Standard rate |
| zero | Z | Zero rated goods |
| exempt | E | Exempt from tax |
| reverse-charge | AE | VAT Reverse Charge |
| intra-community | K | Intra-community supply |
| export | G | Export outside the EU |
| outside-scope | O | Not subject to VAT |
Other
For Spanish special territories, IGIC (Canary Islands) maps to code L and IPSI (Ceuta and Melilla) maps to code M. Any other tax category defaults to UNTDID 5305 code O (Outside Scope).Exemption Notes
Exempt tax categories (E, AE, K, G, O) require either a CEF VATEX code (cef-vatex) on the tax combo, or an exemption note in tax.notes.
Exemption notes use the tax.Note struct with cat, key, and text fields.
During normalization, the note’s key is mapped to the corresponding
untdid-tax-category extension (e.g. exempt → E,
reverse-charge → AE).
Each exempt tax category without a VATEX code must have at least one
exemption note covering it.
Scenarios
Scenarios attach notes and extensions to a document when its filters match. Read more about scenarios.bill/invoice
bill/invoice
| Tags | Type | Output |
|---|---|---|
| - | standard | { |
| - | credit-note | { |
| - | debit-note | { |
| - | corrective | { |
| - | proforma | { |
partial | standard | { |
self-billed | standard | { |
self-billed | credit-note | { |
prepayment | standard | { |
factoring | standard | { |
factoring | credit-note | { |
Validation Rules
Validation rules check each struct against a set of assertions and report any failures with a unique code and message. Read more about validation.bill.Invoice
bill.Invoice
| Field | Test | Validation Code / Message |
|---|---|---|
| Invoice |
| GOBL-EU-EN16931-V2017-BILL-INVOICE-08Exempt tax categories require either a VATEX code or an exemption note |
tax |
| GOBL-EU-EN16931-V2017-BILL-INVOICE-01Tax details are required with ext and UNTDID document type |
tax.ext |
| GOBL-EU-EN16931-V2017-BILL-INVOICE-02Document type extension is required |
lines |
| GOBL-EU-EN16931-V2017-BILL-INVOICE-03At least one line is required (BR-16) |
supplier.addresses |
| GOBL-EU-EN16931-V2017-BILL-INVOICE-04Supplier addresses are required (BR-8) |
customer.addresses |
| GOBL-EU-EN16931-V2017-BILL-INVOICE-05Customer addresses are required (BR-10) |
payment |
| GOBL-EU-EN16931-V2017-BILL-INVOICE-06Payment details are required when amount is due (BR-CO-25) |
payment.terms |
| GOBL-EU-EN16931-V2017-BILL-INVOICE-07Payment terms are required when amount is due (BR-CO-25) |
bill.Discount
bill.Discount
| Field | Test | Validation Code / Message |
|---|---|---|
| Discount |
| GOBL-EU-EN16931-V2017-BILL-DISCOUNT-02Either a reason or an allowance type extension is required (BR-33) |
taxes |
| GOBL-EU-EN16931-V2017-BILL-DISCOUNT-01Taxes are required (BR-32) |
bill.LineDiscount
bill.LineDiscount
| Field | Test | Validation Code / Message |
|---|---|---|
| LineDiscount |
| GOBL-EU-EN16931-V2017-BILL-LINEDISCOUNT-01Either a reason or an allowance type extension is required (BR-41) |
bill.Charge
bill.Charge
| Field | Test | Validation Code / Message |
|---|---|---|
| Charge |
| GOBL-EU-EN16931-V2017-BILL-CHARGE-01Either a reason or a charge type extension is required (BR-36) |
bill.LineCharge
bill.LineCharge
| Field | Test | Validation Code / Message |
|---|---|---|
| LineCharge |
| GOBL-EU-EN16931-V2017-BILL-LINECHARGE-01Either a reason or a charge type extension is required (BR-44) |
pay.Instructions
pay.Instructions
| Field | Test | Validation Code / Message |
|---|---|---|
ext |
| GOBL-EU-EN16931-V2017-PAY-INSTRUCTIONS-01Payment means extension is required (BR-49) |
pay.Terms
pay.Terms
| Field | Test | Validation Code / Message |
|---|---|---|
| Terms |
| GOBL-EU-EN16931-V2017-PAY-TERMS-01Either due_dates or notes must be provided (BR-CO-25) |
org.Item
org.Item
| Field | Test | Validation Code / Message |
|---|---|---|
unit |
| GOBL-EU-EN16931-V2017-ORG-ITEM-01Unit is required (BR-23) |
org.Attachment
org.Attachment
| Field | Test | Validation Code / Message |
|---|---|---|
code |
| GOBL-EU-EN16931-V2017-ORG-ATTACHMENT-01Code is required |
org.Party
org.Party
| Field | Test | Validation Code / Message |
|---|---|---|
inboxes |
| GOBL-EU-EN16931-V2017-ORG-PARTY-01Cannot have more than one inbox (BT-34, BT-49) |
org.Inbox
org.Inbox
| Field | Test | Validation Code / Message |
|---|---|---|
| Inbox |
| GOBL-EU-EN16931-V2017-ORG-INBOX-01Scheme cannot be blank when code is set (BR-62, BR-63) |
| Inbox |
| GOBL-EU-EN16931-V2017-ORG-INBOX-02Code cannot be blank when scheme is set |
org.Address
org.Address
| Field | Test | Validation Code / Message |
|---|---|---|
country |
| GOBL-EU-EN16931-V2017-ORG-ADDRESS-01Country is required (BR-9, BR-11, BR-20, BR-57) |
tax.Combo
tax.Combo
| Field | Test | Validation Code / Message |
|---|---|---|
ext |
| GOBL-EU-EN16931-V2017-TAX-COMBO-01Tax category extension is required |
ext |
| GOBL-EU-EN16931-V2017-TAX-COMBO-02VAT category code must be valid |
ext |
| GOBL-EU-EN16931-V2017-TAX-COMBO-03Must use IGIC category code |
ext |
| GOBL-EU-EN16931-V2017-TAX-COMBO-04Must use IPSI category code |
ext |
| GOBL-EU-EN16931-V2017-TAX-COMBO-05Must use outside scope category code |
ext |
| GOBL-EU-EN16931-V2017-TAX-COMBO-06VATEX extension is required for exempt tax (BR-E-10) |
ext |
| GOBL-EU-EN16931-V2017-TAX-COMBO-07VATEX extension must not be set for standard, zero, IGIC, or IPSI categories (BR-S-10, BR-Z-10) |