Fix cXML PunchOutOrderMessage Total Mismatch errors.

Floating-point arithmetic, tax-included subtotals, or formatting commas often create a 0.01 discrepancy between <Total><Money> and the sum of <ItemIn> lines — causing instant cart rejection.

BEFORE — Rejected by portal
<!-- BUG: 3 * 14.50 = 43.50, but Header says 52.20 (VAT accidentally included!) -->
<Total><Money currency="EUR">52.20</Money></Total>
<ItemIn quantity="3">
  <ItemDetail><UnitPrice><Money currency="EUR">14.50</Money></UnitPrice></ItemDetail>
</ItemIn>
AFTER — Valid cXML / OCI
<!-- FIXED: Ex-VAT integer-cent calculation: 3 * 1450 cents = 4350 cents -> 43.50 -->
<Total><Money currency="EUR">43.50</Money></Total>
<ItemIn quantity="3">
  <ItemDetail><UnitPrice><Money currency="EUR">14.50</Money></UnitPrice></ItemDetail>
</ItemIn>

Root Causes & Permanent Fix

VAT/Tax accidentally added to Total

PunchOutOrderMessage <Total> must be the net ex-tax merchandise total matching sum(qty × UnitPrice).

JavaScript/PHP float rounding bugs

Multiplying floats like 19.99 * 3 without integer cents produces subtle rounding drifts across multi-line carts.

Shipping included in Total without a shipping line

Either pass shipping in <Shipping><Money> separately or as an explicit line item — never silently inside <Total>.

See your catalogue in the SAP Ariba simulator, no sign-up.

The pre-filled demo shows a B2B catalogue, two test buyers (cXML and SAP OCI 4.0), the simulator and a purchase order as PDF and CSV.

Frequently Asked Questions

Should PunchOutOrderMessage prices include VAT?

No. Always return net ex-VAT unit prices and net ex-VAT total; the buyer ERP applies its own tax rules during Purchase Order creation.

How can I check if my cXML total matches before UAT?

Paste your PunchOutOrderMessage into Maillon's free cXML Validator — it recomputes every line and flags even a 0.01 discrepancy.