Use an allowed tax category code for the allowance

Error FX-SCH-A-000475 Factur-X

Value of 'ram:CategoryCode' is not allowed.

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

The non-empty value of ram:CategoryCode is not in the value list used by this rule. An empty value passes this specific test.

What the rule means

The code assigns the tax information to an allowed tax category. A code not in the list cannot be classified using that value list.

Please use an allowed tax category code for the allowance

The value entered in ram:CategoryCode is not among the values allowed by this rule. You can correct it using the applicable code list.

What to do
  1. Locate ram:CategoryCode in the allowance’s ram:CategoryTradeTax.
  2. Compare its value with the code list allowed by this rule.
  3. Generate the invoice again and validate it again.
Technical details

The test permits an empty string; otherwise, the value must be present as an enumeration in codedb/cl[@id=14].

Where the rule applies

The rule checks the value of ram:CategoryCode in the ram:CategoryTradeTax tax information of a document-level allowance.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator="false"]/ ram:CategoryTradeTax/ram:CategoryCode
Test expression (assert/@test)
string-length($codeValue14)=0 or document('FACTUR-X_BASIC-WL_codedb.xml')/codedb/cl[@id=14]/enumeration[@value=$codeValue14]