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

Problem with Validation of X-Rechnung #368

Closed asdf00000 closed 2 months ago

asdf00000 commented 2 months ago

When there are no allowances per line-item, GrossPriceProductTradePrice should not be included into the xml.

If included, the Validators show the following error-messages:

Mustang-Validator Mustang-CLI-2.10.0:

ERROR org.mustangproject.validator.ZUGFeRDValidator - Error 27: Item net price MUST equal (Gross price - Allowance amount) when gross price is provided. [ID PEPPOL-EN16931-R046] from /xslt/XR_30/XRechnung-CII-validation.xslt)

KOSIT-Validator using validator-configuration-xrechnung_3.0.1_2023-09-22:

Item net price MUST equal (Gross price - Allowance amount) when gross price is provided.
--
Pfad: /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction[1]/ram:IncludedSupplyChainTradeLineItem[2]/ram:SpecifiedLineTradeAgreement[1]/ram:GrossPriceProductTradePrice[1]

I committed a suggestion to fix this.

jstaerk commented 2 months ago

I had hoped they would fix this nonsense https://github.com/itplr-kosit/validator-configuration-xrechnung/issues/84

jstaerk commented 2 months ago

but I merged your PR, thanks