Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More
Lino and eInvoicing¶
Lino supports sending electronic sales invoices compliant with the European standard on eInvoicing. The feature is under development.
What’s implemented¶
To create the XML of an electronic sales invoice, simply print the invoice. The printable PDF file contains a link to the generated XML file.
This XML file is in PEPPOL format.
- PEPPOL¶
An international standard for sending structured electronic invoices using XML file. Documented at https://docs.peppol.eu/poacc/billing/3.0/
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¶
Automatic transmission to an access point is not yet implemented. Actually we expect legal requirements and standards to be published soon. It seems that Belgian government will use a national platform called Hermes: https://einvoice.belgium.be/en/article/hermes
Import PEPPOL invoice files.
The ecosio validator still reports issues.
How Lino builds PEPPOL files¶
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.
The following sections explain a few things that are good to know when
developing the vat/peppol-ubl.xml
template.
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.
The <cbc:CompanyID>
element contains
Address schemes¶
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. 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. But there are companies like insurances and some non-profit organizations who are not subject to VAT and hence have no VAT number. These companies have only a company 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¶
eInvoicing Documentation published by the European Commission:
Other sources:
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
Blog entries about e-Invoicing: