Allowed country code for the address

Error FX-SCH-A-000826 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 value of ram:CountryID is not included in the code list checked for this element. An empty value is not rejected by this test, but any value that is present must be allowed.

What the rule means

The country code assigns the address to a country. A code that is not allowed can prevent the country from being identified unambiguously.

Please use an allowed country code for the address

The value in ram:CountryID is not allowed for this address. You can correct it using the code list applicable to this field.

What to do
  1. Check the value of ram:CountryID in the address.
  2. Replace any value that is present with an entry from the code list allowed for this field.
  3. Generate the invoice again and check it again.
Technical details

An empty string passes the check; otherwise, the value of ram:CountryID must be present in the enumeration of code list 10.

Where the rule applies

The rule applies to ram:CountryID in the address of the legal organization under the goods recipient ram:ShipToTradeParty.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ ram:ShipToTradeParty/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]