Unit of measure for the invoiced quantity

Error BR-23 EN 16931

An Invoice line (BG-25) shall have an Invoiced quantity unit of measure code (BT-130).

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:BilledQuantity. The unit of measure for the invoiced quantity is therefore not provided.

What the rule means

BT-130 states the unit of measure for the invoiced quantity. This associates the quantity with a unit.

Affected fields BG-25 BT-130
Please provide the unit for the invoiced quantity

The unit for the invoiced quantity is missing. You can add it to the quantity value on the invoice line.

What to do
  1. Add the unitCode attribute to the ram:BilledQuantity element.
  2. Check the value of TradeLineItem.UnitCode.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:IncludedSupplyChainTradeLineItem>
  <ram:SpecifiedLineTradeDelivery>
    <ram:BilledQuantity>1</ram:BilledQuantity>
  </ram:SpecifiedLineTradeDelivery>
</ram:IncludedSupplyChainTradeLineItem>
✓ Correct
<ram:IncludedSupplyChainTradeLineItem>
  <ram:SpecifiedLineTradeDelivery>
    <ram:BilledQuantity unitCode="C62">1</ram:BilledQuantity>
  </ram:SpecifiedLineTradeDelivery>
</ram:IncludedSupplyChainTradeLineItem>
Check in FactoorSharp
  • TradeLineItem.UnitCode (BT-130)
Technical details

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

Where the rule applies

Applies to the unitCode attribute of ram:BilledQuantity in each invoice line ram:IncludedSupplyChainTradeLineItem.

Context (rule/@context)
//ram:IncludedSupplyChainTradeLineItem
Test expression (assert/@test)
(ram:SpecifiedLineTradeDelivery/ram:BilledQuantity/@unitCode)