Service Layer medium complexity backend
0
Dependencies
0
Dependents
3
Entities
0
Integrations

Description

Backend service that aggregates expense records across the organization to produce summary statistics for the overview dashboard. It computes totals by period, expense type, and organizational unit, and assembles data structures suitable for export to Xledger and the HLF Dynamics portal. It serves as the data backbone for the ReimbursementOverviewPage.

Feature: Reimbursement Overview

reimbursement-summary-service

Sources & reasoning

Line 72 explicitly names two accounting systems that must receive expense data, requiring an overview and export surface in the admin portal. Line 342 places reimbursement handling in Phase 2 (v1.0). Without a consolidated view, org admins cannot fulfill their accounting integration or Bufdir financial reporting obligations, making this feature necessary alongside the approval queue.

  • docs/source/likeperson.md · line 72
    API-integrasjon mot regnskapssystem (Xledger for Blindeforbundet, Dynamics-portal for HLF).
  • docs/source/likeperson.md · line 342
    Reiserefusjonshåndtering (faste valg, terskelbasert godkjenning)

Responsibilities

  • Aggregate approved and pending expense records by date range, type, and organizational unit
  • Compute historical trend data across configurable time periods
  • Generate export payloads in CSV, Xledger, and HLF Dynamics compatible formats
  • Apply organization-scoped data access controls to all aggregation queries
  • Cache summary results for frequently requested date ranges to reduce query load

Interfaces

getSummary(orgId: string, filters: OverviewFilters): Promise<ReimbursementOverviewData>
getBreakdownByType(orgId: string, period: DateRange): Promise<ExpenseTypeBreakdown[]>
getBreakdownByUnit(orgId: string, period: DateRange): Promise<OrgUnitBreakdown[]>
getTrends(orgId: string, periods: DateRange[]): Promise<TrendDataPoint[]>
exportReport(orgId: string, filters: OverviewFilters, format: ExportFormat): Promise<Buffer>

Related Data Entities (3)

Data entities managed by this component