Add support for reference profile XRECHNUNG autodetection, PDF file creation, verification against official xsd#63
Open
andras63 wants to merge 6 commits into
Open
Add support for reference profile XRECHNUNG autodetection, PDF file creation, verification against official xsd#63andras63 wants to merge 6 commits into
andras63 wants to merge 6 commits into
Conversation
added 6 commits
December 26, 2025 10:01
Implement as new level, like all other existing Factur-x profiles For now leave xsd verification as is (against EN16931), as this is what it was verified against before (and should not fail against). We will update this to kosit provided XRechnung xsd later. Also introduce a XRECHNUNG_FILEVERSION global, where get_level will put the extracted xrechnung.xml file version. This is needed for PDF creation: The fx:Version meta data version must use the current valid version number of the XRechnung standard (See chapter 7.7 of the FNFE factur-x documentation).
Use the extracted xrechnung.xml file version for PDF metadata fx:Version as required by the standard. Note the xrechnung.xml MUST be current valid standard version, otherwise it will not be accepted by German receipients. So it is perfect source for the required metadata value.
PDF metadata by default is created from base_info extracted from XML. Add more invoice types to the detection list so that all supported XRechnung types are properly named in generated PDF Keywords.
German GoBD rules require mandatory 'alternative' afrelationship for ZUGFeRD / Factur-x PDFs. Enforce this at least for xrechnung profile, as this is used in Germany only by definition and therefore must follow this rules.
Fix help texts for for pdfgen.py and xmlcheck.py for the new xrechnung level args.
Validate XRechnung reference profile XML files against their official D16B xsd files as provide by kosit validator, modified (location) to fit the structure of this library.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The reference profile XRECHNUNG is part of the the official Factur-X / ZUGFeRD standard, but the the XML file is coordinated by the Koordinierungsstelle für IT-Standards (Kosit) (German coordination office for IT standards).
An English language summary of the XRechnung standard (in it's current version 3.0.2 on the date of creation of this repository) can be found here.
The official supporting software is hosted on github at https://github.com/itplr-kosit.
This request implements the complete support for XRECHNUNG handling as defined in both affected standards.
Note the the new XRechnung-CVD variants are not yet supported. Implentation details for these need to be clarified by both Ferd and Kosit first.