Package quantity unit code is missing

Error FX-SCH-A-001083 Factur-X

Attribute '@unitCode' is required in this context.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

The @unitCode attribute, which specifies the unit of the package quantity, is missing from ram:PackageQuantity.

What the rule means

The unit code associates a unit of measure with the quantity value. Without it, the package quantity is not provided together with its unit.

Please add the unit for the package quantity

The package quantity is missing its unit code. Add it so the quantity is provided together with its unit.

What to do
  1. Add @unitCode to ram:PackageQuantity.
  2. Use a code allowed for this unit.
  3. Generate the invoice again and validate it again.
Technical details

The XPath test @unitCode checks whether the attribute exists on the current ram:PackageQuantity.

Where the rule applies

The rule applies to 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)
@unitCode