diff --git a/atst/domain/task_orders.py b/atst/domain/task_orders.py index 6a4f66a0..24acdee7 100644 --- a/atst/domain/task_orders.py +++ b/atst/domain/task_orders.py @@ -65,9 +65,7 @@ class TaskOrders(BaseDomainClass): @classmethod def sort_by_status(cls, task_orders): - by_status = {} - for status in SORT_ORDERING: - by_status[status.value] = [] + by_status = {status.value: [] for status in SORT_ORDERING} for task_order in task_orders: by_status[task_order.display_status].append(task_order) diff --git a/atst/models/task_order.py b/atst/models/task_order.py index 926824b9..64693831 100644 --- a/atst/models/task_order.py +++ b/atst/models/task_order.py @@ -172,7 +172,7 @@ class TaskOrder(Base, mixins.TimestampsMixin): @property def invoiced_funds(self): # TODO: implement this using reporting data from the CSP - return self.total_obligated_funds * 0.75 + return self.total_obligated_funds * 75 / 100 @property def display_status(self): diff --git a/templates/task_orders/index.html b/templates/task_orders/index.html index b9fed6da..dfabbd02 100644 --- a/templates/task_orders/index.html +++ b/templates/task_orders/index.html @@ -26,30 +26,32 @@ {% endset %}

{{ to_number }} {{ Icon("caret_right", classes="icon--tiny icon--primary" ) }}

-
-
-
- Current Period of Performance -
-

- {{ task_order.start_date | formattedDate(formatter="%b %d, %Y") }} - - - {{ task_order.end_date | formattedDate(formatter="%b %d, %Y") }} -

+ {% if status != 'Expired' -%} +
+
+
+ Current Period of Performance +
+

+ {{ task_order.start_date | formattedDate(formatter="%b %d, %Y") }} + - + {{ task_order.end_date | formattedDate(formatter="%b %d, %Y") }} +

+
+
+
Total Value
+

{{ task_order.total_contract_amount | dollars }}

+
+
+
Total Obligated
+

{{ task_order.total_obligated_funds | dollars }}

+
+
+
Total Expended
+

{{ task_order.invoiced_funds | dollars }}

+
-
-
Total Value
-

{{ task_order.total_contract_amount | dollars }}

-
-
-
Total Obligated
-

{{ task_order.total_obligated_funds | dollars }}

-
-
-
Total Expended
-

{{ task_order.invoiced_funds | dollars }}

-
-
+ {%- endif %}
{% endfor %} {% endcall %}