Use an allowed tax type code

Error FX-SCH-A-000592 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 not included in the code list assigned to this element. This test also accepts an empty value.

What the rule means

ram:TypeCode identifies the tax type code for the associated tax details. A value that is not listed does not match a designation defined for this field.

Please use a valid tax type code

The value in ram:TypeCode is not recognized as an allowed tax type code. You can correct it using the code list that applies to this field.

What to do
  1. Find ram:TypeCode within ram:ApplicableTradeTax.
  2. Compare its value with the code list that applies to this field.
  3. Replace any unlisted value with an allowed value.
  4. Generate the invoice again and validate it.
Technical details

The test accepts an empty value or a value listed in code list 9; a non-empty value that is not listed fails.

Where the rule applies

This rule applies to ram:TypeCode within ram:ApplicableTradeTax in the document-level tax details.

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