Rule at a Glance

ID Severity Context (XPath)
BR-22 Fatal (error) ubl:Invoice/cac:InvoiceLine
Series reference: BR-22  |  Schematron ID: ibr-022

Classification

Transaction Data — BR-22 mandates the invoiced quantity (IBT-129) on every cac:InvoiceLine. The quantity field records how many units of the item or service are being invoiced and, together with the unit price (IBT-146) and unit code (IBT-130), provides the arithmetic basis for the line net amount (IBT-131). All three fields are mandatory at line level; BR-22 covers the quantity component.

What the Rule Is Checking

BR-22 tests that each cac:InvoiceLine contains a cbc:InvoicedQuantity element with a non-empty numeric value. The element carries a mandatory unitCode attribute — this is checked by a separate rule (BR-23). BR-22 focuses exclusively on the presence of the quantity value itself.

A zero quantity is structurally valid under BR-22. Zero-quantity lines can legitimately appear in invoices that reference previously invoiced items for informational purposes, or in certain credit note structures. However, a zero-quantity line with a non-zero line amount will trigger a calculation rule failure in the BR-CO series. The schematron evaluates the rules independently — BR-22 can pass while a related arithmetic rule fails.

Why This Rule Exists

UAE e-invoicing under PINT-AE requires structured, machine-processable data at every invoice line. The quantity field is essential for three purposes. First, it enables the buyer's ERP to perform automated goods receipt matching: the system compares the invoiced quantity against the purchase order quantity and the delivery note quantity before releasing the invoice for payment. Second, the FTA's compliance tools use the quantity and HS code combination to detect anomalous pricing — an invoice line showing one unit of a commodity at a price that should cover 1,000 units is a data quality signal. Third, the quantity drives the input tax recoverability calculation where partial use rules apply.

From an ERP integration perspective, quantity is one of the most commonly missing or incorrectly mapped fields. Service-based billing systems often do not naturally carry a quantity concept — a legal firm invoicing for professional services may bill a lump sum without a unit count. PINT-AE requires that even lump-sum service invoices express a quantity, typically 1 with unit code C62 (one), to satisfy the structured data requirement.

Standard / Code List

The quantity value is a decimal number. The associated unitCode attribute on cbc:InvoicedQuantity must be a valid UNECE Recommendation 20 unit code. For service invoices billed as lump sums, the conventional unit is C62 (one / unit). See UNECE Rec 20 unit codes in PINT-AE for the full list of accepted codes and UAE-specific usage guidance.

UAE Data Example

PASSES ✓ — goods invoice with quantity and unit code
<cac:InvoiceLine>
  <cbc:ID>1</cbc:ID>
  <cbc:InvoicedQuantity unitCode="KGM">250.500</cbc:InvoicedQuantity>
  <cbc:LineExtensionAmount currencyID="AED">5010.00</cbc:LineExtensionAmount>
  <cac:Item><cbc:Name>Aluminium Sheet 3mm</cbc:Name></cac:Item>
  <cac:Price><cbc:PriceAmount currencyID="AED">20.00</cbc:PriceAmount></cac:Price>
</cac:InvoiceLine>

PASSES ✓ — service invoice using lump-sum unit C62
<cac:InvoiceLine>
  <cbc:ID>1</cbc:ID>
  <cbc:InvoicedQuantity unitCode="C62">1</cbc:InvoicedQuantity>
  <cbc:LineExtensionAmount currencyID="AED">15000.00</cbc:LineExtensionAmount>
  <cac:Item><cbc:Name>Tax Advisory Services — Q2 2027</cbc:Name></cac:Item>
  <cac:Price><cbc:PriceAmount currencyID="AED">15000.00</cbc:PriceAmount></cac:Price>
</cac:InvoiceLine>

FAILS ✗ — InvoicedQuantity element absent
<cac:InvoiceLine>
  <cbc:ID>1</cbc:ID>
  <!-- cbc:InvoicedQuantity missing — BR-22 fires as fatal -->
  <cbc:LineExtensionAmount currencyID="AED">5010.00</cbc:LineExtensionAmount>
  <cac:Item><cbc:Name>Aluminium Sheet 3mm</cbc:Name></cac:Item>
</cac:InvoiceLine>

What Your ERP / IT Team Must Ensure

  • Map cbc:InvoicedQuantity from the billing quantity field in your ERP for every line type, including service lines, discount lines, and text lines — there is no line category exempt from BR-22.
  • For professional services billed at a fixed fee, configure your UBL builder to output a quantity of 1 with unit code C62 (one) — this is the standard convention for lump-sum service invoices in PINT-AE.
  • Ensure the unitCode attribute is always populated on the same element — BR-23 fires fatally if the attribute is absent, meaning BR-22 and BR-23 failures often appear together from the same mapping gap.
  • For invoices with percentage-based charges (e.g., a 2% management fee on a contract value), express the quantity as the base amount and the unit as C62, with the fee percentage applied at the price level — do not attempt to use the quantity field to hold a percentage value.
  • Validate the InvoicedQuantity element in your pre-submission pipeline alongside BR-21 (line ID) and BR-24 (line amount) — these three elements must all be present for a valid invoice line and are frequently missing together when UBL templates are incomplete.

Related Rules

BR-21 (invoice line identifier mandatory), BR-23 (unit of measure code mandatory on InvoicedQuantity), BR-24 (line net amount mandatory), BR-CO-04 (line amount arithmetic: quantity × unit price = line amount). See also UNECE Rec 20 unit codes in PINT-AE and 51 mandatory fields in PINT-AE.