Feature #5543
openJob Review Workflow (Manager Approval)
Description
As a Manager / Admin
I want field staff to mark jobs as submitted_for_review (before closing) so managers can verify actual quantities and approve adjustments or returns,
So that invoices, refunds, or additional charges are accurate and recorded with action history and customer notification.
Acceptance Criteria
AC1 — New Status Flow
Job lifecycle: new → inprogress → submitted_for_review → complete (only after manager approves).
Fieldstaff can move job to submitted_for_review (or chosen name).
When moved, job appears in Admin/Manager dashboard "Jobs for Review".
AC2 — Admin/Manager Dashboard
Dashboard lists all jobs with status submitted_for_review.
Each job entry shows: Job ID, Customer, Date, Fieldstaff, link to Review Detail page.
AC3 — Review Detail Page
Manager can open a job review page which shows:
Job summary (ID, address, fieldstaff, dates)
Products planned (name, planned quantity, planned unit price)
Editable inputs for Actual Quantity per product
Equipment planned and actual (hours/units and rates)
Labour planned and actual (hours and rates)
For each row, show Difference = Actual - Planned
For each row, show AdjustmentAmount = Difference * UnitPrice (positive → additional charge to customer; negative → refund/return)
Show Totals:
Total Planned Amount
Total Actual Amount
Net Adjustment (positive => customer owes; negative => refund due)
AC4 — Manager Actions
Manager can Approve .
Approve:
Marks job as complete
Triggers email to customer with revised amount and payment link if additional payment due.
If refund due, triggers refund workflow (cash or recorded refund) & email to customer.
Save an action-history entry with manager, timestamp, values, and notes.
Generate/update invoice/quote in system (link to invoice) and mark action history.
AC5 — Dealing with Payments
If additional payment required:
Send customer email with amount due and a secure payment link.
On successful payment, record invoice and update job with paid status & action history.
If refund required:
Record refund type (cash / bank / credit)
If cash refund: mark refund recorded and send confirmation mail
Maintain proper audit history for refunds
AC6 — Notifications
When fieldstaff marks submitted_for_review: notify manager(s)/admins (email + in-app).
When manager approves/rejects: notify fieldstaff and customer (email + in-app).
All notifications include links to job and summary.
AC7 — Action History
Every action (submit for review, approve, payment events) is stored with:
Actor, timestamp, previous status, new status, changed values, notes, and related invoice/refund IDs.
AC8 — Validation
Actual quantities must be non-negative.
If any product is missing actual quantity, manager must be able to set it (but cannot set to null).
Calculations must be automatically computed and displayed prior to approval.
Related issues