Use an allowed value for CountryID

Error FX-SCH-A-000684 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 non-empty value of ram:CountryID is not included in the code list used by this rule. An empty value passes this specific check.

What the rule means

ram:CountryID identifies the country of the postal address. Any value provided must match the code list used by this rule.

Please use an allowed country value for `CountryID`

The value entered in ram:CountryID in the buyer’s tax representative’s postal address is not in the code list used by this rule. You can update the value or leave it empty.

What to do
  1. Check the value in ram:CountryID in the buyer’s tax representative’s postal address.
  2. Use a value from the code list for CountryID, or leave the element empty.
  3. Generate the invoice again and validate it.
Technical details

The non-empty value is checked against entries in code list 10 in FACTUR-X_EXTENDED_codedb.xml; the test allows an empty value.

Where the rule applies

The rule applies to ram:CountryID in the buyer’s tax representative’s postal address.

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