Skip to content

Error

FX-SCH-A-000616: Each line reference needs one document type element

In short

Error: fails the selected checks.

FX-SCH-A-000616 means a line-level document reference contains either no ram:TypeCode element or more than one. Keep exactly one type code element for each reference. For an invoiced object reference (BT-128), use code 130.

On this page

What it means

Each ram:AdditionalReferencedDocument inside a line's ram:SpecifiedLineTradeSettlement must contain exactly one ram:TypeCode. The test checks only the element count, not the code's value or whether its text is empty. It applies to both the EN 16931 and Extended profiles of Factur-X and ZUGFeRD.

Why it matters

The type code identifies what kind of reference the block contains. Checking that there is one element is separate from checking that its value is appropriate.

How to fix it

Add a missing ram:TypeCode or remove duplicate elements in the affected reference block. Use 130 when the reference identifies the invoiced object (BT-128). Do not change other reference types to 130 merely to fix this count error. Remove unused reference blocks, generate the file again and recheck it.

Once the file is corrected, check it again for free: Validate a ZUGFeRD invoice

Or fix the invoice in a form and download the corrected file, for 1 credit: Fix a rejected e-invoice Beta

The rule as published

Element 'ram:TypeCode' must occur exactly 1 times.

Where this rule applies

Rule set Version
Factur-X 1.09 EN 16931 1.0.9-2
Factur-X 1.09 EXTENDED 1.0.9-2
ZUGFeRD 2.5 EN 16931 2.5.2
ZUGFeRD 2.5 EXTENDED 2.5.2
Rule text from phive-rules 4.6.4.

Check your file

Drop your e-invoice to see whether FX-SCH-A-000616 still fails, and which other rules do.

Updated 6 November 2026