Skip to content

Latest commit

 

History

History
138 lines (94 loc) · 4.54 KB

README.md

File metadata and controls

138 lines (94 loc) · 4.54 KB

Validators

It is strongly recommended that you validate the invoices that you issue to make sure that your customers can process them.

Factur-X/ZUGFeRD

Online Validator

The following online validators are freely available:

Please create an issue if you want to add another freely available validator.

Offline Validation

Mustang project offers validation of Factur-X/ZUGFeRD and XRECHNUNG documents. You need a Java Runtime Environment for using it.

If you have Java installed, download the Mustang-CLI-*VERSION*.jar from their [release page](https://github.com/ZUGFeRD/mustangproject/releases) and save it as Mustang-CLI.jarin the directorycontrib/validators/factur-x`.

After that you can validate Factur-X/ZUGFeRD like this:

$ node contrib/validators/factur-x/factur-x-validate.mjs INVOICE_DOCUMENT

In case of an error, you will get a detailed error report which is unfortunately not very easy to understand.

You can pass PDF documents with embedded e-invoices and also bare XML files. The validator also supports documents following the German XRECHNUNG standard. Check the Mustangproject homepage for up-to-date information.

If you haven't installed the Java interpreter in your $PATH, you can set the environment variable $JAVA to the location of the Java executable. Likewise. you can point the environment variable $MUSTANG_CLI_JAR to the location of the Mustangproject Jar file if it cannot be found at contrib/factur-x/Mustang-CLI.jar.

UBL/CII/XRECHNUNG

Online Validation

Offline Validation

The German Koordinierungsstelle für IT-Standards - KoSIT maintains a free and open source validator for arbitrary e-invoice formats.

You need a Java Runtime Environment (version 11 or newer) and download at least two pieces of software, the actual validator and a so-called "validation scenario" with the schemas of the supported formats.

Install Validator

Download the file validator-*VERSION*-distribution.zip. It contains a file validationtool-*VERSION*-standalone.jar. Save it as validationtool.jar in the directory contrib/validators/kosit.

Please try out that you can run the validator executable with this command:

$ java -jar contrib/validators/kosit/validationtool.jar

It should display a help page with usage information.

Install XRECHNUNG Scenario

A "scenario" for XRECHNUNG is available at https://github.com/itplr-kosit/validator-configuration-xrechnung/releases.

Download the file validator-configuration-xrechnung_*VERSION*_*DATE*.zip and unpack it in the directory contrib/validators/kosit/xrechnung-scenario. This should now work:

$ ls contrib/validators/kosit/xrechnung-scenario/scenarios.xml

This scenario contains schemas for UBL, CII, and various versions of the German XRECHNUNG format.

Run the Validator

Now you can run the validator like this:

$ node contrib/validators/kosit/validate.mjs invoice.pdf

You will see the result of the validation on the console. Additionally, a file *INVOICE_DOCUMENT*-report.xml will be generated with a detailed validation report and a visualization of the invoice. Despite the filename extension .xml, the report is an HTML file and can be displayed in the browser.

You can pass multiple files on the commandline if you want to validate more than one document at once.

Alternatively, you can start the validator as a daemon:

$ node contrib/validators/kosit/validate.mjs --daemon

The option -D is an alias for --daemon.

You can now open a web interface at http://localhost:8080/ and upload invoices to be validated.

Alternatively, you can use curl:

$ curl POST -d @./invoice.xml http://localhost:8080/

For complete usage information of the validator, run this command:

$ node contrib/validators/kosit/validate.mjs --help

Note that the wrapper script always passes the mandatory arguments --scenarios and --repository.