Disallowed document type code

Error FX-SCH-A-001025 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 not empty and is not included in the code list identified by 18. An empty value passes this check.

What the rule means

The code identifies the type of the referenced document. The rule ensures that a supplied code belongs to the corresponding code list.

Please check the invoice line document type code

The document type code in ram:TypeCode is not included in the applicable code list. You can review and adjust the value based on this rule.

What to do
  1. Locate the affected invoice line ram:AdditionalReferencedDocument.
  2. Check whether the value of ram:TypeCode is included in the applicable code list.
  3. Generate the invoice again and validate it once more.
Technical details

The test accepts an empty value or a value present in FACTUR-X_EXTENDED_codedb.xml under code-list identifier 18.

Where the rule applies

The rule applies to ram:TypeCode of a ram:AdditionalReferencedDocument at invoice line level.

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