Use an allowed country code for the end-user address

Error FX-SCH-A-000720 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 included in the list of values allowed for this element. The check also accepts an empty value.

What the rule means

ram:CountryID identifies the country of the postal address. A value outside the allowed list cannot be recognized as a valid country value.

Please use an allowed country code for the end-user address

The value in ram:CountryID for the end-user address is not allowed. Use a value from the list provided for this element.

What to do
  1. Check the value in ram:CountryID in the postal address.
  2. Compare it with the values allowed for this element.
  3. Regenerate the invoice and validate it again.
Technical details

The value is checked against list 10 in FACTUR-X_EXTENDED_codedb.xml; an empty value also passes the check.

Where the rule applies

The rule applies to ram:CountryID in the postal address of ram:ProductEndUserTradeParty in the invoice agreement.

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