InvoiceValidator.eu

CII-DT-033

fatalEN 16931syntax binding ruleCII

unitCode should not be present

Why it fails

'unitCode' is present somewhere this profile does not allow it. It is not forbidden outright: the rule permits it on BilledQuantity, and rejects it everywhere else — so what is wrong is where it appears, not that it appears at all.

How to fix it

Do not strip 'unitCode' from the whole document; that would delete it from the one place it belongs. Keep it on BilledQuantity, remove the other occurrences, and read the expression below for the exact condition the validator applies. Reported as an error.

What the validator checks

CII — context //ram:*[ends-with(name(), 'Quantity')]

not(@unitCode) or (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeDelivery/ram:BilledQuantity/@unitCode)

Related rules

Part of CII-DT — CII data types.

Check your own invoice against CII-DT-033

…or paste the XML instead

Nothing is stored, and the whole invoice is checked, not just this rule. A PDF only works if it is Factur-X / ZUGFeRD — a PDF with the invoice XML inside it.