Allowed document type code

Error FX-SCH-A-000559 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 empty and is not one of the codes allowed for this element.

What the rule means

ram:TypeCode specifies the kind of additional referenced document. A non-empty value must belong to the designated code list.

Please use an allowed document type code

The value in ram:TypeCode is not included in the allowed code list. You can identify the document type using a code from that list.

What to do
  1. Check the value of ram:TypeCode in the relevant ram:AdditionalReferencedDocument.
  2. Replace any disallowed value with a code from the designated code list.
  3. Regenerate the invoice and validate it again.
Technical details

The test accepts either an empty value or a value listed in code list 23.

Where the rule applies

The rule applies to ram:TypeCode of an additional referenced document at document level selected by type code 130.

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