At most one ram:SpecifiedTaxRegistration in ram:PayerTradeParty

Error FX-SCH-A-000931 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

ram:SpecifiedTaxRegistration occurs more than once within ram:PayerTradeParty. The element may occur no more than once.

What the rule means

The payer’s tax registration is provided no more than once in this XML context.

Please include the payer’s tax registration no more than once

ram:SpecifiedTaxRegistration appears more than once in ram:PayerTradeParty. You can adjust the XML so that the element occurs no more than once.

What to do
  1. Find ram:PayerTradeParty in the invoice.
  2. Check whether it contains more than one ram:SpecifiedTaxRegistration element.
  3. Remove any extra ram:SpecifiedTaxRegistration elements, or omit the element if no tax registration is provided.
  4. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:PayerTradeParty>
  <ram:SpecifiedTaxRegistration/>
  <ram:SpecifiedTaxRegistration/>
</ram:PayerTradeParty>
✓ Correct
<ram:PayerTradeParty>
  <ram:SpecifiedTaxRegistration/>
</ram:PayerTradeParty>
Technical details

The rule counts direct ram:SpecifiedTaxRegistration elements under ram:PayerTradeParty and permits zero or one occurrence.

Where the rule applies

The rule applies to the tax registration within document-level ram:PayerTradeParty.

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