Allowed CountryID value

Error FX-SCH-A-000724 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 CountryID is not included in the code list used by this rule. The test also permits an empty value.

What the rule means

CountryID identifies the country of the postal address. A code not listed in the applicable code list cannot identify the country according to that list.

Please use an allowed CountryID value

The value in CountryID in the postal address is not included in the applicable code list. You can adjust it using an available entry; this rule also accepts an empty value.

What to do
  1. Find CountryID in the relevant PostalTradeAddress.
  2. Use a value included in the associated code list, or leave CountryID empty.
  3. Generate the invoice again and validate it again.
Technical details

The test accepts an empty code or a value included in the code list identified as 10.

Where the rule applies

The rule applies to CountryID in the postal address of the end user's legal organization.

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