Exactly one tax identifier required

Error FX-SCH-A-001121 Factur-X

Element 'ram:ID' 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:ID does not occur exactly once in ram:SpecifiedTaxRegistration. The element is either missing or appears more than once.

What the rule means

ram:ID contains the tax identifier provided in this tax registration context. Exactly one element is required to make this information unambiguous.

Please provide exactly one tax identifier for the ultimate ship-to party

The ultimate ship-to party’s tax registration is missing ram:ID or contains it more than once. Exactly one element makes the information unambiguous.

What to do
  1. Check ram:SpecifiedTaxRegistration for the ultimate ship-to party.
  2. Ensure that it contains exactly one ram:ID element.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:SpecifiedTaxRegistration/>
✓ Correct
<ram:SpecifiedTaxRegistration>
  <ram:ID>...</ram:ID>
</ram:SpecifiedTaxRegistration>
Technical details

The test requires the number of direct ram:ID elements in ram:SpecifiedTaxRegistration to equal 1.

Where the rule applies

The rule applies to ram:SpecifiedTaxRegistration of the ultimate ship-to party for an invoice line.

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