Invalid VAT category code

Error FX-SCH-A-000508 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 value of ram:CategoryCode is neither empty nor included in the code list allowed for this element.

What the rule means

ram:CategoryCode assigns the tax amount in the VAT breakdown to a VAT category. An allowed code enables consistent classification of the tax information.

Please use an allowed VAT category code

The VAT breakdown contains a value in ram:CategoryCode that is not allowed. Using a value from the designated code list can resolve the issue.

What to do
  1. Locate ram:CategoryCode in the document-level VAT breakdown.
  2. Check the value against the designated code list.
  3. Use a value listed there or leave ram:CategoryCode empty.
  4. Generate the invoice again and validate it.
Technical details

The test accepts an empty code value or a value listed in FACTUR-X_BASIC_codedb.xml under code list ID 8.

Where the rule applies

The rule applies to ram:CategoryCode in the document-level VAT breakdown.

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