Unit code required for the package quantity

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 is missing from ram:PackageQuantity. Without it, the unit of the package quantity is not specified.

What the rule means

The unit code specifies the unit of measure used for the package quantity. It enables the quantity to be interpreted unambiguously.

Please specify the unit of the package quantity

The unit is missing for the package quantity in ram:PackageQuantity. Add the unit code so the quantity is unambiguous.

What to do
  1. Add @unitCode to ram:PackageQuantity.
  2. Enter the unit code that corresponds to the quantity.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:PackageQuantity>1</ram:PackageQuantity>
✓ Correct
<ram:PackageQuantity unitCode="C62">1</ram:PackageQuantity>
Technical details

The Schematron check requires the @unitCode attribute to be present on the current ram:PackageQuantity element.

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