At most one tax registration for the ship-from party

Error FX-SCH-A-000797 Factur-X

Element 'ram:SpecifiedTaxRegistration' 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

The ram:ShipFromTradeParty contains more than one ram:SpecifiedTaxRegistration. This element may occur no more than once in this context.

What the rule means

The ship-from party’s tax registration is represented as a single entry in this XML context. Multiple entries here are structurally not permitted.

Please use no more than one tax registration for the ship-from party

More than one tax registration is entered for the ship-from party. You can adjust the XML so that no more than one entry is present.

What to do
  1. Find the ram:SpecifiedTaxRegistration elements in ram:ShipFromTradeParty.
  2. Remove duplicate entries so that no more than one such element remains.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:ShipFromTradeParty>
  <ram:SpecifiedTaxRegistration/>
  <ram:SpecifiedTaxRegistration/>
</ram:ShipFromTradeParty>
✓ Correct
<ram:ShipFromTradeParty>
  <ram:SpecifiedTaxRegistration/>
</ram:ShipFromTradeParty>
Technical details

The check counts the direct ram:SpecifiedTaxRegistration elements in the ram:ShipFromTradeParty context and requires a count of no more than one.

Where the rule applies

The rule applies to ram:SpecifiedTaxRegistration within ram:ShipFromTradeParty in the invoice delivery information.

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