Use an allowed tax category code

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

The non-empty value of ram:CategoryCode is not present in the code list used by this rule. An empty value is also allowed by the test condition.

What the rule means

ram:CategoryCode identifies the tax category. A non-empty value must match the allowed code list so that the category is coded consistently.

Please use an allowed tax category code

The value entered for ram:CategoryCode is not recognized as an allowed code. You can use a code from the specified code list; the test condition also allows an empty value.

What to do
  1. Check the value of ram:CategoryCode in ram:AppliedTradeTax.
  2. Use a value allowed by the code list, or leave the value empty.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:AppliedTradeTax>
  <ram:CategoryCode>NOT-A-CODE</ram:CategoryCode>
</ram:AppliedTradeTax>
✓ Correct
<ram:AppliedTradeTax>
  <ram:CategoryCode/>
</ram:AppliedTradeTax>
Technical details

The Schematron test accepts an empty value or a value listed in code list 24 in FACTUR-X_EXTENDED_codedb.xml.

Where the rule applies

The rule applies to the value of ram:CategoryCode in ram:AppliedTradeTax for a document-level logistics service charge.

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]