Allowed referenced document type code

Error FX-SCH-A-000961 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

A non-empty value of ram:TypeCode is not included in the code list defined for the document type. This check accepts an empty value.

What the rule means

The code identifies the type of the referenced document. An unsupported value does not classify the reference as a designated document type.

Please use an allowed referenced document type code

The value of ram:TypeCode for the referenced document is not allowed. You can identify the document type using a value from the designated code list.

What to do
  1. Check ram:TypeCode in the referenced document entry for the advance payment.
  2. Use a value from the code list defined for this field, or leave the element empty.
  3. Generate the invoice again and validate it once more.
Technical details

An empty value passes the check; otherwise, the value must occur in the code list identified by 53.

Where the rule applies

The rule applies to ram:TypeCode of the referenced document within an advance payment in the invoice settlement.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedAdvancePayment/ram:InvoiceSpecifiedReferencedDocument/ram:TypeCode
Test expression (assert/@test)
string-length($codeValue53)=0 or document('FACTUR-X_EXTENDED_codedb.xml')/codedb/cl[@id=53]/enumeration[@value=$codeValue53]