Allowed country value for CountryID

Error FX-SCH-A-000698 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 CountryID is not included in the applicable country code list. The test accepts an empty value or a value from code list 10.

What the rule means

An allowed country value associates the buyer’s postal address with a country recognized by the code list.

Please use an allowed country value for the buyer’s address

The value of CountryID in the buyer’s address is not allowed. Use a country value from the applicable code list.

What to do
  1. Locate CountryID in PostalTradeAddress of BuyerTradeParty.
  2. Replace any disallowed value with a value from code list 10.
  3. Regenerate the invoice and validate it again.
Technical details

The test accepts CountryID when its value is empty or occurs in the enumeration for code list 10.

Where the rule applies

The rule applies to CountryID in the buyer’s postal address under PostalTradeAddress.

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