Remove extra details from expired TO display, small refactors in TO methods

This commit is contained in:
leigh-mil 2019-12-12 14:57:49 -05:00
parent 2fe7d4bb5b
commit 4d7af1bab4
3 changed files with 27 additions and 27 deletions

View File

@ -65,9 +65,7 @@ class TaskOrders(BaseDomainClass):
@classmethod
def sort_by_status(cls, task_orders):
by_status = {}
for status in SORT_ORDERING:
by_status[status.value] = []
by_status = {status.value: [] for status in SORT_ORDERING}
for task_order in task_orders:
by_status[task_order.display_status].append(task_order)

View File

@ -172,7 +172,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 * 0.75
return self.total_obligated_funds * 75 / 100
@property
def display_status(self):

View File

@ -26,6 +26,7 @@
{% endset %}
<div class="accordion__content--list-item">
<h4><a href="{{ url_for('task_orders.review_task_order', task_order_id=task_order.id) }}">{{ to_number }} {{ Icon("caret_right", classes="icon--tiny icon--primary" ) }}</a></h4>
{% if status != 'Expired' -%}
<div class="row">
<div class="col col--grow">
<h5>
@ -50,6 +51,7 @@
<p>{{ task_order.invoiced_funds | dollars }}</p>
</div>
</div>
{%- endif %}
</div>
{% endfor %}
{% endcall %}