Rule at a Glance

ID Severity Context (XPath)
Series ref. BR-71 Fatal (error) cac:Price/cbc:BaseQuantity[@unitCode]
Schematron ID: ibr-088  |  Field: ibt-150 — Item price base quantity unit of measure, against ibt-130

Classification

Master Data — both unit codes originate in the item and pricing records, and a mismatch is a catalogue defect that surfaces at billing rather than a billing error.

What the Rule Is Checking

Where the price base quantity carries a @unitCode attribute, that code must equal the unit code on the invoiced quantity of the same line, or the credited quantity on a credit note. The rule passes where neither quantity element exists.

The comparison is exact string equality on the code value. H87 against H87 passes. KGM against TNE fails, even though kilograms and tonnes describe the same physical dimension and a human reader would resolve the conversion without pausing.

Why This Rule Exists

The line net amount is calculated by dividing the item net price by the base quantity and multiplying by the invoiced quantity. UAE rule ibr-147-ae writes that formula out explicitly and requires the result to match the declared line extension amount to two decimals. The formula performs no unit conversion. It assumes the numerator and denominator are counting the same thing.

Where they are not, the arithmetic still resolves. A price of AED 500 per tonne against an invoiced quantity of 2,000 kilograms yields a line value a thousand times too high, and every downstream figure — line total, taxable amount, VAT at 5 per cent, document total — is internally consistent with that wrong number. The totals rules pass. The invoice is arithmetically valid and commercially wrong.

That is the case for catching it at the unit code. A tax authority receiving the document in near real time has no reference price against which to detect the error, and neither does the buyer's automated three-way match. The only point at which the mismatch is visible is the point at which the two codes sit next to each other in the same XML fragment.

Standard / Code List

Both attributes draw on UN/ECE Recommendation 20 unit codes, extended by Recommendation 21 where applicable. Codes commonly seen on UAE invoices include H87 (piece), KGM (kilogram), LTR (litre), MTR (metre), HUR (hour), DAY (day) and MON (month). The rule tests equality between two values, not membership of the list — a separate code list rule handles validity.

UAE Data Example

PASSES ✓: <cbc:InvoicedQuantity unitCode="HUR">40</cbc:InvoicedQuantity> with <cbc:BaseQuantity unitCode="HUR">1</cbc:BaseQuantity> on a professional services line billed at an hourly rate.

PASSES ✓: KGM on both, with a base quantity of 100 for a commodity priced per hundred kilograms.

FAILS ✗: <cbc:InvoicedQuantity unitCode="KGM">2000</cbc:InvoicedQuantity> with <cbc:BaseQuantity unitCode="TNE">1</cbc:BaseQuantity>, where the sales unit and the pricing unit were maintained independently in the item master.

FAILS ✗: A services line invoiced in DAY against a rate card stored in HUR, a mismatch that survives in many ERP catalogues because the rate card and the billing unit are owned by different teams.

What Your ERP / IT Team Must Ensure

  • Map the sales unit of measure and the pricing unit of measure to the same UN/ECE code on every item, and enforce equality as a validation on the item master rather than on the outbound document.
  • Remove any silent unit conversion between the pricing record and the invoice line. Where a conversion is commercially required, convert the price and the base quantity together so both sides land in the billing unit.
  • Audit the existing catalogue for items where the two units differ. This is a finite, countable list and it can be cleared before go-live.
  • Treat unit-of-measure ownership as a named responsibility. Where sales maintains one field and finance maintains the other, the mismatch is structural and will recur after every catalogue extension.
  • Cover services lines in the test pack, since time-based units are where rate cards and billing units diverge most often.

Related Rules

The positive-value constraint on the base quantity itself is the immediately preceding rule in this series. UAE rule ibr-147-ae defines the line net amount formula that depends on both unit codes agreeing, and ibr-126-ae makes the base quantity mandatory in the UAE profile, which guarantees this rule runs on every line.