An Invoice line (BG-25) shall have an Invoiced quantity unit of measure code (BT-130) if the "Subtype of invoice line item" (BT-X-8) has the value "Normal line item (standard case)" (DETAIL) or is not specified.
A normal invoice line is missing the unitCode attribute on ram:BilledQuantity in ram:SpecifiedLineTradeDelivery. The unit of the invoiced quantity is therefore not stated.
The unit of measure code states the unit in which the invoiced quantity is expressed. It is required so that the quantity can be interpreted unambiguously.
No unit is specified for the invoiced quantity on this normal invoice line. Add the unit code to the quantity.
- Find
ram:BilledQuantityinram:SpecifiedLineTradeDelivery. - Add the
unitCodeattribute there by settingTradeLineItem.UnitCode. - Generate the invoice again and validate it.
<ram:SpecifiedLineTradeDelivery> <ram:BilledQuantity>2</ram:BilledQuantity> </ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeDelivery> <ram:BilledQuantity unitCode="C62">2</ram:BilledQuantity> </ram:SpecifiedLineTradeDelivery>
AssociatedDocument.LineStatusReasonCode(BT-X-8)LineStatusReasonCodes(BT-X-8)TradeLineItem.UnitCode(BT-130)
Technical details
The test requires the unitCode attribute on ram:SpecifiedLineTradeDelivery/ram:BilledQuantity. It applies only to ram:AssociatedDocumentLineDocument without ram:LineStatusReasonCode or with the value DETAIL.
The rule applies to ram:AssociatedDocumentLineDocument when ram:LineStatusReasonCode is absent or has the value DETAIL.
rule/@context)assert/@test)