At most one seller VAT identifier marked VA per invoice line

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

Several SpecifiedTaxRegistration elements under ItemSellerTradeParty have an ID element whose schemeID is VA. This element may occur there at most once.

What the rule means

In this rule, the VA marker identifies a particular variant of the seller’s tax registration. The limit prevents this variant from being stated more than once for the same invoice line.

Please include the seller VAT identifier `VA` no more than once per invoice line

The seller information for an invoice line contains the VA tax registration more than once. You can resolve this by removing the duplicate entry.

What to do
  1. Find the SpecifiedTaxRegistration elements with ID/@schemeID="VA" in ItemSellerTradeParty.
  2. Keep no more than one of these elements.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:ItemSellerTradeParty>
  <ram:SpecifiedTaxRegistration>
    <ram:ID schemeID="VA">A</ram:ID>
  </ram:SpecifiedTaxRegistration>
  <ram:SpecifiedTaxRegistration>
    <ram:ID schemeID="VA">B</ram:ID>
  </ram:SpecifiedTaxRegistration>
</ram:ItemSellerTradeParty>
✓ Correct
<ram:ItemSellerTradeParty>
  <ram:SpecifiedTaxRegistration>
    <ram:ID schemeID="VA">A</ram:ID>
  </ram:SpecifiedTaxRegistration>
</ram:ItemSellerTradeParty>
Technical details

The XPath counts SpecifiedTaxRegistration elements under the current ItemSellerTradeParty with ID/@schemeID="VA" and requires the count to be no greater than one.

Where the rule applies

The rule applies to ItemSellerTradeParty within an invoice line agreement.

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