Skip to main content

flatten_activity_data

Function flatten_activity_data 

Source
pub fn flatten_activity_data(
    data: &ActivityData,
) -> Result<Vec<PeriodActivityView>, ReportError>
Expand description

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)).

ยงErrors

ReportError::AmountOverflow when an amount cannot be negated.