Allowed value for the seller country identifier

Error FX-SCH-A-000036 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 neither empty nor present in the code list used by this rule.

What the rule means

ram:CountryID identifies the country of the seller’s address. Its value must be empty or match a value allowed by the code list.

Please use an allowed country identifier for the seller

The value of ram:CountryID in the seller address is not accepted. It can be empty or match a value allowed by the code list.

What to do
  1. Find ram:CountryID in the seller’s ram:PostalTradeAddress.
  2. Check the element value.
  3. Leave the value empty or use a value allowed by the code list.
  4. Generate the invoice again and validate it once more.
Good to know

An empty ram:CountryID value is also allowed by the test condition.

Technical details

The rule accepts an empty value or looks up the element value in the enumeration of code list 5.

Where the rule applies

The rule applies to the value of ram:CountryID in the seller’s postal address.

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