Tax type code must be allowed

Error FX-SCH-A-001066 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 included in the code list used by this rule. The test condition also accepts an empty value.

What the rule means

The tax type code identifies the type of tax for the tax information. A non-empty code must match an entry in the associated code list.

Please use an allowed tax type code

The supplied tax type code is not included in the code list allowed by this rule. This check also accepts an empty value.

What to do
  1. Check the value in ram:TypeCode.
  2. Use an entry from the code list used by this rule, or leave the value empty.
  3. Generate the invoice again and validate it again.
What it looks like
✓ Correct
<ram:TypeCode/>
Technical details

The check compares the text value of ram:TypeCode with entries in the external code list identified as 23; a value of zero length is also accepted.

Where the rule applies

The rule checks ram:TypeCode in the tax information for an invoice line’s net price.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:SpecifiedLineTradeAgreement/ram:NetPriceProductTradePrice/ram:IncludedTradeTax/ ram:TypeCode
Test expression (assert/@test)
string-length($codeValue23)=0 or document('FACTUR-X_EXTENDED_codedb.xml')/codedb/cl[@id=23]/enumeration[@value=$codeValue23]