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 public e-invoicing, JustOn Billing & Invoice Management can create electronic invoices and credits in the XRechnung format (UBL syntax). These documents are to be distributed to their recipients via email.

Creating E-Invoices
Enabling E-Invoice Creation

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 XRechnung format and, prospectively, 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.
Currently, only E-Mail is supported.
E-Invoice Error Holds details regarding errors during e-invoice generation.
E-Invoice Recipient Address The recipient address for an issued electronic invoice.
Can be an email address or a specific Electronic Address Scheme.
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, only XRechnung-UBL is supported.
E-Invoice Sender Address The return address for replies to an issued electronic invoice.
Can be an email address or a specific Electronic Address Scheme.
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 Workflow

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

(1) The user invokes the e-invoice generation for a draft or open invoice.

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

xrechnung_workflow

(3) On successful validation, JustOn Billing & Invoice Management saves the XRechnung 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.

When creating an e-invoice from a draft invoice, the produced XML file is prefixed with DRAFT_.

(4) The user sends the produced XRechnung XML file to the recipient.

E-Invoice Status

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

Status Description
Created The e-invoice has been successfully created and validated. The XRechnung 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 XRechnung 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.

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 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 XRechnung file:

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.

  • 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
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
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