Skip to content

The deal rebates view

The rebates view is the Rebate tab on a deal (agreement/PSA internally): the tabular record of what each rebate element on the deal has earned — turnover, calculated rebate, payments — by period and by member. It is reached at /psa?psaID=…Rebate tab; the tab itself is visible only to users holding the figures role.

What it shows

One accordion card per rebate element the viewer may see, containing:

  • Element totals — turnover, rebate, paid, and (on sites with in/out rebates enabled, for admin users) a separate Rebate out column.
  • Periods — one row per accrual period with totals and a paid-status color: green paid, amber holding, red incorrect, and distinct styling for estimated amounts. Periods with invoices offer an RFP button opening the request-for-payment detail.
  • Per-member breakdown — each member's rebateable turnover, rebate, payable amount, paid status, and (where applicable) estimated turnover and rebate from projections.
  • A Manually entered rebate badge when the element does not auto-calculate; such rebates are edited per period via a pencil button.
  • A grand total across all rebate elements (shows n/a when elements mix different input/output unit types).
  • Status alerts: Last calculated timestamp (admin only), Validated by <name> <date> when the deal is validated, and a calculation-error alert (superusers only) sourced from the scheduler task log.

There are no charts here — rebate progress charts live on the deal dashboard.

Where the numbers come from

The view loads three parallel datasets from the search index in one request: actual calculated rebate lines, projections, and simulations. Two toggles switch what is displayed:

  • Projections — available when the site enables advanced rebate projections and the viewer holds the projections role (defaults to figures).
  • Show simulation data — displays the results of the most recent rebate simulation instead of actuals. Turning this on also reveals the deal validation buttons.

The query filters rebate lines server-side by element permissions: each line's must/mustnot/any role lists are matched against the requesting user's roles in the search query itself, so (unlike the deal dashboard summary) users do not receive earnings data for rebate elements they cannot see.

Who sees what

Surface Requirement
The Rebate tab itself figures role
Toolbar (toggles, validation buttons) member role
Rebate out / Amount paid columns site in/out-rebates setting + admin role
Rebate configuration Details panel superusers role
Last calculated alert admin role
Calculation-error alert superusers role
Individual rebate elements element-level permissions, enforced in the search query

Why does the rebates view change unexpectedly

  • Numbers moved with no deal edit — the rebate calculation job re-ran after new turnover was entered or imported; check the Last calculated timestamp.
  • A rebate element disappeared for some users — its element permissions or the viewer's roles/groups changed; filtering happens in the query, so different users legitimately see different totals.
  • Values look wrong after running a simulation — the Show simulation data toggle is on; simulated figures live in a separate dataset and are not real earnings.
  • Paid status changed color — payment records were updated (paid, holding, or marked incorrect) by the rebate payment process.

What the rebates view is not

  • Not the deal dashboard's rebate cards — those show only currently-active stepped rebates with charts; this view shows all periods and members in tables.
  • Not the rebate calendar — that is a separate cross-deal view where figures-role users see payable amounts and others see only their own member figures.
  • Not the rebate report builder — no export exists on this view.
  • Not where rebates are defined — rebate elements are edited on the deal itself (Editing deal content).