Merge branch 'staging' into datetime-to-pendulum

This commit is contained in:
graham-dds 2020-02-17 14:12:08 -05:00 committed by GitHub
commit 061af339e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 31 deletions

View File

@ -1,5 +1,4 @@
from enum import Enum from enum import Enum
from decimal import Decimal
from sqlalchemy import Column, DateTime, ForeignKey, String from sqlalchemy import Column, DateTime, ForeignKey, String
from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy.ext.hybrid import hybrid_property
@ -141,14 +140,6 @@ class TaskOrder(Base, mixins.TimestampsMixin):
def total_contract_amount(self): def total_contract_amount(self):
return sum((clin.total_amount for clin in self.clins if clin.total_amount)) return sum((clin.total_amount for clin in self.clins if clin.total_amount))
@property
def invoiced_funds(self):
# TODO: implement this using reporting data from the CSP
if self.is_active:
return self.total_obligated_funds * Decimal(0.75)
else:
return 0
@property @property
def display_status(self): def display_status(self):
if self.status == Status.UNSIGNED: if self.status == Status.UNSIGNED:

View File

@ -8,8 +8,8 @@
{% set expended_funds = task_order.invoiced_funds %} {% set expended_funds = task_order.invoiced_funds %}
<div> <div>
<section class="row"> <section class="usa-grid">
<div class='col col--grow summary-item'> <div class='usa-width-one-third summary-item'>
<h4 class="summary-item__header"> <h4 class="summary-item__header">
<span class="summary-item__header-text">{{ 'task_orders.summary.total' | translate }}</span> <span class="summary-item__header-text">{{ 'task_orders.summary.total' | translate }}</span>
{{ Tooltip(("task_orders.review.tooltip.total_value" | translate), title="", classes="icon-tooltip--tight") }} {{ Tooltip(("task_orders.review.tooltip.total_value" | translate), title="", classes="icon-tooltip--tight") }}
@ -18,7 +18,7 @@
{{ contract_amount | dollars }} {{ contract_amount | dollars }}
</p> </p>
</div> </div>
<div class='col col--grow summary-item'> <div class='usa-width-one-third summary-item'>
<h4 class="summary-item__header"> <h4 class="summary-item__header">
<span class="summary-item__header-text">{{ 'task_orders.summary.obligated' | translate }}</span> <span class="summary-item__header-text">{{ 'task_orders.summary.obligated' | translate }}</span>
{{ Tooltip(("task_orders.review.tooltip.obligated_funds" | translate), title="", classes="icon-tooltip--tight") }} {{ Tooltip(("task_orders.review.tooltip.obligated_funds" | translate), title="", classes="icon-tooltip--tight") }}
@ -27,15 +27,6 @@
{{ obligated_funds | dollars }} {{ obligated_funds | dollars }}
</p> </p>
</div> </div>
<div class='col col--grow summary-item'>
<h4 class="summary-item__header">
<span class="summary-item__header-text">{{ 'task_orders.summary.expended' | translate }}</span>
{{ Tooltip(("task_orders.review.tooltip.expended_funds" | translate), title="", classes="icon-tooltip--tight") }}
</h4>
<p class="summary-item__value--large">
{{ expended_funds | dollars }}
</p>
</div>
</section> </section>
<hr> <hr>
<section> <section>

View File

@ -34,8 +34,8 @@
<div class="accordion__content--list-item"> <div class="accordion__content--list-item">
<h4><a href="{{ url_for('task_orders.view_task_order', task_order_id=task_order.id) }}">{{ to_number }} {{ Icon("caret_right", classes="icon--tiny icon--primary" ) }}</a></h4> <h4><a href="{{ url_for('task_orders.view_task_order', task_order_id=task_order.id) }}">{{ to_number }} {{ Icon("caret_right", classes="icon--tiny icon--primary" ) }}</a></h4>
{% if status != 'Expired' -%} {% if status != 'Expired' -%}
<div class="row"> <div class="usa-grid">
<div class="col col--grow"> <div class="usa-width-one-fourth">
<h5> <h5>
Current Period of Performance Current Period of Performance
</h5> </h5>
@ -45,18 +45,14 @@
{{ task_order.end_date | formattedDate(formatter="%b %d, %Y") }} {{ task_order.end_date | formattedDate(formatter="%b %d, %Y") }}
</p> </p>
</div> </div>
<div class="col col--grow"> <div class="usa-width-one-fourth">
<h5>Total Value</h5> <h5>Total Value</h5>
<p>{{ task_order.total_contract_amount | dollars }}</p> <p>{{ task_order.total_contract_amount | dollars }}</p>
</div> </div>
<div class="col col--grow"> <div class="usa-width-one-fourth">
<h5>Total Obligated</h5> <h5>Total Obligated</h5>
<p>{{ task_order.total_obligated_funds | dollars }}</p> <p>{{ task_order.total_obligated_funds | dollars }}</p>
</div> </div>
<div class="col col--grow">
<h5>Total Expended</h5>
<p>{{ task_order.invoiced_funds | dollars }}</p>
</div>
</div> </div>
{%- endif %} {%- endif %}
</div> </div>

View File

@ -533,7 +533,6 @@ task_orders:
tooltip: tooltip:
obligated_funds: Funds committed to fund your portfolio. This may represent 100% of your total Task Order value, or a portion of it. obligated_funds: Funds committed to fund your portfolio. This may represent 100% of your total Task Order value, or a portion of it.
total_value: All obligated and projected funds for the Task Orders Base and Option CLINs. total_value: All obligated and projected funds for the Task Orders Base and Option CLINs.
expended_funds: All funds spent from the Task Order so far.
form: form:
add_clin: Add Another CLIN add_clin: Add Another CLIN
add_to_header: Enter the Task Order number add_to_header: Enter the Task Order number
@ -593,7 +592,6 @@ task_orders:
summary: summary:
obligated: Total Obligated obligated: Total Obligated
total: Total Value total: Total Value
expended: Total Expended
JEDICLINType: JEDICLINType:
JEDI_CLIN_1: "IDIQ CLIN 0001 Unclassified IaaS/PaaS" JEDI_CLIN_1: "IDIQ CLIN 0001 Unclassified IaaS/PaaS"
JEDI_CLIN_2: "IDIQ CLIN 0002 Classified IaaS/PaaS" JEDI_CLIN_2: "IDIQ CLIN 0002 Classified IaaS/PaaS"