Allowed country code for the payee

Error FX-SCH-A-000996 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 code list checked for this element. An empty value is also explicitly allowed by the test.

What the rule means

ram:CountryID identifies the country of the postal address. The test accepts an empty value or a code from the associated code list.

Please use an allowed country code in the payee’s postal address

The value of ram:CountryID in the payee’s postal address is not recognized as allowed. The test permits an empty value or a code from the associated code list.

What to do
  1. Locate ram:CountryID in the payee’s postal address and check its value.
  2. Use a value included in the associated code list, or leave the value empty.
  3. Generate the invoice again and validate it.
Technical details

The XPath test accepts the value if it is empty or occurs in code list 10 in FACTUR-X_EXTENDED_codedb.xml.

Where the rule applies

The rule applies to the value of ram:CountryID in the payee’s postal address.

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