{% from "partials/_macros.html" import amount, currency_symbol, category_row with context -%} {% if is_hx_request %} {% include "partials/_period_control.html" %}
{% if dashboard.transaction_last_synced_at %} {% else %} Awaiting sync {% endif %}
{% endif %} {%- set spending = dashboard.category_spending -%} {%- set accounts = dashboard.accounts -%} {%- set all_accounts = accounts.plaid_accounts + accounts.manual_accounts if accounts else [] -%} {%- set visible_accounts = all_accounts | selectattr('to_base') | list -%} {%- set account_total = namespace(value=0) -%} {%- for account in all_accounts -%} {%- if account.type in ['credit', 'loan'] -%} {%- set account_total.value = account_total.value - (account.to_base | abs) -%} {%- else -%} {%- set account_total.value = account_total.value + account.to_base -%} {%- endif -%} {%- endfor -%} {%- set net_income = spending.total_income - spending.total_spending if spending else 0 -%} {%- set savings_rate = ((net_income / spending.total_income) * 100) if spending and spending.total_income else none -%} {% if dashboard.unavailable_sections %}
Partial data {{ dashboard.unavailable_sections | join(', ') }} will return on the next refresh.
{% endif %} {% include "partials/_spending_workspace.html" %}