Exactly one delivery note identifier

Error FX-SCH-A-000787 Factur-X

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

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

The ram:DeliveryNoteReferencedDocument document does not contain exactly one ram:IssuerAssignedID element. The element is either missing or occurs more than once.

What the rule means

The ram:IssuerAssignedID element contains the identifier assigned by the issuer to the referenced delivery note. Exactly one such element ensures that the delivery note reference is stated unambiguously.

Please provide exactly one delivery note identifier

The delivery note reference is missing the identifier assigned by the issuer, or that identifier appears more than once. You can resolve this by providing exactly one ram:IssuerAssignedID.

What to do
  1. Find ram:DeliveryNoteReferencedDocument in the delivery section.
  2. Make sure it contains exactly one ram:IssuerAssignedID.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:DeliveryNoteReferencedDocument/>
✓ Correct
<ram:DeliveryNoteReferencedDocument>
  <ram:IssuerAssignedID>DN-123</ram:IssuerAssignedID>
</ram:DeliveryNoteReferencedDocument>
Technical details

The test counts the direct ram:IssuerAssignedID child elements of ram:DeliveryNoteReferencedDocument and requires the count to equal 1.

Where the rule applies

The rule applies to the ram:DeliveryNoteReferencedDocument document in the invoice’s delivery section.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ ram:DeliveryNoteReferencedDocument
Test expression (assert/@test)
count(ram:IssuerAssignedID)=1