Fix TO index blank states and number type issue

This commit is contained in:
leigh-mil
2019-12-13 10:54:00 -05:00
parent 2edfecdd45
commit 2c2b69affe
4 changed files with 51 additions and 41 deletions

View File

@@ -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):

View File

@@ -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
)