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
|
@property
|
||||||
def is_submitted(self):
|
def is_submitted(self):
|
||||||
|
|
||||||
return (
|
return (
|
||||||
self.number is not None
|
self.number is not None
|
||||||
and self.start_date is not None
|
and self.start_date is not None
|
||||||
and self.end_date is not None
|
and self.end_date is not None
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def is_active(self):
|
||||||
|
return self.status == Status.ACTIVE
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def status(self):
|
def status(self):
|
||||||
if self.is_submitted:
|
if self.is_submitted:
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
{{ Icon('info') }}
|
{{ Icon('info') }}
|
||||||
</button>
|
</button>
|
||||||
<span class='portfolio-header__budget--dollars'>
|
<span class='portfolio-header__budget--dollars'>
|
||||||
{{ portfolio.task_orders | sum(attribute='budget') | dollars }}
|
{{ portfolio.task_orders | selectattr('is_active') | sum(attribute='budget') | dollars }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user