Permitted tax category code

Error FX-SCH-A-000970 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 permitted by the tax category code list. The test also accepts an empty value.

What the rule means

ram:CategoryCode identifies the allowance’s tax category. A code that is not permitted cannot be assigned to this entry in accordance with the rule.

Please use a permitted code for the allowance tax category

The code provided for the allowance tax category is not permitted. A value from the designated code list or an empty value satisfies the test.

What to do
  1. Check the value of ram:CategoryCode in ram:CategoryTradeTax.
  2. Use a value from the tax category code list, or leave the value empty.
  3. Generate the invoice again and validate it.
Technical details

The test permits an empty value; otherwise, the value of ram:CategoryCode must be present in code list 24 in FACTUR-X_EXTENDED_codedb.xml.

Where the rule applies

The rule checks the value of ram:CategoryCode within ram:CategoryTradeTax for a document-level allowance identified in ram:SpecifiedTradeAllowanceCharge by ram:ChargeIndicator having the value false.

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($codeValue24)=0 or document('FACTUR-X_EXTENDED_codedb.xml')/codedb/cl[@id=24]/enumeration[@value=$codeValue24]