{% extends "base.html" %} {% from "components/cards.html" import info_card, stat_card %} {% block content %}

{{ project.name }}

{{ _('Budget Analysis & Forecasting') }}

{{ _('Back to Dashboard') }} {{ _('View Project') }}

${{ "%.2f"|format(budget_status.budget_amount) }}

{{ _('Total Budget') }}

${{ "%.2f"|format(budget_status.consumed_amount) }}

{{ _('Consumed') }} ({{ "%.1f"|format(budget_status.consumed_percentage) }}%)

${{ "%.2f"|format(budget_status.remaining_amount|abs) }}

{% if budget_status.remaining_amount >= 0 %}{{ _('Remaining') }}{% else %}{{ _('Over Budget') }}{% endif %}

{% if budget_status.status == 'over_budget' %} {% elif budget_status.status == 'critical' %} {% elif budget_status.status == 'warning' %} {% else %} {% endif %}

{% if budget_status.status == 'over_budget' %}{{ _('Over Budget') }} {% elif budget_status.status == 'critical' %}{{ _('Critical') }} {% elif budget_status.status == 'warning' %}{{ _('Warning') }} {% else %}{{ _('Healthy') }}{% endif %}

{{ _('Status') }}

{{ _('Burn Rate Analysis') }}

{% if burn_rate %}
{{ _('Daily Burn Rate') }}

${{ "%.2f"|format(burn_rate.daily_burn_rate) }}

{{ _('Weekly Burn Rate') }}

${{ "%.2f"|format(burn_rate.weekly_burn_rate) }}

{{ _('Monthly Burn Rate') }}

${{ "%.2f"|format(burn_rate.monthly_burn_rate) }}

{{ _('Period Total') }}

${{ "%.2f"|format(burn_rate.period_total) }}

{{ _('Based on last') }} {{ burn_rate.period_days }} {{ _('days') }}

{% else %}


{{ _('No burn rate data available') }}

{% endif %}

{{ _('Completion Estimate') }}

{% if completion_estimate %} {% if completion_estimate.estimated_completion_date %}
{{ _('Estimated Completion Date') }}

{{ completion_estimate.estimated_completion_date }}

{{ completion_estimate.days_remaining }} {{ _('days remaining') }}

{{ _('Confidence Level') }} {{ completion_estimate.confidence|upper }}

{{ completion_estimate.message }}

{% else %}

{{ completion_estimate.message }}

{% endif %} {% else %}


{{ _('No completion estimate available') }}

{% endif %}
{% if cost_trends and cost_trends.periods %}

{{ _('Cost Trend Analysis') }}

{{ _('Trend') }}: {{ cost_trends.trend_direction|upper }} {{ _('Average') }}: ${{ "%.2f"|format(cost_trends.average_cost_per_period) }} {{ _('Change') }}: {{ "%.1f"|format(cost_trends.trend_percentage) }}%
{% endif %} {% if resource_allocation and resource_allocation.users %}

{{ _('Resource Allocation') }}

{{ _('Total Hours') }}

{{ "%.2f"|format(resource_allocation.total_hours) }}

{{ _('Total Cost') }}

${{ "%.2f"|format(resource_allocation.total_cost) }}

{{ _('Hourly Rate') }}

${{ "%.2f"|format(resource_allocation.hourly_rate) }}

{% for user in resource_allocation.users %} {% endfor %}
{{ _('Team Member') }} {{ _('Hours') }} {{ _('Cost') }} {{ _('Hours %') }} {{ _('Cost %') }} {{ _('Entries') }}
{{ user.username }} {{ "%.2f"|format(user.hours) }} ${{ "%.2f"|format(user.cost) }}
{{ "%.1f"|format(user.hours_percentage) }}%
{{ "%.1f"|format(user.cost_percentage) }}%
{{ user.entry_count }}
{% endif %} {% if alerts %}

{{ _('Active Alerts') }}

{% for alert in alerts %}
{% if alert.alert_level == 'critical' %} {% elif alert.alert_level == 'warning' %} {% else %} {% endif %}

{{ alert.alert_type|replace('_', ' ')|title }}

{{ alert.message }}

{{ _('Created') }}: {{ alert.created_at|user_datetime('%Y-%m-%d %H:%M') }}

{% endfor %}
{% endif %} {% endblock %}