Skip to main content

Module view

Module view 

Source
Expand description

View projections shared across report consumers.

Flattens ReportData / ActivityData / BreakdownData server responses into small row-oriented structs. Report table handlers, the chart adapters in the plotting crate, and the CLI all consume these instead of re-walking the tree.

Structs§

AmountView
BreakdownPeriodView
BreakdownRowView
GroupView
PeriodActivityView
ReportRowView

Functions§

flatten_activity_data
Flatten an ActivityData into per-period / per-group row lists with totals. flip_sign is applied to amounts and to the per-period net, following the convention documented in doc/reporting.org: Net = sum(group_total * (flip_sign ? +1 : -1)).
flatten_breakdown_data
Flatten a BreakdownData into per-period row lists. The uncategorized sentinel bucket is translated into is_uncategorized = true so consumers can render it differently without knowing the sentinel value.
flatten_report_data
Flatten a point-in-time or period-activity ReportData into a single row list. The outer PeriodData wrapper collapses because Balance always returns exactly one period.