XRechnung 2.4.0 · UBL

BR-DE-CVD-06-a

XRechnung 2.4.0 · UBL

fatalcountry

Original rule text

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

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

What this rule requires

For each invoice or credit note line in a CVD-type document, if the item classification identifier (BT-158) uses the scheme identifier 'CVD' (UBL: cac:CommodityClassification/cbc:ItemClassificationCode with @listID = 'CVD'), then the same item must contain exactly one item attribute name (BT-160) with the value 'cva' (UBL: cac:AdditionalItemProperty/cbc:Name = 'cva'). In CII syntax, a ram:DesignatedProductClassification/ram:ClassCode with @listID = 'CVD' requires exactly one ram:ApplicableProductCharacteristic with ram:Description = 'cva'. A line fails when it has such a CVD classification but the count of 'cva' item attributes is not exactly 1 (zero or more than one). Lines without a CVD item classification are not affected.

How to fix

Ensure that each line item containing a CVD item classification also contains exactly one item attribute named 'cva'. In UBL, set the count of cac:AdditionalItemProperty elements where cbc:Name = 'cva' to exactly 1; in CII, set the count of ram:ApplicableProductCharacteristic elements where ram:Description = 'cva' to exactly 1. In business terms, set "Item attribute name" (BT-160) to 'cva' exactly once for that line. If multiple such attributes exist, keep only one; if none exist, add one.

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