Use an allowed tax category code for the charge

Error FX-SCH-A-000482 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 of ram:CategoryCode does not appear in the code list used by this rule. The XPath expression also permits an empty value.

What the rule means

The tax category code identifies the charge’s tax category. A non-empty code must come from the specified code list so that the category can be identified unambiguously.

Please use an allowed tax category code for the charge

The value in the charge’s ram:CategoryCode is not in the corresponding code list. The rule also permits an empty value.

What to do
  1. Find ram:CategoryCode within the charge’s tax information.
  2. Check whether the non-empty value is included in the code list specified for this rule.
  3. Generate the invoice again and validate it once more.
Technical details

The test permits an empty $codeValue14; otherwise, the value must occur as @value in codedb/cl[@id=14]/enumeration.

Where the rule applies

The rule checks ram:CategoryCode in ram:CategoryTradeTax for a document-level charge in the settlement.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator="true"]/ ram:CategoryTradeTax/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]