Attach a Receipt to a Mileage Claim When Required
HLF requires receipt attachment for expenses above NOK 100. The app must evaluate the claim amount against the org-configured receipt threshold and, when exceeded, prompt the mentor to attach a receipt image using the camera sheet or image picker. The receipt should be compressed before upload to minimize data usage on mobile. An attachment indicator on the claim summary confirms the receipt was successfully attached. This flow must not be triggered unnecessarily for low-value claims where no receipt is required.
User Story
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.
Components
- Receipt Camera Sheet ui
- Receipt Thumbnail Preview Widget ui
- Receipt Attachment Indicator ui
- Receipt Attachment Service service
- Receipt Threshold Validator service
- Receipt Image Compressor service
- Receipt Storage Repository data
- Claim Receipt Repository data
- Receipt Image Picker Integration infrastructure
- Mileage Entry Form ui
- Expense Form BLoC service