Validating a deal¶
Validation marks a deal (agreement/PSA) as checked: its calculated rebates have been reviewed against the agreed terms. A deal's validation state is one of unvalidated, pending (validation requested), or validated; the state, who set it, and when are stored on the deal and shown on the rebates view ("Validated by …").
Requires: the validation buttons live on the deal's Rebate tab, so
the actor needs the figures role (to see the tab) and the member role
(to see the toolbar). Running a
simulation first is effectively required: the
buttons appear only while Show simulation data is on.
Steps¶
- Open the deal's Rebate tab (
/psa?psaID=…→ Rebate), or follow a Validate link from the deal browser — the link appears there when a deal is pending validation and has simulation data. - Turn on Show simulation data and compare the simulated rebate figures against the agreement terms.
- Choose the action the toolbar offers:
- Request validation — sets the deal to pending and notifies the deal's negotiator and administrator (a task-type "validationRequest" notification with the deal's name, supplier, period, and reference).
- Validate — sets the deal to validated, recording you and the current date. No notification is sent; the deal is re-indexed and the action is audit-logged.
Which button appears is currently hard-coded by site: on site 6 an unvalidated deal offers only Request validation (a second person then sees Validate once pending); on all other sites an unvalidated deal can be validated directly, skipping the request step. The code carries a TODO to turn this into a feature flag.
Result¶
The deal shows "Validated by <name> <date>" on the rebates view, and validation-state filters in the deal browser reflect the new state. Validation does not lock the deal — it remains editable.
If it fails¶
- No validation buttons visible — Show simulation data is off, the
deal is already validated, or you lack the
member/figuresroles. - Validate absent but Request validation shown — you are on the two-step site (see above); someone must first request validation.
- A legacy validation modal (deal browser side-panel) exists in the code
but appears unwired in 3.7.3, and its success handler references an
uninjected
$timeout— if a side-modal validate ever appears to hang after success, that is why. Use the Rebate-tab buttons.