Travel & Expense Registration
Feature Detail
Description
Expense logging attached to an activity record, covering kilometre allowance, toll roads, parking, and public transport. The expense type selection uses a constrained set of options — not free text — with mutual exclusion rules that make logically incompatible combinations (e.g. km allowance and bus ticket for the same trip) technically impossible to submit simultaneously. This is a hard HLF requirement and should be implemented as a validation rule rather than a UI hint. Receipts above a configurable threshold (100 kr for HLF) require a photo attachment. Under a distance threshold (50 km for HLF) or when no expense is claimed, the record is auto-approved; above the threshold it enters a manual attestation queue visible to the coordinator. Blindeforbundet adds driver honoraria and a linked confidentiality declaration for drivers transporting clients.
Analysis
Replaces manual expense forms and reduces processing time for coordinators. Auto-approval below thresholds eliminates unnecessary coordinator bottlenecks for the majority of claims. Mutual-exclusion validation prevents duplicate reimbursement, which is a direct financial risk.
Expense types stored as a catalogue with an `exclusive_groups` field — types in the same group cannot be co-selected. Implement as a custom multi-select widget that enforces group exclusivity on selection. Receipt image captured via image_picker, uploaded to Supabase Storage, stored as URL reference on the expense record. Auto-approval logic runs server-side in a Supabase Edge Function triggered on insert. Dynamics and Xledger API integration scoped to Phase 3.
Components (213)
Shared Components
These components are reused across multiple features
User Interface (59)
Service Layer (52)
Data Layer (33)
Infrastructure (54)
User Stories (14)
As a As a Peer Mentor (Likeperson)
I want to review a full summary of my expense claim including all selected types, amounts, and attachments before I submit
So that I can verify the claim is correct and avoid submitting errors that require coordinator rejection and resubmission
- Given I have completed the expense form, when I tap 'Review', then a summary screen displays all expense line items with types, distances or amounts, and calculated reimbursement totals
- Given a receipt has been attached, when the summary screen loads, then a thumbnail preview of the receipt is shown alongside the relevant expense line
- Given the claim qualifies for auto-approval, when the summary screen is displayed, then a notice states 'This claim will be automatically approved'
- +3 more
As a As a Peer Mentor (Likeperson)
I want to register a driver honorarium fee and send a confidentiality declaration to the driver for acknowledgement
So that drivers who transport contacts are compensated correctly and the required privacy consent is formally documented
- Given the driver feature flag is enabled for my organization, when I open the expense registration screen, then a 'Driver Honorarium' option is available
- Given I select driver honorarium, when I fill in the registration form, then I can specify the driver, amount, and trip details
- Given I complete the honorarium form, when I tap 'Send Declaration', then a confidentiality declaration is sent to the driver via the configured channel and a pending status is shown
- +3 more
As a As a Peer Mentor (Likeperson)
I want to start and save an expense claim even when I have no internet connection, with automatic submission when connectivity is restored
So that I can register expenses immediately after a visit in areas with poor connectivity without losing my data
- Given I am offline, when I open the expense registration screen, then the form is fully functional and I can enter all expense details
- Given I complete an expense form while offline, when I tap 'Submit', then the claim is saved as a local draft and marked 'Pending Upload' in my expense list
- Given a draft exists and connectivity is restored, when the app detects network access, then the draft is automatically submitted to the server without requiring manual action
- +3 more
As a As a Coordinator
I want to review a full summary of my expense claim including all selected types, amounts, and attachments before I submit
So that I can verify the claim is correct and avoid submitting errors that require coordinator rejection and resubmission
- Given I have completed the expense form, when I tap 'Review', then a summary screen displays all expense line items with types, distances or amounts, and calculated reimbursement totals
- Given a receipt has been attached, when the summary screen loads, then a thumbnail preview of the receipt is shown alongside the relevant expense line
- Given the claim qualifies for auto-approval, when the summary screen is displayed, then a notice states 'This claim will be automatically approved'
- +3 more
As a As a Coordinator
I want to register a driver honorarium fee and send a confidentiality declaration to the driver for acknowledgement
So that drivers who transport contacts are compensated correctly and the required privacy consent is formally documented
- Given the driver feature flag is enabled for my organization, when I open the expense registration screen, then a 'Driver Honorarium' option is available
- Given I select driver honorarium, when I fill in the registration form, then I can specify the driver, amount, and trip details
- Given I complete the honorarium form, when I tap 'Send Declaration', then a confidentiality declaration is sent to the driver via the configured channel and a pending status is shown
- +3 more
As a As a Coordinator
I want to start and save an expense claim even when I have no internet connection, with automatic submission when connectivity is restored
So that I can register expenses immediately after a visit in areas with poor connectivity without losing my data
- Given I am offline, when I open the expense registration screen, then the form is fully functional and I can enter all expense details
- Given I complete an expense form while offline, when I tap 'Submit', then the claim is saved as a local draft and marked 'Pending Upload' in my expense list
- Given a draft exists and connectivity is restored, when the app detects network access, then the draft is automatically submitted to the server without requiring manual action
- +3 more
As a As a Peer Mentor (Likeperson)
I want to select from a predefined list of expense types that automatically prevents logically incompatible combinations
So that I cannot accidentally submit invalid claims (e.g. both mileage and a bus ticket for the same trip), reducing errors and rework
- Given I open the expense type selector, when the screen loads, then all available expense types for my organization are displayed as selectable options with clear labels
- Given I select 'Mileage reimbursement', when I attempt to also select 'Public transit', then the public transit option is disabled and a tooltip explains the mutual exclusion rule
- Given I select a valid combination (e.g. mileage + parking), when I proceed, then both expense types are included in the claim without error
- +3 more
As a As a Peer Mentor (Likeperson)
I want to photograph and attach a receipt to my expense claim directly from the app
So that I can document expenses above the receipt threshold without needing to scan or email receipts separately
- Given my expense amount exceeds the receipt threshold, when I view the expense form, then a receipt attachment section is displayed with a 'Required' indicator
- Given I tap 'Add Receipt', when the camera sheet opens, then I can take a new photo or select an existing image from my gallery
- Given I capture a photo, when the image is processed, then it is compressed to reduce file size and a thumbnail preview is shown for confirmation
- +3 more
As a As a Peer Mentor (Likeperson)
I want to see the current approval status of my submitted expense claims with a timeline of status changes
So that I can know when my claim has been approved and when to expect reimbursement without needing to contact my coordinator
- Given I have submitted an expense claim, when I view my expense history, then each claim shows a status badge indicating its current state
- Given I open a specific claim, when the detail view loads, then a status timeline is displayed showing each status change with timestamps
- Given a coordinator approves or rejects my claim, when the action is processed, then my app updates the claim status in real time without requiring a manual refresh
- +3 more
As a As a Peer Mentor (Likeperson)
I want to register a mileage reimbursement claim by entering my route and distance with a real-time cost preview
So that I can be compensated for travel costs without manually calculating rates or filling out paper forms
- Given I open the expense registration screen, when I select 'Mileage' as the expense type, then the mileage entry form is displayed with route input fields and a real-time reimbursement preview
- Given I enter a distance, when the organizational rate is loaded, then the total reimbursement amount is calculated and displayed immediately without requiring a manual submit
- Given the distance is below the auto-approval threshold and no other expenses are attached, when I submit, then the claim is automatically approved and I receive a confirmation
- +3 more
As a As a Coordinator
I want to select from a predefined list of expense types that automatically prevents logically incompatible combinations
So that I cannot accidentally submit invalid claims (e.g. both mileage and a bus ticket for the same trip), reducing errors and rework
- Given I open the expense type selector, when the screen loads, then all available expense types for my organization are displayed as selectable options with clear labels
- Given I select 'Mileage reimbursement', when I attempt to also select 'Public transit', then the public transit option is disabled and a tooltip explains the mutual exclusion rule
- Given I select a valid combination (e.g. mileage + parking), when I proceed, then both expense types are included in the claim without error
- +3 more
As a As a Coordinator
I want to photograph and attach a receipt to my expense claim directly from the app
So that I can document expenses above the receipt threshold without needing to scan or email receipts separately
- Given my expense amount exceeds the receipt threshold, when I view the expense form, then a receipt attachment section is displayed with a 'Required' indicator
- Given I tap 'Add Receipt', when the camera sheet opens, then I can take a new photo or select an existing image from my gallery
- Given I capture a photo, when the image is processed, then it is compressed to reduce file size and a thumbnail preview is shown for confirmation
- +3 more
As a As a Coordinator
I want to see the current approval status of my submitted expense claims with a timeline of status changes
So that I can know when my claim has been approved and when to expect reimbursement without needing to contact my coordinator
- Given I have submitted an expense claim, when I view my expense history, then each claim shows a status badge indicating its current state
- Given I open a specific claim, when the detail view loads, then a status timeline is displayed showing each status change with timestamps
- Given a coordinator approves or rejects my claim, when the action is processed, then my app updates the claim status in real time without requiring a manual refresh
- +3 more
As a As a Coordinator
I want to register a mileage reimbursement claim by entering my route and distance with a real-time cost preview
So that I can be compensated for travel costs without manually calculating rates or filling out paper forms
- Given I open the expense registration screen, when I select 'Mileage' as the expense type, then the mileage entry form is displayed with route input fields and a real-time reimbursement preview
- Given I enter a distance, when the organizational rate is loaded, then the total reimbursement amount is calculated and displayed immediately without requiring a manual submit
- Given the distance is below the auto-approval threshold and no other expenses are attached, when I submit, then the claim is automatically approved and I receive a confirmation
- +3 more