Address country identifier is missing or repeated

Error FX-SCH-A-000900 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

ram:CountryID does not occur exactly once in the ram:PostalTradeAddress of ram:SpecifiedLegalOrganization. The element is either missing or repeated.

What the rule means

The country identifier specifies the country of the postal address of the invoicer’s legal organization. Exactly one such element is required for the address to be structurally unambiguous.

Please include the organization address country identifier exactly once

The postal address of the invoicer’s legal organization does not contain ram:CountryID exactly once. You can adjust the address structure accordingly.

What to do
  1. Locate ram:PostalTradeAddress under the invoicer’s ram:SpecifiedLegalOrganization.
  2. Make sure it contains exactly one ram:CountryID.
  3. Generate the invoice again and validate it once more.
Technical details

The test counts the direct ram:CountryID elements in ram:SpecifiedLegalOrganization/ram:PostalTradeAddress and requires the count to be 1.

Where the rule applies

The rule applies to the postal address of the invoicer’s legal organization, within ram:SpecifiedLegalOrganization/ram:PostalTradeAddress.

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