At most one buyer agent tax registration

Error FX-SCH-A-000652 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 in ram:BuyerAgentTradeParty. This element may occur there at most once.

What the rule means

The limit prevents multiple tax registrations for the same buyer agent in this XML context.

Please include no more than one tax registration for the buyer agent

ram:SpecifiedTaxRegistration is listed more than once for the buyer agent. You can fix this by limiting it to no more than one entry.

What to do
  1. Remove any extra ram:SpecifiedTaxRegistration elements from ram:BuyerAgentTradeParty.
  2. Leave no more than one ram:SpecifiedTaxRegistration element.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:BuyerAgentTradeParty>
  <ram:SpecifiedTaxRegistration/>
  <ram:SpecifiedTaxRegistration/>
</ram:BuyerAgentTradeParty>
✓ Correct
<ram:BuyerAgentTradeParty>
  <ram:SpecifiedTaxRegistration/>
</ram:BuyerAgentTradeParty>
Technical details

Within ram:BuyerAgentTradeParty, the number of direct ram:SpecifiedTaxRegistration elements is counted; zero or one is allowed.

Where the rule applies

The rule applies to ram:SpecifiedTaxRegistration within the buyer agent ram:BuyerAgentTradeParty in the document-level agreement.

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