Exactly one country identifier for the seller address

Error FX-SCH-A-001048 Factur-X

Element 'ram:CountryID' 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

CountryID is missing from PostalTradeAddress or occurs more than once. Exactly one CountryID element is required.

What the rule means

CountryID identifies the country of the seller’s postal address. The rule requires exactly one country designation for this address.

Please provide exactly one country identifier for the seller address

The seller’s postal address is missing CountryID or contains it more than once. Providing exactly one country identifier resolves this issue.

What to do
  1. Find PostalTradeAddress under ItemSellerTradeParty.
  2. Make sure the address contains exactly one CountryID element.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:PostalTradeAddress/>
✓ Correct
<ram:PostalTradeAddress>
  <ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
Technical details

The XPath counts the CountryID elements in the current PostalTradeAddress and requires exactly one.

Where the rule applies

The rule applies to the seller’s PostalTradeAddress for an invoice line.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:SpecifiedLineTradeAgreement/ram:ItemSellerTradeParty/ram:PostalTradeAddress
Test expression (assert/@test)
count(ram:CountryID)=1