Specify the package quantity unit

Error FX-SCH-A-001085 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 is missing from ram:PerPackageUnitQuantity. As a result, the unit for the specified value is not identified.

What the rule means

The value describes a quantity per package unit. The unitCode attribute identifies the unit in which that quantity is expressed.

Please specify the package quantity unit

No unit is specified for the package quantity in an invoice line’s delivery information. You can resolve this by providing the unit.

What to do
  1. Add unitCode to the ram:PerPackageUnitQuantity element.
  2. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:PerPackageUnitQuantity>2</ram:PerPackageUnitQuantity>
✓ Correct
<ram:PerPackageUnitQuantity unitCode="C62">2</ram:PerPackageUnitQuantity>
Technical details

The test checks whether the unitCode attribute is present on ram:PerPackageUnitQuantity.

Where the rule applies

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