Correct the way we get periods for invoices list

This commit is contained in:
PCoder 2019-04-22 11:40:00 +02:00
commit 1ccb4e9790
3 changed files with 10 additions and 8 deletions

View file

@ -30,8 +30,8 @@
<tr>
<td class="xs-td-inline" data-header="{% trans 'VM ID' %}">{{ invoice.order.vm_id }}</td>
<td class="xs-td-inline" data-header="{% trans 'IP Address' %}">{{ ips|get_value_from_dict:invoice.invoice_number|join:"<br/>" }}</td>
{% with line_items|get_value_from_dict:invoice.invoice_number as line_items_to_show %}
<td class="xs-td-inline" data-header="{% trans 'Period' %}">{{ period_start | date:'Y-m-d' }} &mdash; {{ period_end | date:'Y-m-d' }}</td>
{% with period|get_value_from_dict:invoice.invoice_number as period_to_show %}
<td class="xs-td-inline" data-header="{% trans 'Period' %}">{{ period_to_show.period_start | date:'Y-m-d' }} &mdash; {{ period_to_show.period_end | date:'Y-m-d' }}</td>
{% endwith %}
<td class="xs-td-inline" data-header="{% trans 'Amount' %}">{{ invoice.total_in_chf|floatformat:2|intcomma }}</td>
<td class="text-right last-td">