Document type code not allowed

Error FX-SCH-A-000492 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 document-type code list used for this invoice. An empty code value is also permitted by the test.

What the rule means

ram:TypeCode identifies the type of document. An allowed code is needed to classify the document type unambiguously.

Please use an allowed document type code

The document type code provided was not recognized as an allowed value. An appropriate code identifies the intended type of document.

What to do
  1. Check the value of ram:TypeCode.
  2. Compare it with the permitted entries in the document-type code list.
  3. Recreate the invoice and validate it again.
Technical details

The test accepts an empty code value or a value found in code list ID 2 in FACTUR-X_BASIC_codedb.xml.

Where the rule applies

The rule applies to the value of ram:TypeCode in ram:ExchangedDocument.

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