configuration PK: id 12 required 1 unique

Description

Organization-configurable catalog of allowed expense categories for reimbursement claims. Defines fixed choices with mutually exclusive constraints, receipt requirements, approval thresholds, and Bufdir eligibility flags to prevent invalid combinations and enforce per-organization reimbursement policy.

18
Attributes
3
Indexes
6
Validation Rules
10
CRUD Operations

Data Structure

Name Type Description Constraints
id uuid Primary key
PKrequiredunique
organization_id uuid Owning organization; expense types are per-tenant configuration
required
code string Machine-readable identifier used in API payloads and Bufdir export mapping (e.g. 'km_allowance', 'toll', 'parking', 'public_transit', 'driver_honorarium')
required
label string Display name shown in the Expense Type Selector UI (e.g. 'Kilometre Allowance', 'Toll Road', 'Parking', 'Public Transit')
required
description text Optional longer explanation shown as helper text in the mobile UI
-
requires_receipt boolean Whether a receipt photo is mandatory for this expense type. Overridden by amount_receipt_threshold_nok when a threshold applies.
required
amount_receipt_threshold_nok decimal Receipt becomes required when the submitted amount exceeds this threshold in NOK (e.g. 100.00 for HLF rule). NULL means requires_receipt flag governs unconditionally.
-
auto_approve_threshold_km decimal Distance in kilometres below which expenses of this type are auto-approved without manual attestation (e.g. 50.0 for HLF). NULL means no auto-approval by distance.
-
requires_distance_km boolean Whether the user must enter a distance in kilometres when selecting this type (true for km_allowance, false for fixed-cost types like toll/parking)
required
unit_rate_nok decimal Rate per kilometre in NOK applied when requires_distance_km is true (e.g. Norwegian state km rate). NULL for non-distance types.
-
mutual_exclusion_group string Slug identifying a group of mutually exclusive types. Within a single expense claim, only one type per group may be selected (enforces HLF rule: km_allowance and public_transit cannot be combined). NULL means no exclusion constraint.
-
requires_confidentiality_declaration boolean Whether selecting this type triggers a mandatory confidentiality declaration sign-off (true for driver_honorarium per Blindeforbundet rule)
required
bufdir_eligible boolean Whether expenses of this type count toward Bufdir grant-eligible reimbursement totals in exports
required
bufdir_expense_code string Bufdir-specific category code used when mapping this type to the Bufdir export schema. NULL if not applicable.
-
display_order integer Sort order for rendering in the Expense Type Selector UI
required
is_active boolean Soft-delete / visibility flag. Inactive types are hidden from the mobile selector but preserved for historical expense records.
required
created_at datetime Record creation timestamp (UTC)
required
updated_at datetime Last modification timestamp (UTC)
required

Database Indexes

idx_expense_types_org_code
btree unique

Columns: organization_id, code

idx_expense_types_org_active_order
btree

Columns: organization_id, is_active, display_order

idx_expense_types_mutual_exclusion_group
btree

Columns: organization_id, mutual_exclusion_group

Validation Rules

code_format error

Validation failed

unit_rate_required_for_distance_types error

Validation failed

threshold_non_negative error

Validation failed

label_non_empty error

Validation failed

bufdir_code_format warning

Validation failed

display_order_non_negative error

Validation failed

Business Rules

mutual_exclusion_enforced
on_create

Within a single expense submission, no two selected expense types may share the same mutual_exclusion_group. Prevents invalid combinations such as km_allowance + public_transit in the same claim.

receipt_required_by_threshold
on_create

If amount_receipt_threshold_nok is set and the submitted expense amount exceeds it, a receipt photo attachment is mandatory before the expense can be submitted. Implements the HLF >100 NOK receipt requirement.

auto_approve_under_distance_threshold
on_create

When auto_approve_threshold_km is set and the submitted distance is at or below that value, the resulting expense is auto-approved without entering the manual approval queue. Implements HLF <50 km auto-approval rule.

confidentiality_declaration_gate
on_create

When requires_confidentiality_declaration is true for the selected type, the user must complete and sign a confidentiality declaration before the expense can be submitted. Implements Blindeforbundet driver honorarium rule.

distance_required_when_flagged
on_create

When requires_distance_km is true, the distance_km field on the expense record must be provided and greater than zero.

inactive_type_not_selectable
always

Expense types with is_active = false must not be presented in the mobile selector. Existing expenses referencing deactivated types retain the reference for audit purposes.

org_scoped_type_access
always

A peer mentor may only select expense types belonging to their own organization_id. Cross-organization type access is prohibited.

Storage Configuration

Storage Type
lookup_table
Location
main_db
Partitioning
No Partitioning
Retention
Permanent Storage