At most one seller VAT identifier

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

More than one ram:SpecifiedTaxRegistration element in SellerTradeParty contains a ram:ID with schemeID="VA". This variant may occur at most once.

What the rule means

In this rule, the VA designation identifies the seller tax registration variant for the VAT identifier. The rule prevents this variant from being provided more than once.

Please provide the seller VAT identifier no more than once

The seller details contain multiple tax registrations of the variant marked VA. This variant may appear only once.

What to do
  1. Find the ram:SpecifiedTaxRegistration elements in SellerTradeParty.
  2. Count the elements whose ram:ID has the schemeID="VA" attribute.
  3. Remove the duplicate VA variant so that it occurs no more than once.
  4. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:SellerTradeParty>
  <ram:SpecifiedTaxRegistration>
    <ram:ID schemeID="VA">VAT-1</ram:ID>
  </ram:SpecifiedTaxRegistration>
  <ram:SpecifiedTaxRegistration>
    <ram:ID schemeID="VA">VAT-2</ram:ID>
  </ram:SpecifiedTaxRegistration>
</ram:SellerTradeParty>
✓ Correct
<ram:SellerTradeParty>
  <ram:SpecifiedTaxRegistration>
    <ram:ID schemeID="VA">VAT-1</ram:ID>
  </ram:SpecifiedTaxRegistration>
</ram:SellerTradeParty>
Technical details

Only ram:SpecifiedTaxRegistration elements with a child ram:ID whose schemeID attribute is exactly VA are counted; the count must not exceed 1.

Where the rule applies

The rule applies to tax registrations in SellerTradeParty with ram:ID and the schemeID="VA" attribute.

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