Use an allowed value for ram:CountryID

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

If ram:CountryID contains a value that is not in the permitted code list for country identifiers, the value is invalid. An empty value is accepted by this check.

What the rule means

A country identifier from the permitted code list provides a consistent and unambiguous way to specify the country in the address.

Please use an allowed country identifier for `ram:CountryID`

The value entered in ram:CountryID is not included in the permitted code list. You can resolve the issue by using a value listed there.

What to do
  1. Check the value in ram:CountryID against the permitted code list.
  2. Replace any value not listed there with a value from the list.
  3. Generate the invoice again and validate it.
Technical details

The test accepts an empty string value or a value present in the enumeration of the code list identified as 10.

Where the rule applies

The rule applies to the country identifier ram:CountryID in the postal address of the organization at the delivery recipient.

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]