Remove unused imports and formatting, fake TaskOrder.invoiced_funds with hard coded percentage instead of random number

This commit is contained in:
leigh-mil
2019-12-10 11:30:05 -05:00
parent e772a4b84b
commit b49208ca57
4 changed files with 6 additions and 11 deletions

View File

@@ -1,12 +1,9 @@
from datetime import timedelta
from enum import Enum
import random
from sqlalchemy import Column, DateTime, ForeignKey, String
from sqlalchemy.ext.hybrid import hybrid_property
from sqlalchemy.orm import relationship
from atst.domain.csp.reports import MockReportingProvider
from atst.models.base import Base
import atst.models.types as types
import atst.models.mixins as mixins
@@ -175,8 +172,7 @@ class TaskOrder(Base, mixins.TimestampsMixin):
@property
def invoiced_funds(self):
# TODO: implement this using reporting data from the CSP
percentage_spent = random.randrange(50, 100)
return (self.total_obligated_funds * percentage_spent) / 100
return self.total_obligated_funds * 0.75
@property
def display_status(self):

View File

@@ -6,7 +6,6 @@ from atst.domain.portfolios import Portfolios
from atst.domain.task_orders import TaskOrders
from atst.forms.task_order import SignatureForm
from atst.models import Permissions
from atst.models.task_order import Status as TaskOrderStatus
@task_orders_bp.route("/task_orders/<task_order_id>/review")