Use an allowed unit code

Error FX-SCH-A-001086 Factur-X

Value of '@unitCode' 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 specified non-empty value of unitCode is not included in the code list used by this rule.

What the rule means

An allowed unit code ensures that the package quantity is identified using a recognized unit of measure.

Please use an allowed unit code

The specified code for the package quantity unit is not accepted. You can resolve the issue by using a value included in the code list.

What to do
  1. Check the value of unitCode on the ram:PerPackageUnitQuantity element.
  2. Replace any value that is not allowed with a value from the specified code list.
  3. Generate the invoice again and validate it once more.
Technical details

The test permits an empty code value or requires the unitCode value to appear in the code list identified by 15.

Where the rule applies

The rule applies to the unitCode attribute of ram:PerPackageUnitQuantity in the delivery information for an invoice line.

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