{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
{{ message }}
{% endfor %}
{% endif %}
{% endwith %}
| id |
Date |
Ticker |
Exchange |
Currency |
FX |
Type |
Quantity |
Price |
Fees |
Proceeds |
Note |
|
{% for trade in trades %}
| {{ trade.id }} |
{{ trade.date_display }} |
{{ trade.ticker }} |
{{ exchange_names[trade.exchange] }} |
{{ trade.currency }} {{ currency_icons[trade.currency] }} |
{{ trade.fx or '' }} |
{% if trade.type == 'BUY' %}
{{ trade.type }} |
{% elif trade.type == 'SELL' %}
{{ trade.type }} |
{% else %}
{{ trade.type }} |
{% endif %}
{{ trade.quantity }} |
{{ trade.price }} |
{{ trade.fees }} |
{% if trade.type == 'BUY' %}
{{ "{:,.2f}".format((trade.price * -trade.quantity - trade.fees) | round(2)) }} |
{% elif trade.type == 'SELL' %}
{{ "{:,.2f}".format(trade.price * trade.quantity - trade.fees | round(2)) }} |
{% else %}
{{ "{:,.2f}".format(trade.price * -trade.quantity - trade.fees | round(2)) }} |
{% endif %}
{{ trade.note or '' }} |
Edit |
{% endfor %}