No more than two tax registrations with scheme FC

Error FX-SCH-A-000385 Factur-X

Element variant 'ram:SpecifiedTaxRegistration[ram:ID/@schemeID="FC"]' may occur at maximum 2 times.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

More than two ram:SpecifiedTaxRegistration elements occur in ram:ManufacturerTradeParty with a ram:ID whose schemeID attribute has the value FC.

What the rule means

The rule limits to two the number of the manufacturer’s tax registrations identified with scheme FC.

Please limit the manufacturer’s registrations with scheme `FC` to two

More than two tax registrations with scheme FC are included for a product’s manufacturer. You can correct the invoice by limiting the number of these entries to no more than two.

What to do
  1. Find the product manufacturer’s ram:SpecifiedTaxRegistration elements with ram:ID and schemeID="FC".
  2. Limit these entries to no more than two.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:ManufacturerTradeParty>
  <ram:SpecifiedTaxRegistration>
    <ram:ID schemeID="FC">1</ram:ID>
  </ram:SpecifiedTaxRegistration>
  <ram:SpecifiedTaxRegistration>
    <ram:ID schemeID="FC">2</ram:ID>
  </ram:SpecifiedTaxRegistration>
  <ram:SpecifiedTaxRegistration>
    <ram:ID schemeID="FC">3</ram:ID>
  </ram:SpecifiedTaxRegistration>
</ram:ManufacturerTradeParty>
✓ Correct
<ram:ManufacturerTradeParty>
  <ram:SpecifiedTaxRegistration>
    <ram:ID schemeID="FC">1</ram:ID>
  </ram:SpecifiedTaxRegistration>
  <ram:SpecifiedTaxRegistration>
    <ram:ID schemeID="FC">2</ram:ID>
  </ram:SpecifiedTaxRegistration>
</ram:ManufacturerTradeParty>
Technical details

Only direct ram:SpecifiedTaxRegistration elements whose ram:ID/@schemeID is exactly FC are counted; the test requires a count of no more than two.

Where the rule applies

The rule applies to the product’s manufacturer party, ram:ManufacturerTradeParty, within an invoice line.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:SpecifiedTradeProduct/ram:ManufacturerTradeParty
Test expression (assert/@test)
count(ram:SpecifiedTaxRegistration[ram:ID/@schemeID="FC"])<=2