Do not repeat the global ship-to party identifier

Error FX-SCH-A-000452 Factur-X

Element 'ram:GlobalID' 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:GlobalID occurs more than once in ram:ShipToTradeParty.

What the rule means

The rule prevents multiple occurrences of the global identifier element within the same ship-to party.

Please include the global ship-to party identifier no more than once

ram:GlobalID appears more than once in the ship-to party. Remove the repeated occurrence so that this element appears no more than once.

What to do
  1. Find ram:ShipToTradeParty in the XML.
  2. Check its ram:GlobalID elements and remove any duplicates.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:ShipToTradeParty>
  <ram:GlobalID>1</ram:GlobalID>
  <ram:GlobalID>2</ram:GlobalID>
</ram:ShipToTradeParty>
✓ Correct
<ram:ShipToTradeParty>
  <ram:GlobalID>1</ram:GlobalID>
</ram:ShipToTradeParty>
Technical details

The test limits the number of direct ram:GlobalID elements in ram:ShipToTradeParty to at most one.

Where the rule applies

The rule applies to ram:GlobalID within the ship-to party element ram:ShipToTradeParty.

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