Skip to main content
The Timesheet Billing Workflow manages time entry, approval, and billing for both payroll and client invoicing.

Overview

Flow: Time Entry -> Submission -> Approval -> Billing/Payroll
Key Files:
  • apps/workbooks-api/src/trpc/routers/timesheets.ts
  • packages/workbooks-db/src/schema/workbooks/timesheets.ts

Timesheet Status States


Workflow Diagram


Time Entry Methods

Timer

  • Start/Stop tracking
  • Real-time recording
  • Auto-save
  • Mobile app support

Manual Entry

  • Hours input
  • Bulk entry
  • Date range
  • Copy previous week

Calendar

  • Drag/drop
  • Schedule integration
  • Visual planning

Time Entry Types

Billable vs Non-Billable

Entry Categories


Timesheet Workflow

1

Time Entry

Employee records time using timer, manual entry, or calendar integration.
2

Weekly Aggregation

Entries are aggregated into weekly timesheets showing:
  • Daily breakdown
  • Total hours (regular, overtime)
  • Billable vs non-billable split
3

Submission

Employee submits timesheet for approval:
  • Timesheet locked for editing
  • Manager notified
  • Status: submitted
4

Approval

Manager reviews and either:
  • Timesheet approved
  • Ready for processing
  • Status: approved
5

Processing

Approved timesheets are processed for:
  • Payroll: Export hours, calculate pay
  • Billing: Add billable time to invoices
  • Reporting: Project costs, utilization

Rate Calculation

Rate Hierarchy

Overtime Calculation


Approval Workflow

Multi-Level Approval

Approval Actions


Invoice Integration

Adding Time to Invoice


Status Transitions

Allowed Transitions

Terminal State: Once a timesheet reaches billed status, no further transitions are allowed.

Reporting

Utilization Report

Project Cost Report


API Endpoints

Time Entry

Timesheet Management


Timer Component Integration


Testing

Timesheet Test Path

1

Start Timer

Create time entries via timer (start/stop)
2

Manual Entries

Create time entries manually
3

View Timesheet

View weekly timesheet aggregation
4

Submit

Submit timesheet for approval
5

Approve

Manager approves timesheet
6

Add to Invoice

Add billable time to invoice
7

Verify Billed

Verify timesheet marked “billed”
8

Export Payroll

Export payroll data

Integration Tests


Invoice Payment

Billing flow

Job Scheduler

Job-linked time

Status Reference

All status enums