Skip to main content
Key: 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 KeyUNTDID 5305 CodeDescription
standardSStandard rate
zeroZZero rated goods
exemptEExempt from tax
reverse-chargeAEVAT Reverse Charge
intra-communityKIntra-community supply
exportGExport outside the EU
outside-scopeONot 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. exemptE, reverse-chargeAE). 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.
TagsTypeOutput
-standard{
  “ext”: {
    “untdid-document-type”: “380”
  }
}
-credit-note{
  “ext”: {
    “untdid-document-type”: “381”
  }
}
-debit-note{
  “ext”: {
    “untdid-document-type”: “383”
  }
}
-corrective{
  “ext”: {
    “untdid-document-type”: “384”
  }
}
-proforma{
  “ext”: {
    “untdid-document-type”: “325”
  }
}
partialstandard{
  “ext”: {
    “untdid-document-type”: “326”
  }
}
self-billedstandard{
  “ext”: {
    “untdid-document-type”: “389”
  }
}
self-billedcredit-note{
  “ext”: {
    “untdid-document-type”: “261”
  }
}
prepaymentstandard{
  “ext”: {
    “untdid-document-type”: “386”
  }
}
factoringstandard{
  “ext”: {
    “untdid-document-type”: “393”
  }
}
factoringcredit-note{
  “ext”: {
    “untdid-document-type”: “396”
  }
}

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.
FieldTestValidation Code / Message
Invoice
  • Exemption notes
GOBL-EU-EN16931-V2017-BILL-INVOICE-08
Exempt tax categories require either a VATEX code or an exemption note
tax
  • Present
GOBL-EU-EN16931-V2017-BILL-INVOICE-01
Tax details are required with ext and UNTDID document type
tax.ext
  • Ext require [untdid-document-type]
GOBL-EU-EN16931-V2017-BILL-INVOICE-02
Document type extension is required
lines
  • Present
GOBL-EU-EN16931-V2017-BILL-INVOICE-03
At least one line is required (BR-16)
supplier.addresses
  • Present
GOBL-EU-EN16931-V2017-BILL-INVOICE-04
Supplier addresses are required (BR-8)
customer.addresses
  • Present
GOBL-EU-EN16931-V2017-BILL-INVOICE-05
Customer addresses are required (BR-10)
payment
  • Is due standard invoice
  • Present
GOBL-EU-EN16931-V2017-BILL-INVOICE-06
Payment details are required when amount is due (BR-CO-25)
payment.terms
  • Is due standard invoice
  • Present
GOBL-EU-EN16931-V2017-BILL-INVOICE-07
Payment terms are required when amount is due (BR-CO-25)
FieldTestValidation Code / Message
Discount
  • Reason or allowance
GOBL-EU-EN16931-V2017-BILL-DISCOUNT-02
Either a reason or an allowance type extension is required (BR-33)
taxes
  • Present
GOBL-EU-EN16931-V2017-BILL-DISCOUNT-01
Taxes are required (BR-32)
FieldTestValidation Code / Message
LineDiscount
  • Reason or allowance
GOBL-EU-EN16931-V2017-BILL-LINEDISCOUNT-01
Either a reason or an allowance type extension is required (BR-41)
FieldTestValidation Code / Message
Charge
  • Reason or charge
GOBL-EU-EN16931-V2017-BILL-CHARGE-01
Either a reason or a charge type extension is required (BR-36)
FieldTestValidation Code / Message
LineCharge
  • Reason or charge
GOBL-EU-EN16931-V2017-BILL-LINECHARGE-01
Either a reason or a charge type extension is required (BR-44)
FieldTestValidation Code / Message
ext
  • Ext require [untdid-payment-means]
GOBL-EU-EN16931-V2017-PAY-INSTRUCTIONS-01
Payment means extension is required (BR-49)
FieldTestValidation Code / Message
Terms
  • Has due dates or notes
GOBL-EU-EN16931-V2017-PAY-TERMS-01
Either due_dates or notes must be provided (BR-CO-25)
FieldTestValidation Code / Message
unit
  • Present
GOBL-EU-EN16931-V2017-ORG-ITEM-01
Unit is required (BR-23)
FieldTestValidation Code / Message
code
  • Present
GOBL-EU-EN16931-V2017-ORG-ATTACHMENT-01
Code is required
FieldTestValidation Code / Message
inboxes
  • Length between 0 and 1
GOBL-EU-EN16931-V2017-ORG-PARTY-01
Cannot have more than one inbox (BT-34, BT-49)
FieldTestValidation Code / Message
Inbox
  • Scheme required with code
GOBL-EU-EN16931-V2017-ORG-INBOX-01
Scheme cannot be blank when code is set (BR-62, BR-63)
Inbox
  • Code required with scheme
GOBL-EU-EN16931-V2017-ORG-INBOX-02
Code cannot be blank when scheme is set
FieldTestValidation Code / Message
country
  • Present
GOBL-EU-EN16931-V2017-ORG-ADDRESS-01
Country is required (BR-9, BR-11, BR-20, BR-57)
FieldTestValidation Code / Message
ext
  • Ext require [untdid-tax-category]
GOBL-EU-EN16931-V2017-TAX-COMBO-01
Tax category extension is required
ext
  • Is VAT
  • Ext ‘untdid-tax-category’ in [AE, E, G, K, O, S, Z]
GOBL-EU-EN16931-V2017-TAX-COMBO-02
VAT category code must be valid
ext
  • Is IGIC
  • Ext ‘untdid-tax-category’ in [L]
GOBL-EU-EN16931-V2017-TAX-COMBO-03
Must use IGIC category code
ext
  • Is IPSI
  • Ext ‘untdid-tax-category’ in [M]
GOBL-EU-EN16931-V2017-TAX-COMBO-04
Must use IPSI category code
ext
  • Is outside scope
  • Ext ‘untdid-tax-category’ in [O]
GOBL-EU-EN16931-V2017-TAX-COMBO-05
Must use outside scope category code
ext
  • Is exempt
  • Ext require [cef-vatex]
GOBL-EU-EN16931-V2017-TAX-COMBO-06
VATEX extension is required for exempt tax (BR-E-10)
ext
  • Is non-exempt
  • Ext exclude [cef-vatex]
GOBL-EU-EN16931-V2017-TAX-COMBO-07
VATEX extension must not be set for standard, zero, IGIC, or IPSI categories (BR-S-10, BR-Z-10)