Allowed reference type code

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

What the rule means

The code describes the type of reference. A non-empty value must belong to the designated code list so that the reference type can be interpreted unambiguously.

Please use an allowed reference type code

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

What to do
  1. Check the value of ram:ReferenceTypeCode 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 14.

Where the rule applies

The rule applies to ram:ReferenceTypeCode of an additional referenced document with ram:TypeCode 130 at document level.

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