Invalid document type code

Error FX-SCH-A-001136 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 in the permitted code list for this field. An empty value is permitted by the test condition.

What the rule means

ram:TypeCode identifies the type of the referenced document. A disallowed code does not reliably identify its type.

Please provide an allowed `ram:TypeCode`

The specified code for the referenced invoice document type is not allowed. You can adjust the code or leave the field empty.

What to do
  1. Locate ram:TypeCode for the referenced invoice document on the invoice line.
  2. Check the code against the code list permitted for this field.
  3. Generate the invoice again and validate it once more.
Technical details

The test accepts an empty value or a value included in the code list with ID 33.

Where the rule applies

The rule applies to ram:TypeCode of the referenced invoice document on an invoice line.

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