T1 Electrical SolutionsT1 Platform Docs
Allowance Matrix

Allowance Matrix Data Model

Allowance Matrix Data Model

client_allowances

Entity: App\Entity\ClientAllowance

FieldMeaning
clientOwning client.
allowanceDefinitionOptional link to a reusable definition/code.
nameDisplay and matching name. Matching normalizes case and non-alphanumeric characters.
amountDefault unit rate/amount. Can be null for project-variable allowances.
amountUnithourly, daily, weekly, daily_or_weekly, or project_variable.
triggerTypeOne of the AllowanceTriggerType enum values.
triggerConfigJSON rule config, such as thresholds, vehicle type, slug, weekly amount, taxable/billable flags.
triggerDescriptionHuman-readable reason. Used as output trigger reason if present.
applicationModeauto, selectable_timesheet, or manual.
ebaLinkedLegacy/linking flag.
isEabEAB display/calculation marker, included in snapshots and PDF labels.
enabledMust be true to calculate.
statusMust be active to calculate. archived rules are ignored.
notesAdmin notes.

Project.allowances_data

Project allowance rows are stored as JSON. They are used for project eligibility and project-specific overrides.

Common row keys:

KeyMeaning
nameAllowance name to match against ClientAllowance.name.
rateProject override rate. Currency symbols are stripped before parsing.
typeProject override amount type. Supports hourly, daily, weekly, and daily_or_weekly.
applyWhether this allowance is enabled for the project. Defaults to true when the row matches and apply is missing.

time_entries.allowances_data

Time-entry selections are submitted by electrician/client/admin entry forms and API payloads. They support strings or objects. The calculator accepts names from name or label, and quantities from quantity, hours, days, or units.

timesheet_allowance_lines

Entity: App\Entity\TimesheetAllowanceLine

FieldMeaning
timesheetOwning calculated timesheet.
timeEntryOptional entry. Current aggregate paths mostly set this to null and store matched entries in the snapshot.
clientAllowanceSource rule, nullable for historical survival if rule is deleted.
nameCopied allowance name.
codeOptional allowance definition code.
amountUnitEffective unit used for this calculation.
quantityCalculated quantity.
unitRateEffective rate after project override.
amountQuantity x unit rate.
triggerReasonConfigured trigger description or generated reason.
taxableFrom triggerConfig.taxable, default false.
billableFrom triggerConfig.billable, default true.
sourceSnapshotImmutable explanation of trigger type, application mode, config, amount unit, EAB flag, and matched metadata.

On this page