{% extends "base.html" %}
{% block title %}Dashboard - Fin{% endblock %}
{% block content %}
{% if show_no_data %}
No accounts selected
Select one or more accounts using the filter above.
{% else %}
{% if current_period %}
{{ current_period.period_label }}
{% if period_type == 'this_month' %}
{% endif %}
{% if closed_period %}
Closed
{% endif %}
{% else %}
No data
{% endif %}
{% if all_accounts and all_accounts|length > 1 %}
{% set all_selected = not selected_accounts or selected_accounts|length == 0 or selected_accounts|length == all_accounts|length %}
{% for acc in all_accounts %}
{% set is_selected = all_selected or (acc['account_id'] in selected_accounts) %}
{% endfor %}
{% endif %}
{% if integrity_data and integrity_data.integrity_score < 0.8 %}
Some transactions need classification. The numbers below may be incomplete.Review items →
{% endif %}
{% if current_period %}
Cash Flow
{{ current_period.period_label }}
{% set max_amount = [current_period.income_cents, current_period.recurring_cents + current_period.discretionary_cents] | max %}
{% set income_width = 100 if max_amount > 0 else 0 %}
{% set expense_width = ((current_period.recurring_cents + current_period.discretionary_cents) / max_amount * 100) | int if max_amount > 0 else 0 %}