Reference type code not allowed

Error FX-SCH-A-000617 Factur-X

Value of 'ram:ReferenceTypeCode' 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:ReferenceTypeCode is neither empty nor included in the applicable code list.

What the rule means

ram:ReferenceTypeCode identifies the type of reference to the additional referenced document. A code that is not allowed does not conform to the applicable value list.

Please use an allowed reference type code

The additional document's reference type has a value that is not in the applicable code list. You can replace it with an allowed code.

What to do
  1. Locate ram:ReferenceTypeCode in the relevant ram:AdditionalReferencedDocument.
  2. Check its value and use only a code from the allowed code list.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:ReferenceTypeCode>INVALID</ram:ReferenceTypeCode>
✓ Correct
<ram:ReferenceTypeCode/>
Technical details

The XPath test accepts an empty value or a value included in code list 14.

Where the rule applies

The rule applies to ram:ReferenceTypeCode in ram:AdditionalReferencedDocument in a line item's settlement information.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:SpecifiedLineTradeSettlement/ram:AdditionalReferencedDocument/ram:ReferenceTypeCode
Test expression (assert/@test)
string-length($codeValue14)=0 or document('FACTUR-X_EN16931_codedb.xml')/codedb/cl[@id=14]/enumeration[@value=$codeValue14]