At most one buyer tax registration

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

SpecifiedTaxRegistration occurs more than once in BuyerTradeParty. This element may appear there no more than once.

What the rule means

The rule limits the buyer’s tax registration entries in this section to one.

Please use no more than one tax registration for the buyer

SpecifiedTaxRegistration appears more than once in the buyer section of the invoice. You can adjust the XML section so that this element appears there no more than once.

What to do
  1. Locate BuyerTradeParty in the invoice header.
  2. Check how many times SpecifiedTaxRegistration occurs inside it.
  3. Remove any occurrences beyond the first.
  4. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:BuyerTradeParty>
  <ram:SpecifiedTaxRegistration/>
  <ram:SpecifiedTaxRegistration/>
</ram:BuyerTradeParty>
✓ Correct
<ram:BuyerTradeParty>
  <ram:SpecifiedTaxRegistration/>
</ram:BuyerTradeParty>
Technical details

Within BuyerTradeParty, the number of direct SpecifiedTaxRegistration elements is counted and checked against a maximum of one.

Where the rule applies

The rule applies within the buyer section BuyerTradeParty in the invoice header.

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