Country in the seller’s address

Error FX-SCH-A-000779 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 must occur exactly once in PostalTradeAddress. The element is either missing or appears more than once.

What the rule means

CountryID identifies the country of the postal address of the seller’s legal organization. A single occurrence is required to associate the address with a country.

Please include the country in the seller’s address exactly once

The postal address of the seller’s legal organization is missing its country, or the country is included more than once. You can resolve this by providing a single CountryID element.

What to do
  1. Locate the postal address under SellerTradeParty and SpecifiedLegalOrganization.
  2. Ensure that it contains exactly one CountryID element.
  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 test checks whether the number of direct CountryID elements in PostalTradeAddress is exactly 1.

Where the rule applies

The rule applies to the postal address of the seller’s legal organization in SellerTradeParty.

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