ZUGFeRD/ZUV

support ZUGFeRD-Extensions a.k.a. additional data

jstaerk opened this issue · 2 comments

Andreas Starke had already published a way how ZUGFeRD "extensions"/additional data can accomodate special needs of industry branches (http://4s4u.de/additional_data/), e.g. if you need to specify the mileage in a logistics your invoice can say "one washing machne, one dry cleaner" and the additional data can say that the delivery truck transported the washing machine 500km but the dry cleaner only 25 because it was picked up elsewhere. There is a python library and a command line tool to embed/extract this files, the idea is that the mustangproject library and command line tool can do that too and ZUV can validate this additional data.

How you can help:

  • There is a generic schema(sic! not schematron) file for ZUGFeRD extensions and the extensions might get custom, extension specific schema files. We need a way to check schema files in the first place. For schematron we used https://github.com/phax/ph-schematron but I don't know if that supports schema files, if not we need an according library, which can load from our resources (we deploy in a single jar file) preferrably via maven central or other maven repos.
  • Add that, add the schema file from Andreas' website to the resources, use the most recent, unreleased version of mustangproject
  • git pull mustangproject, "mvn clean package" have maven cache the local file as 1.6.1
    mvn install:install-file -Dfile=mustang-1.6.1-SNAPSHOT.jar -DgroupId=org.mustangproject.ZUGFeRD -DartifactId=mustang -Dversion=1.6.1 -Dpackaging=jar -DgeneratePom=true then in ZUV in

    org.mustangproject.ZUGFeRD
    switch version to
    1.6.1
    "mvn clean install" and "mvn eclipse:eclipse") to check if there are extensions and get the value with sth like mustangprojects'getAdditionalDataXML()
  • invent some section for the report additional to the existing and and probably BELOW , document that syntax, have the schema check run in case additional data is there, bundle it all together and send me a PR.

Andreas contributed a patch which was released with 0.8.0, if additional data is there it is checked and if it is not valid an error is thrown, unfortunately there is no notice that it's OK if there is no error