Allowed document type code

Error FX-SCH-A-000555 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 its designated code list.

What the rule means

ram:TypeCode identifies the type of document. A value absent from the list is not an allowed document type code for this field.

Please use an allowed code for the document type

The value in ram:TypeCode is not allowed as a document type code. You can replace it with a value from the code list or leave it empty.

What to do
  1. Check ram:TypeCode in rsm:ExchangedDocument.
  2. Use only a value from the code list applicable to this element, or leave the value empty.
  3. Generate the invoice again and validate it.
Technical details

The test accepts an empty value or a value present in the enumeration of code list ID 2 in FACTUR-X_EN16931_codedb.xml.

Where the rule applies

The rule applies to ram:TypeCode in rsm:ExchangedDocument.

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