Allowed country code for the delivery location

Error FX-SCH-A-000822 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 in the country code list used by this rule. The test permits an empty value.

What the rule means

ram:CountryID specifies the country of the postal address. The check restricts its value to entries in the associated code list.

Please use an allowed country code for the delivery location

The value in ram:CountryID of the postal address is not in the associated country code list. You can change it to a value allowed there.

What to do
  1. Find ram:CountryID in the postal address of ShipToTradeParty.
  2. Check the value against the country code list applicable to this rule.
  3. Use a value listed there, or leave the value empty.
  4. Regenerate the invoice and check it again.
Technical details

The XPath test permits an empty $codeValue10; otherwise, the value must occur as an enumeration in codedb/cl[@id=10].

Where the rule applies

Applies to ram:CountryID in the postal address of ShipToTradeParty.

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