wages/backend
jtricerolph fcea24b46a Fix timesheet sync: per-day fetch + shift.id dedup + dept_id filter
Key findings from diagnostic runs:
- timesheets/on/{date} returns only that DATE's shifts (not the whole
  week), so weekly-step fetch only samples 6 days of a 30-day month
- user.report_department_id filter too strict: only 32 staff have it
  set, missing many valid No 4 employees → £15k instead of £51k
- Correct approach: per-day fetch (all 30 days), dedup by shift.id
  (robust against any duplicate timesheet records), filter by
  shift.department_id → location_id (matches WF "by Location and Team")

Also includes inactive users (show_inactive=true) to catch staff who
left mid-month but still have timesheets in the date range.

Compare endpoint now shows baseCost (shift.cost) and oncostTotal
(shift.cost_with_oncosts) so we can confirm which matches WF's £51k.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-23 14:25:01 +00:00
..
src Fix timesheet sync: per-day fetch + shift.id dedup + dept_id filter 2026-07-23 14:25:01 +00:00
Dockerfile Initial scaffold: wages app 2026-07-23 09:03:52 +00:00
package.json Initial scaffold: wages app 2026-07-23 09:03:52 +00:00