Provide an allowed country code

Error FX-SCH-A-000749 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 in ram:CountryID is not included in the code list used by this rule. An empty value is also accepted by this test.

What the rule means

If provided, the country code for the postal address must belong to the codes allowed by this rule.

Please use an allowed country code in the postal address

The value provided in ram:CountryID is not allowed by the code list used here. You can correct it using a code allowed by this rule.

What to do
  1. Check the value in ram:CountryID of the postal address.
  2. Replace it with a value included in code list 10, or leave the value empty.
  3. Generate the invoice again and validate it.
Technical details

The test accepts an empty code or a value present in the enumeration of code list 10.

Where the rule applies

The rule applies to ram:CountryID in the postal address of the sales agent’s legal organization in the seller section.

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