Exactly one item attribute cva with a CVD classification

Error BR-DE-CVD-06-a XRechnung

If the Scheme identifier of <name/> "Item classification identifier" (BT-158) is specified with the value 'CVD', exactly one <name/> "Item attribute name" (BT-160) with the value 'cva' 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 a ram:ClassCode with @listID = 'CVD' is present, the same ram:SpecifiedTradeProduct does not contain exactly one ram:ApplicableProductCharacteristic whose ram:Description equals cva. The attribute is either missing or present more than once.

What the rule means

A CVD classification must be linked to exactly one cva item attribute on the same invoice line. This keeps the association between the classification and the attribute unambiguous.

Affected fields BT-158 BT-160
Please add exactly one item attribute `cva` for the CVD classification

The CVD classification is present on this invoice line, but the cva item attribute is missing or occurs more than once. You can add or correct the attribute 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:ApplicableProductCharacteristic with ram:Description equal to cva.
  3. Check the details using DesignatedProductClassificationClassCodes and ApplicableProductCharacteristic.Description.
  4. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:SpecifiedTradeProduct>
  <ram:DesignatedProductClassification>
    <ram:ClassCode listID="CVD">...</ram:ClassCode>
  </ram:DesignatedProductClassification>
</ram:SpecifiedTradeProduct>
✓ Correct
<ram:SpecifiedTradeProduct>
  <ram:DesignatedProductClassification>
    <ram:ClassCode listID="CVD">...</ram:ClassCode>
  </ram:DesignatedProductClassification>
  <ram:ApplicableProductCharacteristic>
    <ram:Description>cva</ram:Description>
  </ram:ApplicableProductCharacteristic>
</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:ClassCode has @listID = 'CVD', or when the count of ram:ApplicableProductCharacteristic elements with ram:Description = 'cva' is exactly one.

Where the rule applies

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

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