AM.
Back to Overview

Reproducing Price-Basis Arithmetic for UAE ERP Readiness

Mandate & Focus

Design study · Fictional invoice lines · Independent Design study

By Design study

Five fictional AED lines and twelve local boundary assertions executed offline. Exact unrounded arithmetic only; no XML, full PINT-AE tolerance verdict, tax, unit conversion, ERP or provider validation ran.

Design feature 01

5 fictional lines

Design feature 02

12 boundary checks

Design feature 03

0 provider calls

Executive Summary

Five authored lines isolate price-base quantity, explicit unit agreement and an unrounded fractional difference without claiming full PINT-AE validation.

Architectural Deep Dive

Design study — fictional lines and limited offline execution. This study examines how a price base quantity changes a line calculation before wider UAE e-invoicing validation. It supplies five authored records, an exact-rational Python reference and an actual execution record. No supplier, ERP, service provider or tax authority was contacted. The byline is Anant Mishra.

The question being isolated

A fictional quote supplies AED 120 for one hundred items, with an invoiced quantity of 250. The reference asks what unrounded value follows from those supplied fields when quantity and price-base units agree. It does not infer commercial terms from a document, convert packaging units or decide whether the source price is correct.

The primary definition is OpenPeppol’s IBT-149 price base quantity. The reviewed IBR-087 and IBR-088 pages supply context for positive base quantities and matching supplied unit codes. Sources were checked on 28 November 2026. The reference uses a stricter, explicitly stated local input contract rather than implementing complete XML rules.

Fixture and calculation boundary

All quantities, prices and stated amounts are authored decimal strings. The reference accepts nonnegative plain decimal values, requires a positive base quantity and retains explicit quantity and price-base unit strings. It restricts the currency label to AED for this exercise. It does not verify a currency or unit code against an external code list. Negative values, numeric JSON values and unsupported string formats are outside its declared local contract.

There are no line charges, line allowances, item discounts or tax calculations in the fixture. The calculation is quantity multiplied by price, divided by base quantity. Python rational arithmetic preserves the exact result. The output records that fraction, the stated amount and the exact stated-minus-calculated difference. It does not round or label a line compliant.

Five authored records and observed output

The first record has quantity 250, price 120, base 100 and matching units. The calculation returns 300, agreeing exactly with its authored stated amount. The second retains those inputs but supplies a stated amount of 30,000. Its observed difference is 29,700. This counterexample makes the consequence of ignoring the price basis inspectable without asserting that an actual supplier made that mistake.

The third record supplies base quantity zero. The local reference holds it without dividing. The fourth supplies different quantity and price-base unit strings. It is also held without calculation; no invented conversion is applied. These holds describe the reference’s behavior on the authored fields, not complete validation results for real e-invoices.

The fifth record supplies quantity 3, price 1.015, base 3 and a stated amount of 1.02. The unrounded result is 203/200, or 1.015, and the difference is 1/200, or 0.005. That result is retained as a difference rather than described as a standards failure. It illustrates why exact intermediate arithmetic and a validation verdict should remain separate.

Relationship to the published line rule

The checked IBR-147-AE test includes line charges and allowances and uses a tolerance of 0.02. This reference implements neither that tolerance decision nor the complete rule. A nonzero exact difference, especially the fifth record’s small difference, cannot be presented as a PINT-AE rejection. XML context, required fields and all other applicable rules remain outside the experiment.

That distinction also limits interpretation of the first record. Exact agreement on supplied numbers does not establish that a price was authorized, a unit code valid, a tax amount correct or a document accepted by a provider. It establishes only the expected arithmetic for this declared set of inputs.

Reproduce the narrow execution

Save the fictional fixture, Python reference and reproduction guide together. The execution record retains actual UTC run time, Python version, source/input hashes, results and named boundary checks. No network, credentials or external packages are required.

A separate local rerun compared results, boundary-check names and hashes with the retained record. Boundary assertions cover unsupported numeric representations, a missing base field, zero base, unit disagreement, unsupported currency and zero quantity. These test software scope and arithmetic, not real ERP behavior or regulatory compliance.

A future evaluation should also include a deliberately changed commercial basis with an effective date. Preserve the original quote, mapped fields and emitted invoice for each version. A reviewer can then ask whether replay reconstructs the document’s original terms or substitutes current product defaults. That experiment is not implemented here. Its source records, mapping versions, reviewer decisions and actual emitted documents would need to be retained before reporting a successful historical reconstruction.

Evidence still needed

Operational evaluation requires authorized price and quantity records, verified field definitions, approved product/unit conversions, effective commercial terms, precision policy, complete applicable validation and actual provider receipts. A packaging change should be tested against the approved mapping rather than resolved by making unit labels match. No deployment, client outcome, cost saving, peer review or scholarly release is claimed.

The companion essay explains the mapping questions. The readiness checklist places this small reference within the wider integration plan. The delivered evidence is a reproducible calculation on fictional inputs, with its unsupported decisions left visible.

Proposed approach

Scope
Exact price-basis arithmetic and local input holds
Evidence
Fixture, Python reference, actual execution record and hashes

Sources

  1. IBT-149 — item price base quantity — OpenPeppol; checked 28 November 2026
  2. IBR-087 — positive base quantity — OpenPeppol; checked 28 November 2026
  3. IBR-088 — supplied unit agreement — OpenPeppol; checked 28 November 2026
  4. IBR-147-AE — invoice line net amount — OpenPeppol; checked 28 November 2026

Related reading

Read the publishing standards or suggest a correction.

Technical FAQ

What actually ran?
A Python exact-rational reference processed five fictional records and twelve boundary assertions offline. An independent rerun matched results, boundary names and code/input hashes.
Was the fractional-price record rejected by PINT-AE?
No such validation ran. It returns unrounded 1.015 against stated 1.02, an exact 0.005 difference. The published rule has a tolerance; this reference issues no tolerance or compliance verdict.
What remains unverified?
Actual price and quantity sources, field definitions, authorized conversions, commercial terms, precision rules, full document validation, provider exchange and ERP mapping remain unverified.

Ready to architect operational leverage?

Available for fractional executive leadership, enterprise architecture consulting, and board-level technical advisory.

Initiate Dialogue ↗