Tax registration with exactly one ID

Error FX-SCH-A-000944 Factur-X

Element 'ram:ID' must occur exactly 1 times.

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

ram:SpecifiedTaxRegistration does not contain exactly one ram:ID element. The element is either missing or appears more than once.

What the rule means

The payer’s tax registration must be represented by exactly one ID entry.

Please provide exactly one tax ID for the payer

The payer’s tax registration is missing an ID or contains it more than once. Providing exactly one ram:ID element resolves this issue.

What to do
  1. Locate ram:SpecifiedTaxRegistration under ram:PayerTradeParty.
  2. Make sure it contains exactly one ram:ID element.
  3. Generate the invoice again and validate it again.
What it looks like
✗ Triggers the message
<ram:SpecifiedTaxRegistration/>
✓ Correct
<ram:SpecifiedTaxRegistration>
  <ram:ID/>
</ram:SpecifiedTaxRegistration>
Technical details

The test counts the direct ram:ID elements under ram:SpecifiedTaxRegistration and requires the count to be 1.

Where the rule applies

The rule applies to ram:SpecifiedTaxRegistration for the payer (ram:PayerTradeParty).

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:PayerTradeParty/ram:SpecifiedTaxRegistration
Test expression (assert/@test)
count(ram:ID)=1