Provide exactly one buyer order reference

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

In ram:BuyerOrderReferencedDocument, ram:IssuerAssignedID does not occur exactly once. The element is either missing or present more than once.

What the rule means

ram:IssuerAssignedID contains the identifier assigned by the issuer to the referenced buyer order. The rule requires exactly one such element.

Please provide exactly one buyer order reference

The buyer order reference does not contain exactly one ram:IssuerAssignedID element. You can resolve this by having the element occur once in ram:BuyerOrderReferencedDocument.

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

The check tests whether the number of direct ram:IssuerAssignedID elements in ram:BuyerOrderReferencedDocument is one.

Where the rule applies

The rule applies to ram:BuyerOrderReferencedDocument in the agreement information between the seller and buyer.

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