← Back

Patch notes — Billing Staff payroll view (2026-06-15, commit `c999fe4`)

A Staff view under Billing (next to Time / Products) to track what to pay each person. On main, Docker smoke 157/0. Part of the billing line — see ../../ethica-no/billing/spec.md.


What it does ✅

  • /admin/billing/staff (billing-gated): every staff/admin with their hours for a week or month (default month, ◀ Previous / Next ▶, Week/Month toggle), split billable vs non-billable.
  • Per-staff cost rate — an editable “what we pay them per hour” field (new users.cost_rate_cents), so the table shows cost = hours × rate plus a grand total. That’s the amount to pay. Editing a rate is admin-only (it’s salary data) and audited; non-admin billing staff see rates read-only.
  • Export CSV (/admin/billing/staff.csv): one row per time entry — staff, date, company, ticket/project ref, description, hours, billable, cost rate, cost — for the period.

Why not native payroll

Norwegian payroll is regulated (tax tables, A-melding to Skatteetaten) and the open-source options are separate full apps on the wrong stack (Akaunting/Firefly = PHP, Frappe HR = Frappe framework, GnuCash = desktop). So Ethica doesn’t run payroll — it gives you clean hours + cost export to feed your accounting/payroll tool or hand to the accountant.

Verification

py_compile clean · Docker smoke 157/0 — Staff view renders, set-rate → 302, rate persisted, CSV export header.