Unit code is required for the unbilled quantity

Error FX-SCH-A-001077 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:ChargeFreeQuantity. The test requires the attribute to be present.

What the rule means

The unit code specifies the unit in which the unbilled quantity is expressed. Without it, the unit of this quantity is not specified.

Please add the unit code for the unbilled quantity

The unit is missing for the unbilled quantity. Add the @unitCode attribute so that the quantity is provided with its unit.

What to do
  1. Locate ram:ChargeFreeQuantity in the invoice line.
  2. Add the required @unitCode attribute there.
  3. Generate the invoice again and validate it again.
Technical details

The XPath test @unitCode checks only whether the attribute is present on the current ram:ChargeFreeQuantity.

Where the rule applies

The rule applies to the @unitCode attribute of the unbilled quantity ram:ChargeFreeQuantity in an invoice line.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:SpecifiedLineTradeDelivery/ram:ChargeFreeQuantity
Test expression (assert/@test)
@unitCode