Document identifier must occur exactly once

Error FX-SCH-A-000615 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:AdditionalReferencedDocument. The element is missing or appears more than once.

What the rule means

ram:IssuerAssignedID contains the identifier assigned to the referenced document by its issuer. Exactly one value allows that identifier to be stated unambiguously.

Please include the document identifier exactly once

The additional referenced document is missing its issuer-assigned identifier, or the identifier is entered more than once. You can correct the number of entries.

What to do
  1. Locate the relevant ram:AdditionalReferencedDocument.
  2. Make sure it contains exactly one ram:IssuerAssignedID.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:AdditionalReferencedDocument/>
✓ Correct
<ram:AdditionalReferencedDocument>
  <ram:IssuerAssignedID>x</ram:IssuerAssignedID>
</ram:AdditionalReferencedDocument>
Technical details

The XPath test checks whether exactly one direct ram:IssuerAssignedID element is present.

Where the rule applies

The rule applies to ram:AdditionalReferencedDocument in a line item's settlement information.

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