Exactly one CVD classification when item attribute cva is present

Error BR-DE-CVD-06-b XRechnung

If <name/> "Item attribute name" (BT-160) is specified with the value 'cva', exactly one <name/> "Item classification identifier" (BT-158) with the Scheme identifier 'CVD' shall be present in the same invoice line.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

When ram:ApplicableProductCharacteristic/ram:Description has the value cva, the same ram:SpecifiedTradeProduct does not contain exactly one ram:ClassCode with @listID = 'CVD'. The classification is either missing or present more than once.

What the rule means

The cva item attribute must be associated unambiguously with a CVD classification on the same invoice line. The rule requires exactly one such classification.

Affected fields BT-160 BT-158
Please assign exactly one CVD classification to item attribute `cva`

The item attribute cva is present on this invoice line, but its CVD classification is missing or occurs more than once. You can add or correct the classification in the same product.

What to do
  1. Check the ram:SpecifiedTradeProduct on the affected invoice line.
  2. Make sure it contains exactly one ram:ClassCode with listID="CVD".
  3. Check the details using ApplicableProductCharacteristic.Description and TradeLineItem.DesignatedProductClassifications.
  4. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:SpecifiedTradeProduct>
  <ram:ApplicableProductCharacteristic>
    <ram:Description>cva</ram:Description>
  </ram:ApplicableProductCharacteristic>
</ram:SpecifiedTradeProduct>
✓ Correct
<ram:SpecifiedTradeProduct>
  <ram:ApplicableProductCharacteristic>
    <ram:Description>cva</ram:Description>
  </ram:ApplicableProductCharacteristic>
  <ram:DesignatedProductClassification>
    <ram:ClassCode listID="CVD">...</ram:ClassCode>
  </ram:DesignatedProductClassification>
</ram:SpecifiedTradeProduct>
Check in FactoorSharp
  • ApplicableProductCharacteristic.Description (BT-160)
  • DesignatedProductClassificationClassCodes (Business term: BT-158-1)
  • TradeLineItem.DesignatedProductClassifications (BT-158)
Technical details

The test passes when no ram:Description has the value cva, or when the count of ram:ClassCode elements with @listID = 'CVD' is exactly one.

Where the rule applies

The rule applies within a ram:SpecifiedTradeProduct on an invoice line.

Original message from the Schematron
Wenn <name/> "Item attribute name" (BT-160) mit dem Wert 'cva' angegeben ist, muss in derselben Rechnungszeile genau ein <name/> "Item classification identifier" (BT-158) mit dem Scheme identifier 'CVD' vorhanden sein.
Context (rule/@context)
/rsm:CrossIndustryInvoice[$isCVD]/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:SpecifiedTradeProduct
Test expression (assert/@test)
not(ram:ApplicableProductCharacteristic/ram:Description = 'cva') or count(ram:DesignatedProductClassification/ram:ClassCode[@listID = 'CVD']) = 1