Skip to content

The turnover dashboard and queries

The turnover dashboard (/spend/dashboard) is the cross-deal view of recorded member turnover ("spend") — a grid of figures by member, supplier, deal stream, and period. It is where figures are reviewed, queried, flagged, commented on, and reconciled against accounting data.

This is distinct from a single deal's spend view and from entering turnover.

What it shows

Each row is one member's figure for one turnover stream and period, with the supplier-reported value, the member's own value, the recorded external (ERP) total, flag state, query state, and comment count. It can be viewed flat or grouped (supplier → deal → month, currency streams only), filtered by category, flag, query state, comments, and supplier/member, and exported to Excel.

Who sees what

Access is gated hard on the server: users who lack all of the turnover, ownfigures, and figuresEntry roles get an impossible member filter, so the grid returns nothing (fail-closed). Non- superusers are pinned to their own company; superusers see everyone. On merchant/supplier sites the results are additionally scoped to the viewer's site.

Queries, flags, and resolution

A query is a data dispute about a figure — a member asserting their number differs from what the supplier reported. Raising a query records the member's disputed value alongside the supplier's value and stamps when it was raised. It does not change the figure.

Flags are colored states on a figure:

Flag Meaning
Green Confirmed/matched — set manually, or auto-set when the ERP total matches the figure within 1%
Orange A query was closed without accepting the member's value
Purple A query was resolved — the member's value was accepted (it's copied onto the figure)
None No flag

Resolving a query sets orange or purple; resolving in the member's favour (purple) copies the supplier value onto the member value and stamps the resolution.

Each figure also carries a comment thread (comments against the turnover row). The first comment auto-subscribes the figure's responsible contact, so they're notified of the discussion.

ERP reconciliation

On sites with an accounting/ERP integration, imported purchase-ledger invoice lines (from Intact) are matched to turnover streams and compared against the reported figures. From a figure you can:

  • open the matched ERP lines behind it,
  • see all the supplier's ERP lines for the period, split into mapped (counting toward a stream) and unmapped buckets by stream code, and
  • reclassify an unmapped stream code onto a turnover stream, so its ERP lines start counting toward that figure.

The reconciled ERP total is cached on the figure; when it matches the reported value within 1%, the figure auto-flags green. National-buying- group (NMBS) EDI totals can also be compared for members/suppliers with NMBS IDs.

The eBiz Merchant call to action

On a group site, a user with the member role whose company has no connected eBiz Merchant site (the company's eBizID is empty) sees a banner above the turnover grid inviting them to import their purchase or sales ledger with eBiz Merchant. The banner opens a dialog with three options: a free tier (upload a purchase-ledger file and reconcile it against supplier-submitted figures) and the two paid plans from ebiz.uk/merchants, Merchant Lite (purchase and sales ledger fed from the ERP, discrepancy flagging, margin after rebate) and Merchant Business (Lite plus the merchant's own deal management, payment chasing and rebate queries). The dialog states that, on every option, the member's ledgers are held on their own eBiz Merchant site in a separate environment, where group administrators and power users cannot see their transactions. The free tier's Upload button closes the promo and opens the purchase ledger upload wizard, a separate four-step dialog that a member whose company already has a merchant site can also open directly from an Upload ledger button in the Turnover panel header. The steps follow the agreed backend process: (1) first time only, create the member's merchant site in the background; (2) upload a CSV/XLSX, importing straight away when the column layout matches the last upload and otherwise showing a column-mapping screen (supplier, invoice date, invoice number, net value, plus optional VAT and nominal) that is remembered; (3) run the import with a progress bar and list unreadable lines; (4) index the lines and match them to supplier figures, with a table to link any suppliers that could not be matched. Ledger exports can be very large, so the browser never reads the whole file: it is sent in 5 MB parts straight from disk and the server streams it to return the column headings and a short preview. The only client-side read is the first 256 KB of a CSV, used for an instant preview while the upload runs.

The backend is handlers/ledger.cfc with models/ledgerService.cfc in API v3_8_1 (schema in handlers/ledger-schema-migration.sql, run once). Both purchase and sales ledgers are supported, in csv, xlsx, xls, xml (EDI feeds; the repeating record element is detected) and json. Site creation (step 1) reuses the module's lite-site routine, copying the member's users and branches, then copies the group's ebiz staff users across. Parts are stored under the shared file store and joined on complete; the import runs in a thread, streaming csv line by line, xlsx through the streaming reader, xml through StAX and json through Jackson, and indexes lines into the member's merchant index bmnet_<eBizID> as type edi (purchase) or sales, where the Intact ERP import also writes. Purchase lines are matched to group suppliers by saved account reference, VAT number or name; stream codes are mapped with figuresService.mapErpLine and cached ERP totals refreshed with updateErpTotals, so auto-green and the ERP drill-down work unchanged. Lines whose nominal code is missing or unknown are placed on a deal stream by best guess: each of the supplier's streams live on the invoice date is reduced to its distinctive words (stop-words such as branded, all, other, range are dropped, so "HIB Branded" becomes HIB and "All other products" becomes a catch-all); a stream matches when one of its words appears as a whole word in the description or prefixes the product code; the best-scoring stream wins, otherwise the single catch-all or the supplier's only stream. Streams without an input code get a per-member code ledger-fe<id> in figuresEntryCustomerMapping so their totals stay separate. The sync step lists what was guessed, with sample descriptions, and the line records streamMatch (nominal, guess, catchall, default, none) for later review. A proposal for an embedding / LLM layer behind these rules is in the stream-matching spec. Column mappings persist in fieldDefinitions (object ledger.purchase / ledger.sales, keyed by header signature); supplier links in companyMemberMapping. Progress is tracked in taskLog and pushed to the uploader as ledgerProgress notification frames, with polling as the fallback. Imports are idempotent: a line's id is a hash of merchant site, supplier, invoice number and line position, so re-uploading replaces. The two paid tiers' Get started buttons reveal that call-back form directly; submitting it posts to api/site/merchantEnquiry, which emails the eBiz support inbox (bugs.supportEmails in site settings) with the member's name, company, chosen plan, phone and message, reply-to set to the member. One enquiry per contact per site per day is accepted; a repeat within that window is acknowledged without sending another email.

Nobody else sees the banner: supplier users, group administrators, anyone on a merchant or supplier site, and the Queries modal that reuses this template all skip it. The small close control hides it in that browser for 30 days, as does sending an enquiry.

Why does a figure change or flag unexpectedly

  • A figure turned green on its own — its ERP total came to match the reported value within 1% (auto-green after import or reclassification).
  • A member value now equals the supplier value — a query was resolved in the member's favour (purple), which copies the value across.
  • A figure locked from editing — an RFP has invoiced that deal/period (see Requests for payment); invoiced figures can't be edited except by superusers.

What the turnover dashboard is not

  • Not the per-deal spend view — that is one deal's turnover; this spans all deals with the query/flag/ERP workflow.
  • Not figures entry — figures are submitted elsewhere; this reviews and reconciles them.
  • Not the amendment queue — that is the approval queue for submitted figure changes.