Allowed document type code for the advance payment

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

The value of ram:TypeCode is not included in the code list used for it. This test also permits an empty value.

What the rule means

The code identifies the type of the referenced document. A code that is not listed does not match the values defined for this field.

Please use an allowed document type code for the advance payment reference

The code in ram:TypeCode is not listed as an allowed value. Use a value included in the code list for this field.

What to do
  1. Find ram:TypeCode in the referenced invoice document.
  2. Replace the unlisted value with one included in the code list for this field.
  3. Generate the invoice again and validate it once more.
Technical details

The test permits an empty code value or a value listed as an enumeration in codedb under cl ID 53.

Where the rule applies

The rule applies to ram:TypeCode on the invoice document referenced under the specified advance payment.

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]