HIGH story-mileage-reimbursement-entry-peer-mentor-003 5 pts
5
Story Points
High
Priority
Mileage Reimbursement Entry
Feature

User Story

As a Peer Mentor (Likeperson)
I want to attach a photo of a receipt to my mileage or travel expense claim when the amount exceeds the organization's receipt threshold
So that my claim meets compliance requirements and is not rejected due to missing documentation

Audience Summaries

Receipt attachment compliance is not optional — HLF's accounting integration requires valid receipt documentation for claims exceeding NOK 100, and failure to enforce this at the point of entry creates downstream reconciliation failures and audit risk. This story automates the enforcement of that threshold, eliminating the need for coordinators to manually flag non-compliant submissions during review. The result is a faster, cleaner submission-to-reimbursement cycle that reduces administrative burden and improves financial control consistency across the organization. For peer mentors, the guided attachment flow removes ambiguity about when a receipt is required, reducing friction for users who may not be familiar with expense policy.

Mobile-optimized image compression ensures the feature is practical on low-bandwidth connections, supporting the real-world usage context of field-based peer mentors.

This story has high delivery complexity due to its multi-step conditional flow: threshold evaluation, camera/gallery integration, image compression, upload to receipt storage, and confirmation display. It depends on story-mileage-reimbursement-entry-peer-mentor-1 for the base claim context. Cross-functional coordination is needed with the mobile platform team (camera sheet/image picker APIs), the infrastructure team (receipt storage repository configuration), and finance/compliance stakeholders to confirm the NOK 100 threshold is org-configurable rather than hardcoded. Testing must cover: threshold trigger accuracy, camera sheet launch, gallery selection, compression verification, upload retry on network failure, receipt thumbnail display, and suppression of the prompt for below-threshold claims.

Rollout should include a review of the receipt storage repository's capacity and access control model before going live.

The implementation spans several layers: a threshold evaluation function comparing calculated claim amount against the org-configured receipt threshold, a conditional UI section that appears only when the threshold is exceeded, native camera sheet and image picker integration, a client-side image compression step (using a library such as react-native-image-resizer or equivalent) before upload, an async upload call to the receipt storage repository with retry logic on network failure, and a thumbnail-based attachment indicator in the claim summary. Form state must persist across the camera/gallery flow so no data is lost if the user navigates away and returns. The receipt storage repository interface must be defined and mockable for unit tests. Edge cases: upload timeout handling, partial upload recovery, and behavior when the camera permission is denied.

The threshold value must be read from org config, not hardcoded, to support multi-org deployments.

Acceptance Criteria

  • Given my mileage claim amount exceeds the configured receipt threshold for my organization, When I attempt to proceed to submission, Then I am prompted to attach a receipt before I can submit
  • Given I am prompted to attach a receipt, When I tap the attachment button, Then the receipt camera sheet opens and I can photograph the receipt or select from my gallery
  • Given I have captured a receipt image, When the image is processed, Then it is compressed by the receipt image compressor before being uploaded to the receipt storage repository
  • Given the receipt has been successfully attached, When I view the claim summary, Then the receipt attachment indicator is visible and shows a thumbnail of the attached image
  • Given my claim amount is below the receipt threshold, When I fill out the form, Then no receipt prompt is shown and the receipt attachment section is hidden or optional only
  • Given the receipt upload fails due to network error, When I am informed of the failure, Then I can retry the upload without losing the rest of the form data

Business Value

Receipt compliance is a hard requirement for HLF expense processing and directly affects whether claims can be submitted to the accounting integration. Automating the threshold check removes manual compliance burden from both peer mentors and coordinators, and ensures the organization's financial controls are enforced consistently at the point of entry rather than during manual review.