Invalid country value in ram:CountryID

Error FX-SCH-A-000809 Factur-X

Value of 'ram:CountryID' is not allowed.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

The non-empty value of ram:CountryID is not included in the country code list allowed for this element. An empty value also passes this specific check.

What the rule means

ram:CountryID identifies the country of the dispatch location address. A code that is not allowed does not identify the country according to the designated code list.

Please use an allowed country value for the dispatch location

The country value for the dispatch location is not recognized by the designated code list. You can correct the value using that list.

What to do
  1. Find ram:CountryID in the address under ram:ShipFromTradeParty.
  2. Compare the non-empty value with the countries allowed for ram:CountryID.
  3. Regenerate the invoice and validate it again.
Technical details

The test accepts either an empty value or a value included in the code list with ID 10.

Where the rule applies

The rule applies to ram:CountryID in the address of the dispatch location under ram:ShipFromTradeParty.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ ram:ShipFromTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ ram:CountryID
Test expression (assert/@test)
string-length($codeValue10)=0 or document('FACTUR-X_EXTENDED_codedb.xml')/codedb/cl[@id=10]/enumeration[@value=$codeValue10]