Allowed code for the tax category

Error FX-SCH-A-000966 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

A non-empty value in ram:CategoryCode is not included in the code list used by this rule. An empty value passes this test.

What the rule means

ram:CategoryCode assigns the tax information to a tax category. A non-empty code must come from the set of values allowed by the rule.

Please use an allowed code for the logistics service tax category

The stated tax category value is not listed as an allowed code. Use a value permitted by the associated code list.

What to do
  1. Find the relevant ram:CategoryCode in the tax information for the logistics service.
  2. Replace the non-empty disallowed value with a code included in the associated code list.
  3. Generate the invoice again and validate it again.
Technical details

The test accepts an empty ram:CategoryCode value or a value included in the code list identified by 24.

Where the rule applies

The rule applies to the value of ram:CategoryCode within the tax information for a logistics service.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedLogisticsServiceCharge/ram:AppliedTradeTax/ram:CategoryCode
Test expression (assert/@test)
string-length($codeValue24)=0 or document('FACTUR-X_EXTENDED_codedb.xml')/codedb/cl[@id=24]/enumeration[@value=$codeValue24]