[][src]Function doublecount::sum_account_states

pub fn sum_account_states(
    account_states: &HashMap<AccountID, AccountState>,
    sum_commodity_type_id: CommodityTypeID,
    exchange_rate: Option<&ExchangeRate>
) -> Result<Commodity, AccountingError>

Sum the values in all the accounts into a single Commodity, and use the supplied exchange rate if required to convert a type of commodity in an account to the CommidityType associated with the id sum_commodity_type_id.