Disallowed delivery location 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 empty and is not included in the code list identified by 10. An empty value passes this check.

What the rule means

ram:CountryID identifies the country of the relevant delivery location. The rule ensures that a supplied value corresponds to the applicable code list.

Please check the delivery location country code

The value in ram:CountryID for the relevant delivery location is not included in the applicable code list. You can review and adjust the value based on this rule.

What to do
  1. Locate ram:RelevantTradeLocation in the affected invoice line agreement.
  2. Check whether the value of ram:CountryID is included in the applicable code list.
  3. Generate the invoice again and validate it once more.
Technical details

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

Where the rule applies

The rule applies to ram:CountryID in ram:RelevantTradeLocation within an invoice line agreement.

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]