Invalid document type code

Error FX-SCH-A-000647 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 in the referenced document is neither empty nor present in the designated code list.

What the rule means

The code identifies the type of referenced document. A value that is not permitted does not allow the document to be classified according to the rule.

Please use an allowed `ram:TypeCode` for the referenced document

The type code of the referenced document is not accepted. You can change the code or leave it empty.

What to do
  1. Find the additional referenced document with ram:TypeCode 916.
  2. Check the value of its ram:TypeCode.
  3. Use a value permitted by the code list or leave the element empty.
  4. Generate the invoice again and validate it again.
Technical details

The XPath test passes when the checked value is empty or is found in code list 38.

Where the rule applies

The rule applies to ram:TypeCode of an additional referenced document with ram:TypeCode 916 in the seller-buyer agreement.

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