{% extends 'invoices/layout.html' %} {% block body %}

Invoices



{{ invoice_table(invoices['pending_invoices'] ,'No pending invoices.', 'pending') }}
{{ invoice_table(invoices['sent_invoices'] ,'No delivered invoices.', 'sent') }}
{% endblock %} {% macro invoice_table(invoices ,no_invoice, status) %}
{% if invoices %}
{% if status=='sent' %} {% endif %} {% for invoice in invoices %} {% if status=='sent' %} {% endif %} {% endfor %}
Invoice ID Customer Created at Invoiced at Nr samplesPrice
{{ invoice.id }} {{ invoice.customer.internal_id}} - {{ invoice.customer.name }} {% if invoice.created_at!=None %}{{ invoice.created_at.strftime('%Y-%m-%d') }}{% endif %} {% if invoice.invoiced_at!=None %} {{ invoice.invoiced_at.strftime('%Y-%m-%d') }} {% endif %} {% if invoice.microbial_samples %}{{ invoice.microbial_samples|count }}{% else %}{{ invoice.samples|count }}{% endif %}{{ invoice.price }}
{% else %}
  • {{no_invoice}}
  • {% endif %}
    {% endmacro %} {% block scripts %} {% endblock %}