Merge pull request #614 from dod-ccpo/budget-is-active-tos-only
Only include active Task Orders in portfolio budget
This commit is contained in:
commit
f461694c78
@ -106,13 +106,16 @@ class TaskOrder(Base, mixins.TimestampsMixin):
|
||||
|
||||
@property
|
||||
def is_submitted(self):
|
||||
|
||||
return (
|
||||
self.number is not None
|
||||
and self.start_date is not None
|
||||
and self.end_date is not None
|
||||
)
|
||||
|
||||
@property
|
||||
def is_active(self):
|
||||
return self.status == Status.ACTIVE
|
||||
|
||||
@property
|
||||
def status(self):
|
||||
if self.is_submitted:
|
||||
|
@ -20,7 +20,7 @@
|
||||
{{ Icon('info') }}
|
||||
</button>
|
||||
<span class='portfolio-header__budget--dollars'>
|
||||
{{ portfolio.task_orders | sum(attribute='budget') | dollars }}
|
||||
{{ portfolio.task_orders | selectattr('is_active') | sum(attribute='budget') | dollars }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user