{% load base_filters %}

{% trans 'Totals' %}

{% for item in results %} {% endfor %}
{% trans 'App' %} {% trans 'Count' %} {% trans 'Total' %} {% trans 'Payments' %} {% trans 'Balance' %}
{{ item.object_type }} {{ item.count }} {% trans 'invoices' %} {{ item.total__sum|format_currency }} {{ item.payments_credits__sum|format_currency }} {{ item.balance__sum|format_currency }}
{% trans 'TOTAL' %} {{ totals.count }} invoices {{ totals.total|format_currency }} {{ totals.payments_credits|format_currency }} {{ totals.balance|format_currency }}

{% trans 'The following apps had data for the selected date range and are included in this report. Click to jump to a specific section' %}:

    {% for item in results %}
  1. {{ item.object_type }}
  2. {% endfor %}
{% for item in results %}

{{ forloop.counter }}. {{ item.object_type }} {% trans 'Back to Top' %}

{% trans 'Count' %} {% trans 'Total' %} {% trans 'Payments' %} {% trans 'Balance' %}
{{ item.count }} {% trans 'invoices' %} {{ item.total__sum|format_currency }} {{ item.payments_credits__sum|format_currency }} {{ item.balance__sum|format_currency }}

{% blocktrans with t=item.object_type %}Invoices for {{ t }} sorted by Date{% endblocktrans %}

{% if item.is_membership %} {% elif item.is_donation %} {% else %}{% endif %} {% for invoice in item.invoices %} invoice.total %} pay-extra{% endif %} {% if invoice.payments_credits == invoice.total and invoice.balance == invoice.total and invoice.total > 0 %} all-match{% endif %}"> {% with invoice.get_object as invoice_object %} {% if invoice_object.event.pk %} {% elif item.is_membership %} {% elif item.is_donation %} {% elif invoice.title %} {% else %}{% endif %} {% endwith %} {% endfor %} {% if not item.invoices %} {% endif %} {% if item.is_membership %} {% elif item.is_donation %} {% else %}{% endif %}
{% trans 'ID' %} {% trans 'Date' %} {% trans 'Status' %} {% trans 'First Name' %} {% trans 'Last Name' %} {% trans 'Phone' %} {% trans 'Email' %}{% trans 'Member Type' %} {% trans 'Title' %} {% trans 'Payment Type' %}{% trans 'Title' %} {% trans 'Allocated To' %}{% trans 'Title' %}{% trans 'Total' %} {% trans 'Payments' %} {% trans 'Balance' %}
{{ invoice.id }} {{ invoice.create_dt|date:"SHORT_DATE_FORMAT" }} {% if invoice.is_tendered %}{% trans 'tendered' %}{% else %}{% trans 'estimate' %}{% endif %} {{ invoice.bill_to_first_name }} {{ invoice.bill_to_last_name }} {{ invoice.bill_to_phone }} {{ invoice.bill_to_email }}{{ invoice_object.event.pk }} - {{ invoice_object.event.title|truncatewords:"3" }}{{ invoice_object.membership_type }} {{ invoice.title }} {{ invoice_object.payment_method }}{{ invoice.title }} {{ invoice_object.allocation }}{{ invoice.title }}{{ invoice.total|format_currency }} {{ invoice.payments_credits|format_currency }} {{ invoice.balance|format_currency }}
{% trans 'No invoices found' %}
{% trans 'ID' %} {% trans 'Date' %} {% trans 'Status' %} {% trans 'First Name' %} {% trans 'Last Name' %} {% trans 'Phone' %} {% trans 'Email' %}{% trans 'Member Type' %} {% trans 'Title' %} {% trans 'Payment Type' %}{% trans 'Title' %} {% trans 'Allocated To' %}{% trans 'Title' %}{% trans 'Total' %} {% trans 'Payments' %} {% trans 'Balance' %}
{% blocktrans with c=item.count t=item.object_type %}Summary of {{ c }} invoices for {{ t }}{% endblocktrans %} {{ item.total__sum|format_currency }} {{ item.payments_credits__sum|format_currency }} {{ item.balance__sum|format_currency }}
{% endfor %}