{% extends "portfolios/base.html" %} {% from "components/icon.html" import Icon %} {% from "components/empty_state.html" import EmptyState %} {% set secondary_breadcrumb = "navigation.portfolio_navigation.breadcrumbs.reports" | translate %} {% block portfolio_content %}

Portfolio Total Spend

{% set budget = portfolio_totals['budget'] %} {% set spent = portfolio_totals['spent'] %} {% set remaining = budget - spent %}
Budget
{{ budget | dollars }}
Remaining
{{ remaining | dollars }}

Total spending to date
{{ spent | dollars }}

Current Task Order

Task Order Number
{{ task_order.number }}

Expiration Date

{% if expiration_date %} {% else %} - {% endif %}
{{ Icon('cog') }} Manage Task Order
Remaining Days
{% if remaining_days is not none %} {{ Icon('arrow-down') }} {{ remaining_days }} {% else %} - {% endif %}

Contracting Officer
{% if task_order.ko_first_name and task_order.ko_last_name %} {{ task_order.ko_first_name }} {{ task_order.ko_last_name }} {% endif %}
{% if task_order.ko_email %} {{ Icon('envelope') }} {{ task_order.ko_email }} {% endif %}
{% set portfolio_totals = monthly_totals['portfolio'] %} {% set current_month_index = current_month.strftime('%m/%Y') %} {% set prev_month_index = prev_month.strftime('%m/%Y') %} {% set two_months_ago_index = two_months_ago.strftime('%m/%Y') %} {% set reports_url = url_for("portfolios.portfolio_reports", portfolio_id=portfolio.id) %} {% if not portfolio.applications %} {% set can_create_applications = user_can(permissions.CREATE_APPLICATION) %} {% set message = 'This portfolio has no cloud environments set up, so there is no spending data to report. Create an application with some cloud environments to get started.' if can_create_applications else 'This portfolio has no cloud environments set up, so there is no spending data to report. Contact the portfolio owner to set up some cloud environments.' %} {{ EmptyState( 'Nothing to report', action_label='Add a New Application' if can_create_applications else None, action_href=url_for('portfolios.new_application', portfolio_id=portfolio.id) if can_create_applications else None, icon='chart', sub_message=message ) }} {% else %}

Cumulative Budget

Monthly Spend
Monthly spend visual key
Accumulated Spend
Accumulated spend visual key
Projected
Projected monthly spend visual key
Projected accumulated spend visual key
{# spend/projected budget path lines #} {# max budget line #} {# make this clickable to focus on that month #}  |  {# container block #} {# budget bar #} {# projected budget bar #} {# task order expiration line #} {# task order expiration label #} T.O. Expires {# cumulative dot #} {# abbreviated cumulative label #} {# abbreviated spend label #} {# month label #} {# year label #} Total Budget

Total spent per month

Spending scope {{ two_months_ago.strftime('%B %Y') }} {{ prev_month.strftime('%B %Y') }} {{ current_month.strftime('%B %Y') }}
Portfolio Total {{ portfolio_totals.get(two_months_ago_index, 0) | dollars }} {{ portfolio_totals.get(prev_month_index, 0) | dollars }} {{ portfolio_totals.get(current_month_index, 0) | dollars }}
{% endif %}
{% endblock %}