Invalid tax type code

Error FX-SCH-A-000511 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 value of ram:TypeCode is neither empty nor included in the code list allowed for this element.

What the rule means

ram:TypeCode identifies the type of tax in the VAT breakdown. An allowed value enables standardized classification of this tax information.

Please use an allowed tax type code

The VAT breakdown contains a value in ram:TypeCode that is not allowed. Use a value from the designated code list or leave the element empty.

What to do
  1. Locate ram:TypeCode in the VAT breakdown.
  2. Check the value against the designated code list.
  3. Use a value listed there or leave ram:TypeCode empty.
  4. Generate the invoice again and validate it.
Technical details

The test accepts an empty code value or a value listed in FACTUR-X_BASIC_codedb.xml under code list ID 7.

Where the rule applies

The rule applies to ram:TypeCode in the document-level VAT breakdown.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:ApplicableTradeTax/ram:TypeCode
Test expression (assert/@test)
string-length($codeValue7)=0 or document('FACTUR-X_BASIC_codedb.xml')/codedb/cl[@id=7]/enumeration[@value=$codeValue7]