Provide no more than one ram:ID for ram:UltimateShipToTradeParty

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:ID occurs more than once in ram:UltimateShipToTradeParty. This element may occur no more than once there.

What the rule means

The rule limits the number of identifiers for the ultimate delivery recipient to one.

Please provide no more than one identifier for the ultimate delivery recipient

ram:ID appears more than once in ram:UltimateShipToTradeParty. Keeping no more than one such element will resolve the issue.

What to do
  1. Find all ram:ID elements in ram:UltimateShipToTradeParty.
  2. Keep no more than one ram:ID element there.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:UltimateShipToTradeParty>
  <ram:ID>123</ram:ID>
  <ram:ID>456</ram:ID>
</ram:UltimateShipToTradeParty>
✓ Correct
<ram:UltimateShipToTradeParty>
  <ram:ID>123</ram:ID>
</ram:UltimateShipToTradeParty>
Technical details

Within ram:UltimateShipToTradeParty, the count of direct ram:ID elements is checked; zero or one is allowed.

Where the rule applies

The rule applies to the identifier of the ultimate delivery recipient in ram:UltimateShipToTradeParty.

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