Expense Store
Component Detail
Data Layer
medium complexity
backend
0
Dependencies
0
Dependents
1
Entities
0
Integrations
Description
Persistence layer for travel expense entries, their approval state, and links to the originating activity. Provides query access for downstream admin and reporting components.
expense-store
Sources & reasoning
Section 2.1 and the priority matrix mark travel expense registration as SHOULD HAVE in Phase 2 (Core Product) for HLF and Blindeforbundet, with explicit requirements for fixed expense types. Phase 5 roadmap also lists 'Reiserefusjonshåndtering' under Core Product.
-
docs/source/likeperson.md · line 40-42Begge organisasjoner har behov for registrering av kilometergodtgjørelse, bompenger, parkering og kollektivt. ... Faste valg for utleggstype - ikke fritekst - for å hindre feilkombinasjon (f.eks. både km og bussbillett).
-
docs/source/likeperson.md · line 98Reiserefusjon / utleggsregistrering | - | - | ✓ | ✓ | ✓ | SHOULD HAVE | 2
Responsibilities
- Persist expense records with type, amount, route, and activity link
- Track approval state transitions (pending, auto-approved, attested, rejected)
- Provide queries by user, coordinator queue, and activity
- Maintain referential integrity with activities and user roles
- Expose read access for Reimbursement Overview and Bufdir capture
Interfaces
insertExpense(record): ExpenseId
updateApprovalState(expenseId, state): void
findById(expenseId): Expense
findPendingByCoordinator(coordinatorId): Expense[]