diff --git a/atst/models/task_order.py b/atst/models/task_order.py index 64693831..7baef38d 100644 --- a/atst/models/task_order.py +++ b/atst/models/task_order.py @@ -1,4 +1,5 @@ from enum import Enum +from decimal import Decimal from sqlalchemy import Column, DateTime, ForeignKey, String from sqlalchemy.ext.hybrid import hybrid_property @@ -172,7 +173,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 * 75 / 100 + return self.total_obligated_funds * Decimal(0.75) @property def display_status(self): diff --git a/atst/routes/task_orders/index.py b/atst/routes/task_orders/index.py index a3d72cf7..e02780ca 100644 --- a/atst/routes/task_orders/index.py +++ b/atst/routes/task_orders/index.py @@ -28,5 +28,8 @@ def review_task_order(task_order_id): def portfolio_funding(portfolio_id): portfolio = Portfolios.get(g.current_user, portfolio_id) task_orders = TaskOrders.sort_by_status(portfolio.task_orders) + to_count = len(portfolio.task_orders) # TODO: Get expended amount from the CSP - return render_template("task_orders/index.html", task_orders=task_orders) + return render_template( + "task_orders/index.html", task_orders=task_orders, to_count=to_count + ) diff --git a/templates/task_orders/index.html b/templates/task_orders/index.html index dfabbd02..a272fade 100644 --- a/templates/task_orders/index.html +++ b/templates/task_orders/index.html @@ -15,45 +15,49 @@ {% macro TaskOrderList(task_orders, status) %}
- {{ task_order.start_date | formattedDate(formatter="%b %d, %Y") }} - - - {{ task_order.end_date | formattedDate(formatter="%b %d, %Y") }} -
+ {% call Accordion(title=("task_orders.status_list_title"|translate({'status': status})), id=status, heading_tag="h4") %} + {% if task_orders|length > 0 %} + {% for task_order in task_orders %} + {% set to_number %} + {% if task_order.number != "" %} + Task Order #{{ task_order.number }} + {% else %} + New Task Order + {% endif %} + {% endset %} ++ {{ task_order.start_date | formattedDate(formatter="%b %d, %Y") }} + - + {{ task_order.end_date | formattedDate(formatter="%b %d, %Y") }} +
+{{ task_order.total_contract_amount | dollars }}
+{{ task_order.total_obligated_funds | dollars }}
+{{ task_order.invoiced_funds | dollars }}
+{{ task_order.total_contract_amount | dollars }}
-{{ task_order.total_obligated_funds | dollars }}
-{{ task_order.invoiced_funds | dollars }}
-