Skip to main content

Module report

Module report 

Source

Modules§

activity
activity_groups
The activity report’s groups.N.name, groups.N.filter and groups.N.flip rows, as the editor shows them.
activity_query
The activity report’s reader: empty dates are this month so far, which the form then shows.
balance
balance_query
The balance report’s reader: an empty as-of is today, which the form then shows.
bookmark
Report URLs that keep their settings: the shell loads its content with its own query, and Generate pushes the query it ran.
category_breakdown
category_breakdown_csv
The category breakdown table as a CSV download.
category_breakdown_query
The category report’s reader: empty dates are this month so far, which the form then shows.
invalid
The 422 of a report whose query is invalid.
query
The report pages’ one reader: query pairs to the form’s values, then the report.
retired
Query parameters the report endpoints no longer read.

Structs§

ChartParams
Chart-specific query parameters shared across report chart handlers. chart_kind maps to rpc::chart::kind_or_default; chart_series is a report-specific toggle (e.g. Activity: show Net or not) parsed in each handler. renderer picks between server-side SVG (default) and client-side canvas.
SummaryCard
A single card in the top-of-report summary strip. is_net flags cards that show a signed net (e.g. Income − Expense) so templates can style them distinctly; highlight is a generic accent slot.
TableControlParams
Query-string fields shared by every report page to drive client-side table controls. The server only needs to read commodity_columns (which drives a template pivot) and forward collapsed_depth into the template for initial fold state; sort_by is consumed purely by the frontend WASM reorder logic, so the Rust handler does not parse it.

Enums§

SharedSort

Functions§

breakdown_row_amount_by_symbol
Breakdown equivalent of row_amount_by_symbol. Category Breakdown uses a flat row type (BreakdownRowView) rather than the tree ReportRowView.
chart_svg_response
The chart endpoints answer the SVG the spec draws.
commodity_symbols_in_rows
Collect the set of commodity symbols present across all rows, in the order the row-data first mentions them. Drives the “Commodities as columns” pivot: a stable column ordering without depending on the user’s commodity list.
encode_query
Minimal URL-query encoder for the (key, value) pairs the chart endpoints take. Avoids pulling in serde_urlencoded just to stringify a handful of params — keeps the handler simple.
parse_sort_order_shared
Parse the shared sort_order query param. Balance and Breakdown accept the same names; this keeps the URLs consistent between them. Unknown values fall back to AmountDesc so a stale URL still renders.
row_amount_by_symbol
Look up a row’s amount for the given commodity symbol. Called from the commodity-columns branch of the tree-table template.
sort_top_level_rows
Sort top-level rows in place according to order. Children ride with their parent — they’re adjacent in the flattened view and we preserve that adjacency by sorting on a key derived from each top-level row alone.
sum_top_level_amounts
Sum top-level rows’ amounts per commodity. Used by Balance to build its grand-total card(s).
wants_json