Use an allowed country code for the address

Error FX-SCH-A-000880 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 allowed for this field. The test also permits an empty value.

What the rule means

ram:CountryID identifies the country of the address. A non-empty value must match an entry in the designated country code list.

Please use an allowed country code for the invoice recipient’s address

The value in ram:CountryID does not match the allowed code list. You can correct it using a country code designated for this field; the rule also permits an empty value.

What to do
  1. Locate ram:CountryID in the postal address of the invoice recipient’s legal organization.
  2. Compare its non-empty value with the country codes allowed for this field, or leave the value empty.
  3. Generate the invoice again and validate it once more.
Technical details

The XPath accepts an empty code value or a value present in the code list identified by 10.

Where the rule applies

The ram:CountryID in the postal address of the invoice recipient’s legal organization.

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