Provide an allowed vehicle category

Error BR-DE-CVD-04 XRechnung

An <name/> "Item classification identifier" (BT-158) with the Scheme identifier 'CVD' shall contain a value from the list of permitted vehicle categories.

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

When ram:ClassCode specifies the CVD scheme, its value is not an allowed vehicle category. The check applies only when @listID has the normalized value CVD.

What the rule means

With this scheme, the classification code identifies a vehicle category. A value outside the allowed list therefore cannot be recognized as a valid category.

Affected fields BT-158
Please provide an allowed category for the vehicle classification

The vehicle classification using the CVD scheme contains a value that is not in the list of allowed vehicle categories. You can correct the classification value using the permitted list.

What to do
  1. Check the value of ram:ClassCode in the product classification.
  2. If @listID has the value CVD, compare the code with the list of allowed vehicle categories.
  3. Check the mapping through DesignatedProductClassificationClassCodes.
  4. Regenerate the invoice and validate it again.
Check in FactoorSharp
  • DesignatedProductClassificationClassCodes (Business term: BT-158-1)
  • TradeLineItem.DesignatedProductClassifications (BT-158)
Technical details

The test accepts any value when @listID is not CVD; otherwise, the normalized text content of ram:ClassCode must be included in $CVD-VEHICLE-CATEGORY.

Where the rule applies

The rule applies to the ram:ClassCode of a product classification on an invoice line.

Original message from the Schematron
Ein <name/> "Item classification identifier" (BT-158) mit dem Scheme identifier 'CVD' muss einen Wert aus der Liste der zulässigen Fahrzeugkategorien enthalten.
Context (rule/@context)
/rsm:CrossIndustryInvoice[$isCVD]/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:SpecifiedTradeProduct/ram:DesignatedProductClassification/ram:ClassCode
Test expression (assert/@test)
not(normalize-space(@listID) = 'CVD') or normalize-space(.) = $CVD-VEHICLE-CATEGORY