action.skip

Electronic Invoices

← Invoice Management

Understanding Electronic Invoices

When operating certain markets, your business may require to distribute electronic invoices – structured invoice data that is exchanged electronically between trading partners in order to automate accounts payable processing.

In particular, public institutions in the EU are required to accept and process electronic invoices. A set of common specifications and standards (Peppol) provides for interoperability between issuers and recipients across Europe.

E-Invoice Support in JustOn

To support enterprise and public e-invoicing, JustOn Billing & Invoice Management can prepare electronic invoices and credits. Currently, it supports the following formats:

Businesses can

  • send e-invoice XML files to the Peppol Network, from where the e-invoices will be distributed to their recipients, or
  • just create e-invoice XML files and send these documents to their recipients via an invoice submission portal or email.

Enabling E-Invoice Creation
Sending E-Invoices With Peppol
Creating E-Invoices

E-Invoice Distribution via Peppol

JustOn Billing & Invoice Management allows distributing electronic invoices via the Peppol Network. This is an infrastructure for exchanging electronic documents, where a set of common specifications and standards provides for interoperability between issuers and recipients across Europe.

Info

Prior to distributing e-invoices via Peppol, your organization must

  • Contract with JustOn for the Peppol service,
  • Request the technical activation via JustOn Support.

Once set up, JustOn Billing & Invoice Management creates legally valid XRechnung files and sends them to the Peppol Network. Peppol will transfer the e-invoices to the recipients and send notifications about the distribution status.

peppol
Distributing invoices through Peppol

E-Invoice Workflows

JustOn Billing & Invoice Management supports the following e-invoice scenarios:

(1) The user finalizes an invoice that meets the e-invoice preconditions and clicks Send E-Invoice.

(2) JustOn Billing & Invoice Management prepares the e-invoice XML file and validates it.

(3) On successful validation, JustOn Billing & Invoice Management saves the e-invoice XML file as an attachment to the invoice record and shows the Send dialog.

In case of validation failures, JustOn Billing & Invoice Management writes an error summary to the E-Invoice Error field and attaches a complete HTML error report to the invoice record.

(4) The user clicks Send. If necessary, the user can modify the recipient address (and scheme). JustOn Billing & Invoice Management transfers the e-invoice file to the Peppol Network for distribution (E-Invoice Provider Status is Queued).

xrechnung_workflow

(5) Peppol will transfer the e-invoices to the recipients and send notifications about the distribution status, which is stored in the E-Invoice Provider Status field on the invoice and related Peppol Notification records. Once the e-invoice is successfully sent to the recipient, the E-Invoice Provider Status will be Sent.

(1) The use selects the intended e-invoice format via the E-Invoice Format field on the invoice.

(2) The user invokes the e-invoice generation for an invoice, clicking Create E-Invoice.

(3) JustOn Billing & Invoice Management prepares the e-invoice XML file and validates it.

(4) On successful validation, JustOn Billing & Invoice Management saves the e-invoice XML file as an attachment to the invoice record.

In case of validation failures, JustOn Billing & Invoice Management writes an error summary to the E-Invoice Error field and attaches a complete HTML error report.

During creation, all previously attached e-invoice specific files with the prefix einvoice_ will be deleted.

xrechnung_workflow

(5) The user sends the produced e-invoice XML file to the recipient.

E-Invoice Implementation Details

JustOn Billing & Invoice Management acts as the "user interface" for managing e-invoices and controls the data management. However, significant parts of the business logic to produce e-invoices, including the validation, run on the Heroku-based platform.

To support the Peppol BIS Billing and the XRechnung formats and the distribution via the Peppol Network, JustOn Billing & Invoice Management adds a number of fields to the relevant objects Invoice and Invoice Line Item as well as to the custom settings Business Entity, Quantity Units and Tax Rules.

New fields on Invoice
Field Description
Buyer Reference A unique identification of the invoice recipient.
When doing business with German public authorities (B2G scenarios), the buyer reference must hold the Leitweg-ID (see ZFB | eRechnung).
E-Invoice Distribution Channel The distribution channel for the e-invoice.
Can be E-Mail or Peppol.
E-Invoice Error Holds details regarding errors during e-invoice generation.
E-Invoice Provider Status Tracks the lifecycle of the e-invoice with the distribution provider, see E-Invoice Provider Status.
E-Invoice Provider Messages Holds details regarding the status in the provider queue, a JSON string including timestamp and message set by the provider.
E-Invoice Recipient Address The recipient address for an issued electronic invoice.
Addresses are subject to the Electronic Address Scheme.
When using Peppol, only a limited set of address schemes is allowed.
E-Invoice Recipient Scheme Id The identifier that indicates the type of the used e-invoice recipient address.
E-Invoice Status Indicates the result of the e-invoice creation, see E-Invoice Status.
Purchase Order No. Reference to the purchase order on which the invoice is based (see Purchase-Related Information).
Is usually given by the buyer to track the purchase in their system; retrieved from a source record ( contract) and set on the invoice on invoice creation.
Seller ID An identifier of the seller (see Purchase-Related Information).
Is usually given by the buyer to track the vendor in their system; retrieved from a source record ( contract) and set on the invoice on invoice creation.
VAT Breakdown The serialized contents (JSON) of the tax breakdown table.
Is updated when invoice line items are modified.
New fields on Invoice Line Item
Field Description
Unit Code A code for the measurement unit applicable to the invoiced quantity, is copied from Code on the Quantity Units custom setting.
The code is expected to be one of the codes listed in UNECE Recommendation No. 20 "Codes for Units of Measure Used in International Trade" or UNECE Recommendation No 21 "Codes for Passengers, Types of Cargo, Packages and Packaging Materials", see UNECE Code List Recommendations.
VAT Category Code A code for categorizing VAT regulations, is copied from VAT Category Code on the Tax Rules custom setting.
The code is expected to be one of the codes listed in the code list 5305 of the United Trade Data Interchange Directory (UNTDID), see UNTDID 5305 Duty or tax or fee category code.
New Fields on Business Entity
Field Description
E-Invoice Format The target format for electronic invoices.
Currently, Peppol BIS Billing UBL and XRechnung UBL are supported.
E-Invoice Sender Address The return address for replies to an issued electronic invoice.
Addresses are subject to the Electronic Address Scheme.
When using Peppol, only a limited set of address schemes is allowed.
E-Invoice Sender Scheme Id The identifier that indicates the type of the used e-invoice sender address.
New field on Quantity Units
Field Description
Code A code for the measurement unit applicable to the invoiced quantity, is copied to Unit Code on the invoice line item.
The code is expected to be one of the codes listed in UNECE Recommendation No. 20 "Codes for Units of Measure Used in International Trade" or UNECE Recommendation No 21 "Codes for Passengers, Types of Cargo, Packages and Packaging Materials", see UNECE Code List Recommendations.
New field on Tax Rules
Field Description
VAT Category Code A code for categorizing VAT regulations, is copied to VAT Category Code on the invoice line item.
The code is expected to be one of the codes listed in the code list 5305 of the United Trade Data Interchange Directory (UNTDID), see UNTDID 5305 Duty or tax or fee category code.

E-Invoice Formats

JustOn Billing & Invoice Management supports the following e-invoice formats:

  • Peppol BIS Billing (with UBL syntax) for electronic invoicing across Europe
  • XRechnung (with UBL syntax) for electronic invoicing within Germany

JustOn Billing & Invoice Management determines the e-invoice format as follows:

  • If the field E-Invoice Format on the related business entity is set, the software uses the specified value.
  • Without an e-invoice format setting on the business entity, the software evaluates the fields Billing Country Code on the invoice and Country Code on the business entity. If the two fields specify DE, JustOn Billing & Invoice Management assumes that the business takes place in Germany, so it applies XRechnung UBL.
  • Otherwise, JustOn Billing & Invoice Management assumes that the business involves other countries, so it uses the value Peppol BIS Billing UBL.

Info

Users can, however, change the target e-invoice format when creating the e-invoice XML file.

E-Invoice Statuses

E-Invoice Status

The field E-Invoice Status on the invoice indicates the result of the e-invoice creation:

Status Description
Not created Indicates invoices that have not been processed to create an e-invoice file.
Created The e-invoice has been successfully created and validated. The e-invoice XML file is attached to the invoice record.
Created With Warnings The e-invoice has been successfully created, but the validation has produced warnings. The e-invoice XML file and the validation report are attached to the invoice record.
Validation Error The e-invoice validation has failed. The validation report is attached to the invoice record.
In Peppol Queue The e-invoice has been successfully transferred to the distribution provider.
Distribution Error Transferring the e-invoice to the distribtion provider has failed.

Info

Using the global settings option Ignore EInvoice Validation Warnings, JustOn Billing & Invoice Management will ignore validation warnings and set E-Invoice Status to Created, even if the validation has produced warnings. Consequently, no validation report will be attached to the invoice record.

E-Invoice Provider Status

The field E-Invoice Provider Status on the invoice tracks the lifecycle of the e-invoice with the distribution provider:

Status Description
Queued The e-invoice is ready to be sent to the recipient.
Sent The e-invoice has been sent to the recipient.
Validation Error The e-invoice validation has failed.
Conversion Error The e-invoice conversion (to a specific recipient format) has failed.
Send Error Sending the e-invoice to the recipient has failed.

E-Invoice Preconditions

Part of the business logic to produce e-invoices runs on the Heroku-based platform. So from a technical perspective, creating e-invoices requires the user to have access to the connected app JustOn Platform.

With respect to data, the following conditions must be met for JustOn Billing & Invoice Management to successfully create an e-invoice XML file. For details, see Preparing E-Invoice Source Data.

Invoice status

The invoice must be finalized before creating or sending an e-invoice. That is, its status must not be Draft, Pre-Draft, Pre-Open.

Business entity

The invoice must specify a business entity. To avoid typos, use the button Set Business Entity, see Setting Business Entity.

Buyer reference

In addition, the invoice must specify a buyer reference – a unique identification of the invoice recipient.

  • When doing business with German public authorities (B2G scenarios), the buyer reference must hold the Leitweg-ID (a unique identification of the invoice recipient, see ZFB | eRechnung).
  • In B2B scenarios, you need to agree on a buyer reference with your business partner.

Unit and unit code

The invoice line item must specify a unit defined using the custom setting Quantity Units.

The quantity unit must define a code for the measurement unit applicable to the quantity. The code is expected to be one of the codes listed in UNECE Recommendation No. 20 "Codes for Units of Measure Used in International Trade" or UNECE Recommendation No 21 "Codes for Passengers, Types of Cargo, Packages and Packaging Materials", see UNECE Code List Recommendations.

Typical unit codes include, for example:

Measurement Unit Unit Code
Piece C62
Hour HUR
Kilowatt Hour KWH
(Page) Impression IM
Persons IE

Tax rate

The invoice line item must specify a tax rate defined using the custom setting Tax Rules.

The tax rule must define the tax rate, the business entity and the VAT Category Code. This is a code for categorizing VAT regulations, which is necessary for e-invoices. The code is expected to be one of the codes listed in the code list 5305 of the United Trade Data Interchange Directory (UNTDID), see UNTDID 5305 Duty or tax or fee category code.

Typical VAT category codes for businesses in Europe include:

Name VAT Category Code
Standard rate S
Lower rate AA
Higher rate H
VAT reverse charge AE
Free export, no tax G
Zero rated goods Z
Services outside scope of tax O
Margin scheme (second-hand goods) F
Margin scheme (travel agents) D

Peppol Participant Address and Scheme

Participating in the Peppol Network (as both sender and recipient) requires participant organizations to have a unique e-invoice address, which is codified using a specific address scheme identifier. Generally, e-invoice addresses are subject to the Electronic Address Scheme ("EAS") defined by the European Union. When using Peppol, however, only a limited set of address schemes is allowed (see Electronic Address Scheme (EAS) in the Peppol documentation).

The e-invoice sender information must be specified in the relevant business entity's fields E-Invoice Sender Address and E-Invoice Sender Scheme Id. The e-invoice recipient information must be specified in the relevant invoice's fields E-Invoice Recipient Address and E-Invoice Recipient Scheme Id.

Example e-invoice address types include:

Electronic Address Scheme Example Value Corresponding Scheme ID
German VAT number DE123456789 9930
German Leitweg ID 04011000-1234512345-06 0204
French VAT number FR12345678901 9957
French SIREN code 732829320 0002
French SIRET code 732829320 00074 0009

Required Fields

Make sure, in addition, that the following fields are set:

Object Required Fields
Invoice Invoice No.
Date
Business Entity
Buyer Reference
Account Name
Billing City
Billing Postal Code
Billing Street
Billing Country Code
E-Invoice Recipient Address
E-Invoice Recipient Scheme Id
Invoice Line Item Sequence
Quantity
Unit
Unit Code
Unit Price
Tax Rate
Business Entity Company
Tax ID
City
Postal Code
Country Code
Phone
Email Sender
IBAN
E-Invoice Sender Address
E-Invoice Sender Scheme Id

The country code must be provided using the ALPHA-2 notation as specified in ISO-3166-1, see ISO 3166-1:Alpha2 Country codes in the Peppol documentation.