Provide exactly one document identifier

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

ram:IssuerAssignedID does not occur exactly once in ram:InvoiceReferencedDocument. The element is either missing or occurs more than once.

What the rule means

ram:IssuerAssignedID contains the identifier assigned by the issuer to the referenced document. Exactly one occurrence keeps this identifier unambiguous.

Please provide the referenced document identifier exactly once

ram:IssuerAssignedID is missing from the referenced document or occurs more than once. The invoice can be corrected by having this element occur exactly once.

What to do
  1. Check ram:InvoiceReferencedDocument.
  2. Ensure that it contains exactly one ram:IssuerAssignedID.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:InvoiceReferencedDocument>
  <ram:IssuerAssignedID>INV-1</ram:IssuerAssignedID>
  <ram:IssuerAssignedID>INV-2</ram:IssuerAssignedID>
</ram:InvoiceReferencedDocument>
✓ Correct
<ram:InvoiceReferencedDocument>
  <ram:IssuerAssignedID>INV-1</ram:IssuerAssignedID>
</ram:InvoiceReferencedDocument>
Technical details

The test counts direct ram:IssuerAssignedID elements in the context of ram:InvoiceReferencedDocument and requires exactly one.

Where the rule applies

Applies to ram:IssuerAssignedID in the referenced document ram:InvoiceReferencedDocument.

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