Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More
Lino and eInvoicing (PEPPOL)¶
Lino supports sending electronic sales invoices compliant with the European standard on eInvoicing.
The feature is under development and will be required for companies in Belgium from January 2026.
What’s implemented¶
To create the XML of an electronic sales invoice, simply print the invoice. This will generate an XML file that follows the EN 16931-1 standard (PEPPOL format). The printable PDF file contains a link to the generated XML file.
Note that invoices to private persons don’t generate any XML file because PEPPOL is currently meant for B2B exchanges.
Try our demo¶
If you want to see it with your own eyes:
Go to https://cosi1e.lino-framework.org and sign in as
robin
Click on the link “730 Sales invoices (SLS)” in the main page
Select an invoice having a company (not a private person) as partner. For example invoice SLS 26/2024.
Click on the Print button in the toolbar. If needed, tell your browser to accept pop-up windows from this site.
When the pdf opens, click on “e-invoice: /media/xml/SLS/1787.xml” to see the XML file.
You can manually validate the generated XML file for example on ecosio.org.
There is more to do¶
Transmission of the XML file to an access point is not yet implemented.
Import PEPPOL invoice files.
The ecosio validator still reports issues.
Peppol code lists¶
The following sections explain a few things about Peppol in my words.
- document type¶
One of the codes listed here.
- transport profile¶
One of the codes listed here. Actually there is only one active transport profile, named AS4.
- participant identifier scheme¶
A recognized official registry of identification codes.
One of the codes listed here.
Synonym for EAS?
- EAS¶
Electronic Address Scheme
One of the codes listed here.
Synonym for participant identifier scheme?
Some examples of EAS codes:
9925 : Belgium VAT number
0208 : Belgium Company number
9931 : Estonian Company number
It seems that EAS 9925 is a subset of EAS 0208: every party subject to VAT in Belgium also as a company number, which is the same as its VAT number. Hence normal companies should be in both registers, while companies like insurances and some non-profit organizations (who are not subject to VAT and hence have no VAT number) will be only in EAS 0208.
The vat/peppol-ubl.xml
template¶
In order to create the XML of an electronic sales invoice, Lino simply parses
the vat/peppol-ubl.xml
template. This file contains already quite some
business logic and this work is not yet finished.
Here is some UBL jargon and how it maps to general Peppol jargon.
The parties of an invoice¶
Seller : the partner who sells. Also called supplier, provider. See cac:AccountingSupplierParty
Buyer : the partner who buys. Also called invoicee, recipient, customer. See cac:AccountingCustomerParty
Payee : the partner who receives the payment. Shall be used when the Payee is different from the Seller. We currently don’t use this element
<cac:PayeeParty>
.Tax representative :
<cac:TaxRepresentativeParty>
: not mandatory and we don’t know what it is used for.
Both the seller and the buyer of an invoice contain a single mandatory element cac:Party, which contains a mandatory element cbc:EndpointID, which identifies the party’s electronic address.
This EndpointID
element contains the identification number as a textual
value, and must have an attribute schemeID
, which refers to the EAS
code to use when looking up the identification number.
The VAT category¶
The <cac:ClassifiedTaxCategory>
element contains “a group of business terms
providing information about the VAT applicable for the goods and services
invoiced on the invoice or the invoice line.”
<cbc:ID>
: The VAT category code for the invoiced item.<cbc:Percent>
: The applied VAT rate. A number, potentially with decimal positions<cac:TaxScheme>
: a mysterious but mandatory element. According to our references it must contain exactly one child element<cbc:ID>VAT</cbc:ID>
, where the word “VAT” seems to mean that the seller is identified using their VAT identifier. We don’t know whether it may contain other values.
- VAT category¶
An alphabetic code defined as part of PEPPOL in the UNCL5305 code list
This list specifies the allowed VAT categories:
AE
Vat Reverse Charge
VAT is levied from the buyer.
E
Exempt from Tax
Taxes are not applicable.
S
Standard rate
The standard rate is applicable.
Z
Zero rated goods
The goods are at a zero rate.
H
Higher rate
A higher rate of duty or tax or fee is applicable.
AA
Lower rate
Tax rate is lower than standard rate.
For any given voucher item, Lino can say which of above codes to apply
by interpreting the VAT rule. This mapping is done in
VatItemBase.get_peppol_vat_category()
.
A good introduction into why we have all these categories and rates is here: VAT Rates in Europe 2024
Amounts¶
Vocabulary:
Line net amount: Invoiced quantity * Unit Gross Price
Allowances : discount or similar amount to subtract from the net amount
Charges : some fee, tax (other than VAT) or similar amount to add to the net amount
Line extension amount : Net amount + Charges - Allowances.
An invoice must have exactly one cac:LegalMonetaryTotal element, which provides the monetary totals for the invoice. It can have the following children (each child at most once):
cbc:LineExtensionAmount: Sum of all invoice line amounts in the invoice, net of tax and settlement discounts, but inclusive of any applicable rounding amount.
cbc:TaxExclusiveAmount: total amount of the invoice without VAT.
cbc:TaxInclusiveAmount: total amount of the invoice with VAT.
cbc:ChargeTotalAmount: Sum of all charges in the invoice.
cbc:PrepaidAmount: Sum of amounts that have been paid in advance.
cbc:PayableRoundingAmount Amount to be added to the invoice total to round the amount to be paid.
‘cbc:PayableAmount <https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-invoice/cac-LegalMonetaryTotal/cbc-PayableAmount/>`__: outstanding amount that is requested to be paid
Amounts must be rounded to maximum 2 decimals.
Each amount element has a mandatory attribute currencyID
.
Sources of information¶
ec.europa.eu (European Commission):
peppol.eu (OpenPeppol AISBL):
OpenPeppol eDEC Specifications lists the specifications of the Peppol eDelivery network.
peppol.org:
other:
https://github.com/OpenPEPPOL/peppol-bis-invoice-3/blob/master/rules/examples/base-example.xml
2020-06-01 The European Commission updates the Electronic Address Scheme (EAS) code lists
My own blog entries:
Peppol jargon¶
Here are some PEPPOL-related abbreviations and what they mean.
- PEPPOL¶
An international standard for exchanging structured electronic invoices and other business documents.
- SML¶
Service Metadata Locator
https://docs.peppol.eu/edelivery/sml/PEPPOL-EDN-Service-Metadata-Locator-1.2.0-2021-05-13.pdf
- SMP¶
Service Metadata Publishing
- AS4¶
The only transport profile still in use.
“The AS4 technical specification [AS4] defines a secure and reliable messaging protocol. It can be used for message exchange in Business-to-Business (B2B), Administration-to-Administration (A2A), Administration-to-Business (A2B) and Business-to-Administration (B2A) contexts. AS4 messages can carry any number of payloads. Payloads may be structured or unstructured documents or data.” (ec.europa.eu)
- UBL¶
Universal Business Language
- BIS¶
Business Interoperability Specifications