Method AbstractEinvoice():toXRechnung() Professional

Creates an XRechnung XML document.

Syntax
:toXRechnung() --> cXml
Return

A string with the XRechnung 3.0 XML document.

Description

Serializes the invoice into an XRechnung 3.0 document in CII syntax. XRechnung is the standard format for electronic invoices in Germany for both B2G and B2B transactions.

Before the document is created, the method calls :validate() and performs the checks which are specific to XRechnung. These comprise the rules of the German CIUS (BR-DE-*) and the PEPPOL rules adopted by XRechnung 3.0. If any errors remain, a runtime error is raised which lists all errors. Therefore, :validate() should be called first to determine whether the invoice can be serialized.

The warnings found during the checks can be retrieved via :getLastWarnings().

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.