At most one tax registration with code FC

Error FX-SCH-A-001042 Factur-X

Element variant 'ram:SpecifiedTaxRegistration[ram:ID/@schemeID="FC"]' 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

There is more than one ram:SpecifiedTaxRegistration whose ram:ID has the attribute schemeID="FC".

What the rule means

The rule limits tax registrations with code FC to at most one element in this seller-item context. The input does not specify a business meaning for code FC.

Please provide no more than one tax registration with code FC

Several tax registrations with schemeID="FC" are specified for the seller item. No more than one such registration is allowed here.

What to do
  1. Find the ram:SpecifiedTaxRegistration elements with ram:ID and schemeID="FC" in ram:ItemSellerTradeParty.
  2. Make sure no more than one of these elements is present.
  3. Regenerate the invoice and check it again.
What it looks like
✗ Triggers the message
<ram:ItemSellerTradeParty>
  <ram:SpecifiedTaxRegistration>
    <ram:ID schemeID="FC">ID-1</ram:ID>
  </ram:SpecifiedTaxRegistration>
  <ram:SpecifiedTaxRegistration>
    <ram:ID schemeID="FC">ID-2</ram:ID>
  </ram:SpecifiedTaxRegistration>
</ram:ItemSellerTradeParty>
✓ Correct
<ram:ItemSellerTradeParty>
  <ram:SpecifiedTaxRegistration>
    <ram:ID schemeID="FC">ID-1</ram:ID>
  </ram:SpecifiedTaxRegistration>
</ram:ItemSellerTradeParty>
Technical details

The rule counts ram:SpecifiedTaxRegistration elements whose child ram:ID has @schemeID="FC" and requires no more than one.

Where the rule applies

The rule applies to the tax registrations of ram:ItemSellerTradeParty within the agreement for an invoice line.

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