Issuer ID of the referenced advance payment

Error FX-SCH-A-000958 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 is missing from ram:InvoiceSpecifiedReferencedDocument or occurs more than once. It must occur exactly once.

What the rule means

The issuer-assigned ID identifies the referenced document. Without exactly one such value, the advance payment cannot be unambiguously linked to that document.

Please provide the issuer ID of the referenced document exactly once

The referenced document for the advance payment is missing its issuer ID, or the ID appears more than once. Providing it exactly once makes the reference unambiguous.

What to do
  1. Find the advance payment’s ram:InvoiceSpecifiedReferencedDocument.
  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:InvoiceSpecifiedReferencedDocument/>
✓ Correct
<ram:InvoiceSpecifiedReferencedDocument>
  <ram:IssuerAssignedID>ADV-001</ram:IssuerAssignedID>
</ram:InvoiceSpecifiedReferencedDocument>
Technical details

The test counts the direct ram:IssuerAssignedID elements in the context of ram:InvoiceSpecifiedReferencedDocument and requires the count to be 1.

Where the rule applies

The rule applies to the referenced invoice document of a specified advance payment.

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