Allowed country code for the buyer’s organization

Error FX-SCH-A-000702 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

If ram:CountryID contains a value, that value must be in the country-code list. An empty value also satisfies the shown test.

What the rule means

The rule restricts any supplied country code to values allowed by the referenced code list.

Please use an allowed country code for the buyer’s organization

The value of ram:CountryID in the buyer organization’s address is not in the code list checked by this rule. This rule also accepts an empty value.

What to do
  1. Check ram:CountryID in the buyer organization’s address.
  2. Use only a value from the allowed code list there, or leave the element without a value.
  3. Regenerate the invoice and validate it again.
Technical details

The XPath passes when $codeValue10 is empty or occurs as an enumeration value in the code list with identifier 10.

Where the rule applies

The rule applies to ram:CountryID in the postal address within the buyer’s ram:SpecifiedLegalOrganization.

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