EN 16931
Electronic invoicing #
Electronic invoicing is the exchange of an electronic invoice document between a supplier and a buyer. An electronic invoice (eInvoice) is an invoice that has been issued, transmitted and received in a structured data format which allows for its automatic and electronic processing, as defined in Directive 2014/55/EU.
Why it was created? #
EN 16931 was developed by the European Committee for Standardization (CEN) in response to the European Union’s Directive 2014/55/EU on electronic invoicing in public procurement. The directive requires all European Union member states to adopt a common standard for electronic invoicing in public procurement by November 2020. EN 16931 is the standard that was developed to meet this requirement.
UBL and CII #
UBL (Universal Business Language) and CII (UN/CEFACT Cross Industry Invoice) are two XML-based specifications for exchanging business information. They both already existed prior to the European standard and were then chosen as the only supported syntaxes for representing invoice documents that comply with EN 16931.
In theory, they can be used interchangeable with respect to EU e-invoices, although some exceptions may apply depending on additional business rules enforced by a CIUS or an extension.
To determine which field from an European invoice goes to which UBL/CII XML node, there are mappings defined for both formats in parts 2 and 3 of the European standard.
Code #
https://s2c.zatca.gov.sa/A/b56255ffgithub implemented examples of this standard #
Odoo #
- odoo11-addon-account-invoice-ubl Well maintained with around 2000 commits
- Accounting invoice
Odoo Invoicing Extension Addons well maintained with around 1893 commits.
Technical Implementation Details #
Technical Details #
The European e-Invoicing standard (EN 16931) describes the semantic data model and business rules of an electronic invoice. In other words, this document (specifically part 1) specificies what an invoice is (fields it must/can have) and the possible values those fields can contain.
But that’s it: it just gives an abstract definition of an invoice without getting into the technical structure (syntax). We need a format (or formats) for representing electronic invoices as documents (files), and the two specifications allowed by the standard are UBL and CII.
The main purpose of this library is to represent invoices as defined by the European standard and convert them from/to its document representations in UBL or CII.