ZUGFeRD / mustangproject

Open Source Java e-Invoicing library, validator and tool (Factur-X/ZUGFeRD, UNCEFACT/CII XRechnung)
http://www.mustangproject.org
Apache License 2.0
168 stars 99 forks source link

Check for DesignatedProductClassification ClassID not correct? #316

Open niphint opened 1 year ago

niphint commented 1 year ago

Hi,

the ClassID for DesignatedProductClassification is defined as BT-158 and that references to "UNTDID 7143 — Item type identification code" DesignatedProductClassification

We have used the Code "HS" => "Harmonised system" for our Invoice which is allowed to our sources. We use that for our "Zolltarifnummer", maybe there is a better field for that?

Example snippet:

`

6804 21 00 ` Mustang Error: `Value of 'ram:ClassCode' is not allowed. from /xslt/ZF_221/FACTUR-X_EXTENDED.xslt) ` Tested with various Mustang Versions, last one 2.7.0 Did we read the specification wrong or is this a validation error?
jstaerk commented 1 year ago

It's a validation error, but in the official schematron. I have upstreamed this six months ago (their issue 128) and coincidentially I talked with the schematron author on friday about it, I guess it will be fixed in the next ZUGFeRD/Factur-X version. Instead of against the attribut @listID it checks against the current element .. Which means you can workaround the error message with something like <ram:ClassCode listID="HS">HS</ram:ClassCode> but of course thats not the point of the check.