{% extends "base.html" %} {% block title %}Dashboard{% endblock %} {% block page_title %}Dashboard{% endblock %} {% block extra_css %} .fx-card { background: #0f172a; border-color: #1e293b; color: #f1f5f9; cursor: pointer; transition: all .2s; } .fx-card:hover { border-color: #3b82f6 !important; } .period-btn.active { background: #3b82f6; color: #fff; border-color: #3b82f6; } @keyframes spin { to { transform: rotate(360deg); } } {% endblock %} {% block topbar_actions %}
This Month Last Month
{% endblock %} {% block content %}
{{ period_label }}
{{ date_from.strftime('%b %d') }} – {{ date_to.strftime('%b %d, %Y') }}
Income Expense
Income
{{ total_income | currency }}
Expenses
{{ total_expense | currency }}
Net Cash Flow
{{ net_cash_flow | currency }}
Net Worth
{{ net_worth | currency }}
Cash Flow — Last 6 Months
Income Expenses
{% if fx %}
USD → VND
₫{{ "{:,.0f}".format(fx.rate) }}
1 USD · {{ fx.date.strftime('%b %d, %Y') }} · {{ fx.source }} {% if fx.is_stale %} ⚠ stale{% endif %}
{% else %}
USD → VND
Rate unavailable
{% endif %}
Top Spending
{% if top_categories %} {% set max_val = top_categories[0].total %} {% for cat in top_categories %}
{{ cat.name }} {{ cat.total | currency }}
{% endfor %} {% else %}

No expenses this period.

{% endif %}
{% if ai_insight %}
AI Daily Insight {{ ai_insight.insight_date.strftime('%b %d') }}
Ask AI →

{{ ai_insight.content }}

{% else %}
AI daily insight not yet generated.
Open AI
{% endif %}
Accounts
{% if accounts %} {% for acct in accounts %}
{{ acct.name }}
{{ acct.account_type | replace('_',' ') | title }}
{{ acct.balance | currency }}
{% endfor %}
Assets{{ total_assets | currency }}
Liabilities{{ total_liabilities | currency }}
{% else %}

No accounts. Add one.

{% endif %}
Recent Transactions View all
{% if recent_txns %} {% for txn in recent_txns %} {% endfor %}
DateDescriptionCategoryAmount
{{ txn.date.strftime('%b %d') }}
{{ txn.description }}
{{ txn.account.name if txn.account else '—' }}
{% if txn.category %} {{ txn.category.name }} {% else %}{% endif %} {% if txn.transaction_type=='income' %}+{% else %}-{% endif %}{{ txn.amount | currency }}
{% else %}

No transactions yet. Add one.

{% endif %}
{% endblock %} {% block extra_js %} {% endblock %}