{% extends "portfolios/base.html" %} {% from "components/alert.html" import Alert %} {% from "components/icon.html" import Icon %} {% from "components/empty_state.html" import EmptyState %} {% block portfolio_content %} {{ Alert("Budget Report for Portfolio " + portfolio.name, message="

Track your monthly and cumulative expenditures for your portfolio, applications, and environments below.

\

Please note that the projected spend is based on the average expense over the last three completed months and therefore does not account for future changes that might be made in scale or configuration of your cloud services.

", actions=[ {"label": "Learn More", "href": url_for('atst.helpdocs'), "icon": "info"} ] ) }}

Portfolio Total Spend

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

Task Order

Task Order Number
{{ legacy_task_order.number }}
Expires
{% if expiration_date %} {% else %} - {% endif %}
Remaining
{% if remaining_days is not none %} {{ remaining_days }} days {% else %} - {% endif %}
Manage Task Order
Contracting Officer
{{ jedi_request.contracting_officer_full_name }} {{ jedi_request.contracting_officer_email }}
{% 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.ADD_APPLICATION_IN_WORKSPACE) %} {% 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 spend per month

Spending scope {{ two_months_ago.strftime('%B %Y') }} {{ prev_month.strftime('%B %Y') }} {{ current_month.strftime('%B %Y') }} % of total spend this month
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 }}
{{ Icon('link') }}
{% endif %} {% endblock %}