Use an allowed value for the tax category

Error FX-SCH-A-000179 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. This test allows an empty value.

What the rule means

ram:CategoryCode identifies the tax category of the entry. A non-empty value must come from the code list specified for this element.

Please use an allowed value for `ram:CategoryCode`

The value entered in ram:CategoryCode is not included in the code list used for this element. You can correct it using an allowed entry from that code list.

What to do
  1. Find ram:CategoryCode in the relevant ram:ApplicableTradeTax.
  2. Compare its value with the allowed entries in the corresponding code list.
  3. Regenerate the invoice and check it again.
Technical details

The test allows an empty value; otherwise, the value must occur as an enumeration in the code list with ID 14.

Where the rule applies

The rule checks the value of ram:CategoryCode within ram:ApplicableTradeTax 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($codeValue14)=0 or document('FACTUR-X_BASIC-WL_codedb.xml')/codedb/cl[@id=14]/enumeration[@value=$codeValue14]