Exactly one despatch advice identifier

Error FX-SCH-A-000450 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:DespatchAdviceReferencedDocument 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 despatch advice. Exactly one such element ensures that the despatch advice reference is stated unambiguously.

Please provide exactly one despatch advice identifier

The despatch advice 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:DespatchAdviceReferencedDocument 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:DespatchAdviceReferencedDocument/>
✓ Correct
<ram:DespatchAdviceReferencedDocument>
  <ram:IssuerAssignedID>DA-123</ram:IssuerAssignedID>
</ram:DespatchAdviceReferencedDocument>
Technical details

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

Where the rule applies

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

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