Provide the seller VAT identifier no more than once

Error FX-SCH-A-000033 Factur-X

Element variant 'ram:SpecifiedTaxRegistration[ram:ID/@schemeID="VA"]' 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 seller details contain more than one ram:SpecifiedTaxRegistration whose child ram:ID is identified as a VAT identifier by schemeID="VA".

What the rule means

In this rule, the identifier VA denotes the VAT identifier; the seller details may contain no more than one such registration.

Please provide the seller’s VAT identifier no more than once

The VAT identifier marked with VA appears more than once in the seller details. You can resolve this by providing no more than one such tax registration.

What to do
  1. Check the ram:SpecifiedTaxRegistration elements in ram:SellerTradeParty.
  2. Find the entries whose ram:ID has the attribute schemeID="VA".
  3. Make sure that no more than one such entry is present.
  4. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:SellerTradeParty>
  <ram:SpecifiedTaxRegistration>
    <ram:ID schemeID="VA">A</ram:ID>
  </ram:SpecifiedTaxRegistration>
  <ram:SpecifiedTaxRegistration>
    <ram:ID schemeID="VA">B</ram:ID>
  </ram:SpecifiedTaxRegistration>
</ram:SellerTradeParty>
✓ Correct
<ram:SellerTradeParty>
  <ram:SpecifiedTaxRegistration>
    <ram:ID schemeID="VA">A</ram:ID>
  </ram:SpecifiedTaxRegistration>
</ram:SellerTradeParty>
Technical details

The check counts direct ram:SpecifiedTaxRegistration elements whose ram:ID has a schemeID attribute with the exact value VA; zero or one is allowed.

Where the rule applies

Within ram:SellerTradeParty, for ram:SpecifiedTaxRegistration whose ram:ID has the attribute schemeID="VA".

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ ram:SellerTradeParty
Test expression (assert/@test)
count(ram:SpecifiedTaxRegistration[ram:ID/@schemeID="VA"])<=1