Disallowed unit code for the package quantity

Error FX-SCH-A-001084 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 @unitCode attribute of ram:PackageQuantity contains a value that is not in the corresponding code list. This check permits an empty value.

What the rule means

The unit code identifies the unit of measure in which the package quantity is expressed. A disallowed code can prevent consistent interpretation of the quantity.

Please use an allowed unit code for the package quantity

The unit code for the package quantity is not in the code list provided for it. You can adjust the code and check the invoice again.

What to do
  1. Check @unitCode on ram:PackageQuantity.
  2. Use a unit code allowed by the corresponding code list.
  3. Generate the invoice again and validate it again.
Technical details

The check verifies that the unit code is empty or occurs as enumeration/@value in codedb/cl[@id=15].

Where the rule applies

The rule applies to @unitCode on ram:PackageQuantity in the delivery details of an invoice line.

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