XRechnung 2.6.0 · UBL

BR-DE-CVD-06-b

XRechnung 2.6.0 · UBL

fatalcountry

Original rule text

[BR-DE-CVD-06-b] Wenn "Item attribute name" (BT-160) mit dem Wert 'cva' angegeben ist, muss in derselben Rechnungszeile genau ein "Item classification identifier" (BT-158) mit dem Scheme identifier 'CVD' vorhanden sein.

Stored validation assertion
not(cac:AdditionalItemProperty[cbc:Name = 'cva']) or count(cac:CommodityClassification/cbc:ItemClassificationCode[@listID = 'CVD']) = 1

What this rule requires

This fatal rule applies when an item has an "Item attribute name" (BT-160) equal to 'cva'. In that case, the same invoice line must contain exactly one "Item classification identifier" (BT-158) whose scheme identifier is 'CVD'. The document fails if the 'cva' property exists and the number of CVD classification identifiers is not exactly 1 (zero or more than one); if no 'cva' property exists, the rule passes.

How to fix

If the 'cva' item attribute is needed, ensure the item has exactly one cac:CommodityClassification/cbc:ItemClassificationCode with @listID = 'CVD' (UBL) or ram:DesignatedProductClassification/ram:ClassCode with @listID = 'CVD' (CII), and remove any duplicates. If the 'cva' property is not required, remove it from the item (the cac:AdditionalItemProperty with cbc:Name = 'cva' or the ram:ApplicableProductCharacteristic with ram:Description = 'cva').

Guidance on this rule. The original text above is authoritative.