# BR-22

Source: https://xmlvalid.com/rules/BR-22

> Each Invoice line (BG-25) shall have an Invoiced quantity (BT-129).

- Level: error
- Rule sets: EN 16931 rules (UBL) 1.3.17, EN 16931 rules 1.3.16 (UBL), Romanian RO e-Factura rules (UBL) 1.0.9
- Context: `cac:InvoiceLine | cac:CreditNoteLine`
- Test: `exists(cbc:InvoicedQuantity) or exists(cbc:CreditedQuantity)`

> Each Invoice line (BG-25) shall have an Invoiced quantity (BT-129).

- Level: error
- Rule sets: EN 16931 rules (CII) 1.3.17, EN 16931 rules 1.3.16 (CII), Factur-X EN 16931 rules 1.09.2
- Context: `//ram:IncludedSupplyChainTradeLineItem`
- Test: `(ram:SpecifiedLineTradeDelivery/ram:BilledQuantity)`

## Why it fails

- A line has no `cbc:InvoicedQuantity` (`cbc:CreditedQuantity` in a credit note, `ram:BilledQuantity` in CII), common for lump-sum services.

## How to fix it

- Give every line a quantity. For a lump sum, use `1` with the unit code `C62` (one) or `LS` (lump sum).

Validate a document against these rules: https://xmlvalid.com/validate
