Exactly one CountryID for the seller’s address

Error FX-SCH-A-000035 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. The element must be present exactly once.

What the rule means

The seller’s postal address must contain exactly one CountryID element so that the country is structurally provided in the address.

Please provide exactly one country in the seller’s address

The seller’s postal address is missing CountryID or contains it more than once. The number of entries can be changed to exactly one.

What to do
  1. Open PostalTradeAddress in the seller’s details.
  2. Ensure that CountryID occurs exactly once within it.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:PostalTradeAddress/>
✓ Correct
<ram:PostalTradeAddress>
  <ram:CountryID>DE</ram:CountryID>
</ram:PostalTradeAddress>
Technical details

The check counts the direct CountryID elements within PostalTradeAddress; exactly one is required.

Where the rule applies

The rule applies to the seller’s postal address in PostalTradeAddress.

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