What is order accounting?
Order accounting is the reconciliation surface: one row per order carrying every financial fact about it — revenue excluding and including tax, VAT, shipping charged, refunds against it, and its contribution margin. It exists for the moments when an aggregate looks wrong and you need to see the actual orders, and for handing an accountant numbers that tie back to individual order references.
Formula
excl-tax revenue = line revenue − order discount
incl-tax revenue = excl-tax revenue + VAT
one row per order, with shipping, refunds and margin alongside
Worked example
Order #4821: 3 items, €96.50 excl tax, €18.34 VAT, €114.84 incl tax, €4.95 shipping charged, one €22.00 partial refund, €31.20 margin (32.3%). The platform back office shows €119.79 for this order — incl-tax plus shipping — and the analytics dashboards show €96.50. Both are on this one row, which is the point: every reconciliation between the store, the books and the dashboards routes through here.
How Saldo Metrics computes it
v_order_accounting assembles each order from the facts: line revenue summed per
order minus the order-level discount (the excl-tax basis every analytics widget
uses), the order's tax total, their sum as the incl-tax figure, shipping charged,
refunds summed from the refund events, and contribution margin under the
order-grain cost rule — an order with any uncosted line shows unknown margin,
never zero, with its revenue flagged uncosted. Each row keeps the order's source
reference, status, and the is_net_sale flag, and the widget serves the most
recent orders filterable by period, country and status. All amounts are EUR
conversions at the order's own date; the original currency stays on the
underlying facts.
Why it matters
Analytics and accounting count differently on purpose — net sales versus placed orders, excl-tax versus incl-tax — and without a bridge those differences read as bugs. This view is the bridge: any dashboard total can be decomposed into rows here, and any row tied back to the store platform by its order reference.
Common mistakes
- Summing incl-tax revenue as "revenue". VAT is collected for the tax office, not earned; every performance metric uses the excl-tax basis.
- Expecting cancelled orders to be absent. The view carries every order with its status; it is the filterable superset, unlike the pre-filtered net-sale metrics.
- Reading NULL margin as zero. NULL means uncosted — the margin is unknown until product costs land, and the margin percent column stays honest by showing nothing.
Where you see this in the app
The Orders (Accounting) dashboard widget and the accounting report templates.
- Formula
- per order: excl-tax and incl-tax revenue, VAT, shipping, refunds, margin
- How Saldo Metrics computes it
- canonical.v_order_accounting
Last reviewed 2026-08-29