Use an allowed country code

Error FX-SCH-A-001028 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 in ram:CountryID is not included in the associated code list. This check permits an empty value.

What the rule means

An allowed country code maps the delivery location to a value from the designated code list.

Please use an allowed country code for the delivery location

The value provided in ram:CountryID is not included in the designated code list. You can change the value or leave it empty.

What to do
  1. Locate ram:CountryID at the delivery location for the relevant invoice line.
  2. Replace its value with an entry from the designated code list, or leave its content empty.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:CountryID>INVALID</ram:CountryID>
✓ Correct
<ram:CountryID/>
Technical details

A non-empty value is compared with code list 10; an empty value also passes this value check.

Where the rule applies

The rule checks ram:CountryID for the relevant delivery location of an invoice line.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:SpecifiedLineTradeAgreement/ram:ApplicableTradeDeliveryTerms/ram:RelevantTradeLocation/ ram:CountryID
Test expression (assert/@test)
string-length($codeValue10)=0 or document('FACTUR-X_EXTENDED_codedb.xml')/codedb/cl[@id=10]/enumeration[@value=$codeValue10]