Use an allowed type code for the allowance tax

Error FX-SCH-A-000476 Factur-X

Value of 'ram:TypeCode' 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:TypeCode is not in the value list used by this rule. An empty value passes this specific test.

What the rule means

The type code identifies the kind of tax information. A code not in the list cannot be recognized as an allowed type using the specified value list.

Please use an allowed type code for the allowance tax

The value entered in ram:TypeCode is not among the values allowed by this rule. You can correct it using the applicable code list.

What to do
  1. Locate ram:TypeCode in the allowance’s ram:CategoryTradeTax.
  2. Compare its value with the code list allowed by this rule.
  3. Generate the invoice again and validate it again.
Technical details

The test permits an empty string; otherwise, the value must be present as an enumeration in codedb/cl[@id=13].

Where the rule applies

The rule checks the value of ram:TypeCode in the ram:CategoryTradeTax tax information of a document-level allowance.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator="false"]/ ram:CategoryTradeTax/ram:TypeCode
Test expression (assert/@test)
string-length($codeValue13)=0 or document('FACTUR-X_BASIC-WL_codedb.xml')/codedb/cl[@id=13]/enumeration[@value=$codeValue13]