Invalid country code for the ship-from location

Error FX-SCH-A-000805 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 country code list used by this rule. An empty value is also accepted by this check.

What the rule means

A valid country code identifies the country of the ship-from location. A value not listed cannot be recognized as a country using the code list applied by this rule.

Please use a valid country code for the ship-from location

The value in ram:CountryID for the ship-from location is not recognized by the country code list in use. You can adjust the value to match that list.

What to do
  1. Locate ram:CountryID in the postal address of ram:ShipFromTradeParty.
  2. Compare its value with the country code list used by this rule.
  3. Correct the value if it is not included in the list.
  4. Regenerate the invoice and validate it again.
Technical details

The check accepts either an empty value (string-length($codeValue10)=0) or an entry in code list 10 of the Factur-X code database.

Where the rule applies

This rule applies to ram:CountryID in the postal address of the ship-from party (ram:ShipFromTradeParty) at document level.

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