ZUGFeRD with conzept 16

Elektronische Rechnung

The German Electronic Invoicing Forum (FeRD) has set itself the task of preparing and coordinating electronic invoices from a technical, economic and legal perspective. A standardised format for electronic invoice exchange was created under the name ZUGFeRD.

Introduction

ZUGFeRD stands for “Zentraler User Guide des Forum elektronische Rechnung Deutschland” and, according to FeRD, is suitable for all business sectors and public administration. The format is based on global standards and European recommendations and is intended to supplement the existing EDI standards nationwide in future and enable the conversion of previous paper-based processes. This is an ambitious goal, as around 30 million invoices are still sent by post every year in Europe.

The format from a technical viewpoint

Technically speaking, the ZUGFeRD format is a PDF/A3-compliant document to which a standardized invoice in XML format is attached. The rule of one PDF = one invoice applies. The PDF document presents the visual representation of the invoice (like the paper form)- The XML document contains the machine-readable representation of the invoice. Although the PDF can have several attachment files, the invoice attachment must be ZUGFeRD-invoice.xml. The structure of the XML file is based on the rules of the Cross Industry Invoice (CII) standard developed by UN/CEFACT.

Profiles

When designing the format, it was taken into account that it can be used universally and for a wide range of different business areas. The format therefore defines three different profiles – which determine the scope of the XML document depending on the type of company:

  • BASICThis profile reduces the requirements for the transmission of
    structured data in order to be able to map the simplest invoices.
    to map the simplest invoices. It is sufficient for automatic electronic archiving
    , as well as for most applications of automated document
    document distribution (workflow). Automated invoice verification is not always
    possible because, depending on the business case, not all the
    necessary information is transmitted in computer-readable form.
  • COMFORTIn this profile, it is possible to transmit all data in a structured
    form is possible, which for the majority of invoices sent enables
    automated, system-supported invoice processing on the recipient side.
    processing on the recipient side.
  • EXTENDEDIn this profile, all data mapped in the ZUGFeRD data model is mapped in
    structured form or as a qualified text field. The
    selection of the data fields actually used depends on the
    business process. The profile therefore covers the cross-industry
    requirements for structured invoice data exchange as completely as possible
    completely.
Further information

The Onlineportal von FeRD provides detailed information for anyone who would like to learn more about the ZUGFeRD format. An info package is also available for download there, which contains sample files and very detailed documentation. For the validation of ZUGFeRD documents, the website eInvoice Validation.Portal should be mentioned here. After a one-off, free registration, PDF documents can be uploaded and validated.

Use with conzept 16

To ensure that ZUGFeRD-compliant PDF documents can also be created in conzept 16, we have extended the PDF API for the upcoming conzept 16 release. The following function CreateZUGFeRDInvoicePDF converts an existing document into a ZUGFeRD-compliant PDF.

sub CreateZUGFeRDInvoicePDF
(
  var aFileName    : alpha;  // Output PDF.
  var aInvoiceXML  : alpha;  // XML file ZUGFeRD-invoice.xml.
  var aOutFileName : alpha;  // Name for the ZUGFeRD document.
  aDescription     : alpha;  // Description of the attached invoice.
  aCompress        : logic;  // Compress attachment y/n.
)
  : int;

  local
  {
    tPdf           : handle;
    tResult        : int;
  }

{
  tPdf # PdfOpen(aFileName,_PdfOpenDefault,'',_PdfImportAll);

  if (tPdf > 0)
  {
    tResult # tPdf->PdfAttachFile(aInvoiceXML,
                _PdfAttachAssociateZUGFeRD,aDescription,aCompress);

    if (tResult = _ErrOK)
      tResult # tPdf->PdfClose(aOutFileName,_PdfModePdfZUGFeRDBasic);
    else
      tPdf->PdfClose('',_PdfModeCancel);
  }
  else
    tResult # tPdf;

  return(tResult);
}

The function accepts an existing PDF document and the XML document with the invoice data in the arguments aFileName and aInvoiceXML. It creates the ZUGFeRD PDF (aOutFileName) from this.

The code opens the source PDF with function PdfOpen(). The XML document is then embedded in the PDF with the new command PdfAttachFile(). The specification of _PdfAttachAssociateZUGFeRD is important here. Each attachment of a ZUGFeRD PDF must be inserted with this option.

The command can be given an optional description of the attachment and whether it should be compressed. Compression is not always recommended. Text documents can be compressed well, whereas already compressed files, such as ZIPs, tend to become larger when compressed.

ZFinally, the ZUGFeRD PDF is generated with PdfClose(). The invoice profile to be generated is also transferred here. In this case, a basic profile is generated.
Related articles:
Erstellen PDF A konformer Dokumente
PDF Verarbeitung in conzept 16

Klicken Sie hier, um die Nutzungsbedingungen für unseren Blog zu lesen.

Leave a Reply

Your email address will not be published. Required fields are marked *

Leave the field below empty!

Requests, questions or feedback are welcome:

Terms of use of the comment function in the blog

1. General information

Vectorsoft AG (‘Provider’) provides a public blog for Internet users (‘Users’) on the vectorsoft.de website. The public blog is intended for the exchange of information and ideas. Users who participate with contributions and comments undertake to comply with the blog terms of use and are responsible for the accuracy, appropriateness and freedom from legal infringements of their contributions. By using the comment function in our blog, you accept these terms of use.

2. Netiquette

We ask you to refrain from personal attacks and provocations based on other opinions. Please argue objectively and maintain a constructive discussion culture. Your comment should always be related to the topic in question in order to avoid digressions into other topics. Posting the same comment or several similar comments more than once is not permitted.

3. Prohibition of illegal content

By submitting your comment, you confirm that you are not violating any copyrights or other rights of third parties. Inciting, racist statements, instructions for criminal offences and their glorification, depictions of violence, pornographic content and statements that violate personal rights are prohibited.

4. No advertising

The use of the comment function is not permitted for commercial or party-political purposes. Advertising contributions of any kind will be deleted immediately.

5. Details of the name

When entering your name, pay attention to the principles mentioned above.

6. Source references

If you intend to publish quotes or contributions from third parties, please indicate the respective sources and explain how they relate to the blog post.

7. Violation of the terms of use

Posts that violate this policy will be deleted immediately. If you notice any violations yourself, please send us the link to the comment in question by e-mail to . We expressly point out that we will exclude individual users in the event of repeated or serious violations of these terms of use.

As of: Sept. 2024

Get your Trial Version now!

Test yeet free of charge

IHRE EVALUIERUNGSLIZENZ - JETZT ANFORDERN!

TESTEN SIE DIE CONZEPT 16 VOLLVERSION - UNVERBINDLICH und KOSTENFREI

Subscribe to our newsletter

[cleverreach_signup]
WordPress Cookie Notice by Real Cookie Banner