Remove extra details from expired TO display, small refactors in TO methods
This commit is contained in:
parent
2fe7d4bb5b
commit
4d7af1bab4
@ -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)
|
||||
|
@ -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):
|
||||
|
@ -26,30 +26,32 @@
|
||||
{% 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>
|
||||
<div class="row">
|
||||
<div class="col col--grow">
|
||||
<h5>
|
||||
Current Period of Performance
|
||||
</h5>
|
||||
<p>
|
||||
{{ task_order.start_date | formattedDate(formatter="%b %d, %Y") }}
|
||||
-
|
||||
{{ task_order.end_date | formattedDate(formatter="%b %d, %Y") }}
|
||||
</p>
|
||||
{% if status != 'Expired' -%}
|
||||
<div class="row">
|
||||
<div class="col col--grow">
|
||||
<h5>
|
||||
Current Period of Performance
|
||||
</h5>
|
||||
<p>
|
||||
{{ task_order.start_date | formattedDate(formatter="%b %d, %Y") }}
|
||||
-
|
||||
{{ task_order.end_date | formattedDate(formatter="%b %d, %Y") }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="col col--grow">
|
||||
<h5>Total Value</h5>
|
||||
<p>{{ task_order.total_contract_amount | dollars }}</p>
|
||||
</div>
|
||||
<div class="col col--grow">
|
||||
<h5>Total Obligated</h5>
|
||||
<p>{{ task_order.total_obligated_funds | dollars }}</p>
|
||||
</div>
|
||||
<div class="col col--grow">
|
||||
<h5>Total Expended</h5>
|
||||
<p>{{ task_order.invoiced_funds | dollars }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col col--grow">
|
||||
<h5>Total Value</h5>
|
||||
<p>{{ task_order.total_contract_amount | dollars }}</p>
|
||||
</div>
|
||||
<div class="col col--grow">
|
||||
<h5>Total Obligated</h5>
|
||||
<p>{{ task_order.total_obligated_funds | dollars }}</p>
|
||||
</div>
|
||||
<div class="col col--grow">
|
||||
<h5>Total Expended</h5>
|
||||
<p>{{ task_order.invoiced_funds | dollars }}</p>
|
||||
</div>
|
||||
</div>
|
||||
{%- endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endcall %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user