Project and Manual Selections
Project and Manual Selections
Allowance rules combine three layers of input: client rules, project configuration, and entry selections.
Client rule
ClientAllowance defines what the allowance is:
- name
- default amount
- configured amount unit
- trigger type and config
- application mode
- EBA/EAB flags
- enabled/status state
Project configuration
Project allowance settings decide whether the client rule can apply to a project and can override rate/type.
Project applicability rules:
- If there is no project, no allowance applies.
- If
Project.allowances_datais empty, all active enabled client allowances are project-applicable. - If a project row matches the allowance by normalized name, the row's
applyvalue decides applicability. Missingapplydefaults to true. - If no project row matches,
project_flagallowances do not apply, but other trigger types can still apply.
This is subtle: project settings constrain project_flag allowances more tightly than other allowance types.
Project rate overrides
If a matching project allowance row contains rate, that rate overrides the client allowance amount. Currency symbols and other non-numeric characters are stripped before parsing.
Project variable type overrides
For project_variable allowances, the project row's type can determine the effective amount unit. Valid normalized project types include:
hourlydailyweeklydaily_or_weeklydaily or weekly
If no valid type is found, the allowance remains project_variable and uses manual-selection quantity behavior.
Manual and selectable allowances
Manual/selectable allowances are selected on a time entry. The calculator matches a selected row by name or label, normalized against ClientAllowance.name.
Quantity is read from the first numeric value among:
quantityhoursdaysunits
If none are present, quantity defaults to 1.0.
Portal behavior
The electrician portal builds allowance options from active, enabled client allowances. It excludes auto allowances from manual selection, because those are calculated after submission. Manual or selectable allowances are shown to the user and stored on entry data.