One of the XML invoice formats is the german ZUGFeRD specification. This requires a valid XML file, that must be embedded in a PDF/A-3 file. So you need to build up a PDF/A-3b invoice file and combine it with an XML file created with the XML+ module.
In order to build up a valid XML file it is recommended to first import a valid ZUGFeRD XML, and then change the contents by ‘mapping’ data from the spooled file into the file.
Remember to validate the resulting XML file.
On this site you can download sample files and a complete description of the ZUGFeRD standard:
http://www.ferd-net.de/front_content.php?idart=940
You can check if an XML file meets the requirement of the ZUGFeRD standard with a setup similar to this:
Change XML definition XML300D
XML definition name . . : ZUGFERD1 Description . . . . . . : Demo_ZUGFERD
XSD validation file . . . /APF3812Home/xml/xsd/ZUGFeRD1p0.xsd
XSLT validation file . . . /apf3812home/xml/schema/ZUGFeRD_1p0.xsl
Xpath error expression . boolean(//*:text)
Note: Enter *EHF as XSD validation file to validate document according to no.difi.vefa validator-core 2.0.2.
F3=Exit F12=Cancel F13=Select spooled file
|
It is your responsibility to find the needed files to validate according to the latest specifications. ZUGFeRD delivers normally an xsd file and an ISO schematron file for validation (e.g. ZUGFeRD_1p0.scmt). This file can be converted into an xsl file. The result of the transform via the xslt file is validated via an Xpath boolean expression. In this case the Xpath expression tests if there are any nodes named ‘text’ - if so the validation fails.
You can also do online validation of ZUGFeRD invoice PDF files on this site:
https://www.din-zugferd-validation.org
If you use an email finish definition to create the output PDF file, then you can here refer to the ZUGFeRD definition in option 16. ZUGFeRD definition name.
You can also create a ZUGFeRD PDF invoice via the PDF file naming definition.
ZUGFeRD invoices can also be created with the APF3812/MRGSPLFPDF command:
The ZUGFeRD XML+ finishing definition is referred to in the ZUGFERDDEF field.
APF3812/MRGSPLFPDF KARTSET(FILESET) KLICHE(INVOICE) FILNVN(SPLFNAME)
JOB(JOBNBR/JOB_USER/JOBNAME) SPLNBR(SPLFNBR) UNICODEOUT(*PDFA)ZUGFERDDEF(ZUGFERD) TOSTMF('/apf3812home/work/ZUGFERD_INVOICE.PDF') REPLACE(*YES)
You can e.g. build the command into a program, based on the demo sources FUNKT_8 or FUNKT_8_2. Just remember to place the source and program object outside the APF3812 library. This program can then be called via function 8=Call program in Auto Forms Control.