Invalid country code for the seller

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

CountryID contains a value that is not included in the applicable country code list. This check also accepts an empty value.

What the rule means

The country code identifies the country of the seller’s postal address. A value that is not permitted can impair identification of the country.

Please provide an allowed country code for the seller

The country code in the seller’s postal address is not included in the applicable code list. You can adjust the value using the applicable country code list.

What to do
  1. Check CountryID in the PostalTradeAddress of SellerTradeParty.
  2. Compare the entered value with the code list defined for it.
  3. Generate the invoice again and validate it once more.
Technical details

A non-empty value of CountryID is checked against the entries in code list 13 in FACTUR-X_BASIC_codedb.xml.

Where the rule applies

The rule applies to the seller’s postal address in SellerTradeParty, specifically to CountryID in PostalTradeAddress.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ ram:SellerTradeParty/ram:PostalTradeAddress/ram:CountryID
Test expression (assert/@test)
string-length($codeValue13)=0 or document('FACTUR-X_BASIC_codedb.xml')/codedb/cl[@id=13]/enumeration[@value=$codeValue13]