{% extends "_layout.html" %} {% set active_page = 'holdings' %} {% import '_account_macros.html' as account_macros with context %} {% macro num_cell(value) -%} {% if value %}{{ value|format_currency }}{% endif %} {%- endmacro %} {% block content %}

Holdings

{% set holdings = api.holdings(aggregation_key) %}

{% if aggregation_key %}Holdings{% else %}Holdings{% endif %}

{% for key in ['account', 'currency', 'cost_currency'] %}

{% if not (aggregation_key == key) %}Holdings by {{key|replace('_',' ')|capitalize}}{% else %}Holdings by {{key|replace('_',' ')|capitalize}}{% endif %}

{% endfor %}
{% for holding in holdings %} {{ num_cell(holding.number) }} {{ num_cell(holding.cost_number) }} {{ num_cell(holding.price_number) }} {{ num_cell(holding.book_value) }} {{ num_cell(holding.market_value) }} {% endfor %}
Account Units Currency Cost Currency Average Cost Price Book Value Market Value
{{ account_macros.account_name(holding.account) }}{{ holding.currency}} {{ holding.cost_currency }}
{% endblock %}