Allowed country code

Error FX-SCH-A-000648 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 empty and is not included in the code list used by this rule. An empty value explicitly satisfies this rule’s test.

What the rule means

An allowed country code enables the country of the relevant delivery location to be identified consistently.

Please use an allowed country code for the delivery location

The value in ram:CountryID for the relevant delivery location is not recognized as allowed by this rule. You can compare it with the code list that applies to this field.

What to do
  1. Check ram:CountryID under ram:RelevantTradeLocation in the delivery terms.
  2. Compare the value with the codes allowed for this field.
  3. Generate the invoice again and validate it once more.
Technical details

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

Where the rule applies

The rule applies to ram:CountryID in ram:RelevantTradeLocation within the document-level delivery terms.

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