Exactly one country identifier for the country of origin

Error FX-SCH-A-000627 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:ID does not occur exactly once in ram:OriginTradeCountry. The element must be present there once.

What the rule means

ram:ID contains the country identifier for the product’s country of origin. Exactly one such element is required to identify the country of origin unambiguously.

Please provide exactly one country identifier for the country of origin

The product’s country of origin is missing ram:ID or contains it more than once. Providing exactly one ram:ID element makes the entry unambiguous.

What to do
  1. Locate ram:OriginTradeCountry on the product in the invoice line.
  2. Make sure it contains exactly one ram:ID element.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:OriginTradeCountry/>
✓ Correct
<ram:OriginTradeCountry>
  <ram:ID>DE</ram:ID>
</ram:OriginTradeCountry>
Technical details

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

Where the rule applies

The rule applies to ram:OriginTradeCountry on the product in an invoice line.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:SpecifiedTradeProduct/ram:OriginTradeCountry
Test expression (assert/@test)
count(ram:ID)=1