Allowed country code for the country of origin

Error FX-SCH-A-001173 Factur-X

Value of 'ram:ID' 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:ID in ram:OriginTradeCountry is not included in the code list specified for this field. This test does not reject an empty value as an invalid code.

What the rule means

The code list defines which values may be used to identify the country of origin. A value not in the list is not valid for this information.

Please use an allowed country code for the country of origin

The country code for the country of origin on an invoice line is not included in the code list provided for it. Check the value of ram:ID.

What to do
  1. Locate ram:OriginTradeCountry on the affected invoice line.
  2. Check whether the value of ram:ID is included in the code list for this field.
  3. Generate the invoice again and validate it.
Technical details

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

Where the rule applies

The rule applies to ram:ID within ram:OriginTradeCountry on an invoice line.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:SpecifiedTradeProduct/ram:OriginTradeCountry/ram:ID
Test expression (assert/@test)
string-length($codeValue10)=0 or document('FACTUR-X_EXTENDED_codedb.xml')/codedb/cl[@id=10]/enumeration[@value=$codeValue10]