Allowed document type code

Error FX-SCH-A-000863 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 in ram:TypeCode is neither empty nor included in the code list identified by 51. Therefore, the specified document type code is not allowed.

What the rule means

A document type code must conform to the designated code list so that the type of referenced document can be identified unambiguously. An empty value is also permitted.

Please use an allowed value for `ram:TypeCode`

The value in ram:TypeCode is not included in the designated code list. You can resolve this by entering an allowed value or leaving the element empty.

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

The test accepts an empty value or a value listed in the external code list FACTUR-X_EXTENDED_codedb.xml under list identifier 51.

Where the rule applies

The rule applies to ram:TypeCode in the referenced document of the settlement.

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