{% set title = "Invoices: " + pi.name if pi else '' %}
{% set navigation = [('Admin', ''), ('Invoices', url_for_content('invoice_periods_list')), ('Per PI', '')] %}
{% include 'include_header.html' %}
{% set is_manager = current_user.is_manager %}
{% set period_url = 'invoice_period' if is_manager else 'reports_invoices_lab' %}
{% if is_manager %}
{% endif %}
Comment
Date
Cost
{# Bookings marker row #}
Entries
{# Then the other rows with real bookings info #}
{% for e in entries %}
{% if e['type'] == 'summary' %}
{% set row_class = "table-primary" %}
{% set row_style = "font-weight: bold" %}
{% elif e['type'] == 'transaction' %}
{% set row_class = "table-secondary" if e['amount'] > 0 else 'table-success' %}
{% endif %}
{{ e['id'] }} --- {{ e['title'] }}
{{ e['date']|pretty_date }}
{{ e['amount'] }}
{# Add empty row to separate each invoice period #}
{% if e['type'] == 'summary' %}