Tax category code must be allowed

Error FX-SCH-A-001064 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 included in the code list used by this rule. The test condition also accepts an empty value.

What the rule means

The tax category code identifies the category of the tax information. A non-empty code must match an entry in the associated code list.

Please use an allowed tax category code

The supplied tax category code is not included in the code list allowed by this rule. This check also accepts an empty value.

What to do
  1. Check the value in ram:CategoryCode.
  2. Use an entry from the code list used by this rule, or leave the value empty.
  3. Generate the invoice again and validate it again.
What it looks like
✓ Correct
<ram:CategoryCode/>
Technical details

The check compares the text value of ram:CategoryCode with entries in the external code list identified as 24; a value of zero length is also accepted.

Where the rule applies

The rule checks ram:CategoryCode in the tax information for an invoice line’s net price.

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