At most one identifier for the ultimate goods recipient

Error FX-SCH-A-000832 Factur-X

Element 'ram:ID' may occur at maximum 1 times.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

ram:UltimateShipToTradeParty contains ram:ID more than once. This element may occur there at most once; it may also be absent.

What the rule means

ram:ID contains an identifier for the ultimate goods recipient. Multiple identifiers in this element would make the information ambiguous.

Please provide the ultimate goods recipient’s identifier at most once

ram:ID appears more than once in ram:UltimateShipToTradeParty. Remove any extra occurrences; the element is not required.

What to do
  1. Find ram:ID within ram:UltimateShipToTradeParty.
  2. Remove any extra occurrences so that the element appears no more than once.
  3. Generate the invoice again and check it again.
What it looks like
✗ Triggers the message
<ram:UltimateShipToTradeParty>
  <ram:ID>A</ram:ID>
  <ram:ID>B</ram:ID>
</ram:UltimateShipToTradeParty>
✓ Correct
<ram:UltimateShipToTradeParty>
  <ram:ID>A</ram:ID>
</ram:UltimateShipToTradeParty>
Technical details

The check counts the direct ram:ID elements in ram:UltimateShipToTradeParty and allows at most one.

Where the rule applies

The rule applies to ram:ID within ram:UltimateShipToTradeParty.

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