Add upcoming_obligated_funds property to portfolio
This commit is contained in:
@@ -100,6 +100,16 @@ class Portfolio(
|
||||
(task_order.total_obligated_funds for task_order in self.active_task_orders)
|
||||
)
|
||||
|
||||
@property
|
||||
def upcoming_obligated_funds(self):
|
||||
return sum(
|
||||
(
|
||||
task_order.total_obligated_funds
|
||||
for task_order in self.task_orders
|
||||
if task_order.is_upcoming
|
||||
)
|
||||
)
|
||||
|
||||
@property
|
||||
def funding_duration(self):
|
||||
"""
|
||||
|
||||
@@ -87,6 +87,10 @@ class TaskOrder(Base, mixins.TimestampsMixin):
|
||||
def is_expired(self):
|
||||
return self.status == Status.EXPIRED
|
||||
|
||||
@property
|
||||
def is_upcoming(self):
|
||||
return self.status == Status.UPCOMING
|
||||
|
||||
@property
|
||||
def clins_are_completed(self):
|
||||
return all([len(self.clins), (clin.is_completed for clin in self.clins)])
|
||||
|
||||
Reference in New Issue
Block a user