Allowed country code for the payer

Error FX-SCH-A-000939 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 in the country code list used by this rule. An empty value is explicitly allowed by this check.

What the rule means

An allowed country code provides a standardized way to state the country in the payer’s address.

Please use an allowed country code for the payer

The value of ram:CountryID in the payer’s address is not in the allowed code list. Use a listed value or leave the element empty.

What to do
  1. Find ram:CountryID in the payer’s postal address.
  2. Check the value against the allowed country code list or leave ram:CountryID empty.
  3. Generate the invoice again and validate it.
Technical details

The check accepts an empty value or a value from code list 10 in FACTUR-X_EXTENDED_codedb.xml.

Where the rule applies

The rule applies to ram:CountryID in the payer’s postal address.

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