Use an allowed tax category code

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

If ram:CategoryCode has a value, that value must occur in the code list allowed for tax categories. A value not in the list is not allowed; this test accepts an empty value.

What the rule means

The code assigns the VAT breakdown to a defined tax category. A code outside the specified code list cannot correspond to a category defined in that list.

Please use an allowed code for the tax category

The value entered in ram:CategoryCode is not included in the code list allowed for it. Replace it with a code from that list.

What to do
  1. Locate ram:CategoryCode in the relevant ram:ApplicableTradeTax.
  2. Compare its value with the codes allowed for tax categories.
  3. Replace any value not in the list with an allowed code.
  4. Generate the invoice again and validate it once more.
Technical details

The test accepts an empty string value or a value listed as an enumeration under cl[@id=24] in FACTUR-X_EXTENDED_codedb.xml.

Where the rule applies

The rule checks the value of ram:CategoryCode within the document-level VAT breakdown.

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