Pro Services Billing
I korthet
Pro Services Billing handles time-and-materials consulting engagements at a locked 150 EUR per hour rate, with quarter-hour TimeEntry precision, a 24-hour-per-day-per-consultant safety cap, an idempotent monthly billing job that aggregates submitted entries into one ProServiceInvoice per tenant, customer-facing visibility limited to submitted and invoiced entries with consultant identity hidden, and revenue strictly separated from subscription ARR through a dedicated revenue_category tag.
Så fungerar det
A ProServiceEngagement is the consulting contract scoped to one tenant: it pins the hourly rate at 150 EUR per hour, captures the estimated hour count and the billing contact. Time is recorded as TimeEntry rows with quarter-hour precision (multiples of 0.25); each entry moves through DRAFT (consultant's working state, never visible to the customer) -> SUBMITTED (locked for review, customer can see) -> INVOICED (rolled onto a ProServiceInvoice) or VOIDED. A safety guard caps any consultant at 24 hours per day across all engagements to catch data-entry errors.
Monthly invoicing runs as an idempotent job on the first of each month: it scans every tenant for SUBMITTED TimeEntries from the previous month, aggregates them per engagement, generates a ProServiceInvoice per tenant and flips the underlying TimeEntries to INVOICED. Idempotency means the job can be safely re-run without producing duplicate invoices. Financial separation is strict: every ProServiceEngagement, TimeEntry and ProServiceInvoice carries revenue_category = pro_services_consulting and is excluded from subscription ARR calculations — the platform's recurring-revenue metrics are not contaminated by one-off consulting income.
The customer-facing report exposes the customer's own SUBMITTED and INVOICED entries; consultant_user_id is hidden so the customer sees what they were billed for but not which individual consultant did the work, and DRAFT is never exposed. Admins get an Invoice preview before the monthly job runs so they can spot anomalies, and a separate Pro Services revenue report aggregates monthly and yearly totals separately from subscription revenue.
Centrala funktioner
- ProServiceEngagement scoped per tenant with locked 150 EUR per hour rate and estimated hours
- TimeEntry with quarter-hour precision, DRAFT -> SUBMITTED -> INVOICED/VOIDED lifecycle and 24h-per-day cap
- Idempotent monthly billing job that aggregates submitted entries and emits one ProServiceInvoice per tenant
- Strict financial separation: revenue_category pro_services_consulting excluded from subscription ARR
- Customer report showing submitted and invoiced entries with consultant identity hidden
- Admin preview of the next monthly batch before the job executes
- Standalone Pro Services revenue report separated from subscription ARR
I praktiken
A consultant logs three quarter-hours on Tuesday, 1.5 hours on Wednesday and 4.25 hours on Thursday against the federation's onboarding engagement; entries sit at DRAFT until she finishes and clicks Submit on Friday. The federation treasurer opens his Pro Services view and sees five hours and 45 minutes submitted at 150 EUR per hour against the engagement, with no consultant name shown. On the first of the next month the billing job runs, aggregates 23.5 hours from this and other engagements into one ProServiceInvoice for 3 525 EUR, marks the underlying TimeEntries as INVOICED and emails the treasurer.
The platform's ARR dashboard remains unaffected because revenue_category = pro_services_consulting is filtered out, while the Pro Services revenue report shows the new invoice in its own monthly total.
Features i detta subsystem
7| ID | Status | Funktioner |
|---|---|---|
| F08.11.01 | Levererad | ProServiceEngagement — scoped consulting assignment per tenant med låst timpris (€150/h), estimerat timantal och faktureringskontakt ✅ PL-T036 |
| F08.11.02 | Levererad | TimeEntry med kvartstimme-precision — DRAFT→SUBMITTED→INVOICED/VOIDED livscykel; max 24h per konsult per dag ✅ PL-T036 |
| F08.11.03 | Levererad | Månadsvis faktureringsjobb — idempotent jobb skapar ProServiceInvoice per tenant 1:a varje månad; markerar TimeEntries INVOICED ✅ PL-T036 |
| F08.11.04 | Levererad | Finansiell separation — revenue_category = "pro_services_consulting" på alla dokument; aldrig inkluderad i subscription ARR ✅ PL-T036 |
| F08.11.05 | Levererad | Kund-rapport — kunden ser egna SUBMITTED/INVOICED poster; consultant_user_id dold; DRAFT aldrig exponerat ✅ PL-T036 |
| F08.11.06 | Levererad | Faktura-förhandsgranskning — admin kan se nästa månads fakturor innan jobbet körs ✅ PL-T036 |
| F08.11.07 | Levererad | Pro Services revenue-rapport — månadsvis/årsvis rapport separerad från subscription ARR ✅ PL-T036 |