Unit code required for the free-of-charge 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. Without it, the unit of the free-of-charge quantity is not specified.

What the rule means

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

Please specify the unit of the free-of-charge quantity

The unit is missing for the free-of-charge quantity in ram:ChargeFreeQuantity. Add the unit code so the quantity is unambiguous.

What to do
  1. Add @unitCode to ram:ChargeFreeQuantity.
  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:ChargeFreeQuantity>1</ram:ChargeFreeQuantity>
✓ Correct
<ram:ChargeFreeQuantity unitCode="C62">1</ram:ChargeFreeQuantity>
Technical details

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

Where the rule applies

The rule applies to ram:ChargeFreeQuantity in the delivery details of an invoice line.

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