T1 Electrical SolutionsT1 Platform Docs
Allowance Matrix

Allowance Matrix Overview

Allowance Matrix Overview

The allowance matrix turns client allowance configuration, project eligibility, timesheet entries, and manual selections into calculated TimesheetAllowanceLine rows.

It is implemented by:

  • ClientAllowance for client-owned allowance rules.
  • Project.allowances_data for project-specific apply/rate/type settings.
  • TimeEntry.allowances_data for manual/selectable user selections.
  • AllowanceMatrixCalculator for calculation.
  • TimesheetAllowanceCalculationSubscriber for automatic refresh during persistence.
  • RecalculateTimesheetAllowancesCommand for manual backfills.
  • TimesheetAllowanceLine for stored results.

Why the matrix exists

Before the calculated matrix, allowance information could exist as manual entry metadata or project configuration. The calculated matrix provides a durable, auditable, recalculable output table:

client_allowances + project allowances_data + time_entries + selected allowances
    -> AllowanceMatrixCalculator
    -> timesheet_allowance_lines

What it does not do

The allowance matrix does not create project expense records. Allowances are stored as allowance lines, not as expense rows.

It also does not replace the award calculator. Instead, award calculation reads existing TimesheetAllowanceLine rows and includes them as award calculation lines.

Status boundary

Automatic allowance recalculation runs only for timesheets with status:

  • submitted
  • accepted
  • approved

Draft and rejected timesheets can hold manual input data, but subscribers do not persist calculated lines for them.

On this page