{% 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 }} 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 }} 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 %}

{% 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 payment=invoice.get_first_approved_payment %} {% endwith %} {% endfor %}
{% trans 'Inv. ID' %} {% trans 'Date' %} {% trans 'Status' %} {% trans 'First Name' %} {% trans 'Last Name' %} {% trans 'Phone' %} {% trans 'Email' %} {% trans 'Title' %} {% trans 'Payment ID' %} {% trans 'Payer' %} {% trans 'Transaction ID' %} {% 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 }} {% if invoice.get_object.event.pk %} {{ invoice.get_object.event.pk }} - {{ invoice.get_object.event.title|truncatewords:"3" }} {% elif invoice.get_object.membership_type %} {{ invoice.get_object.membership_type }} {% elif invoice.title %}{{ invoice.title }}{% endif %} {% if payment %} {{ payment.pk }} {% endif %} {{ payment.first_name }} {{ payment.last_name }} {{ payment.trans_id }}{{ invoice.total|format_currency }} {{ invoice.payments_credits|format_currency }} {{ invoice.balance|format_currency }}
{% trans 'Inv. ID' %} {% trans 'Date' %} {% trans 'Status' %} {% trans 'First Name' %} {% trans 'Last Name' %} {% trans 'Phone' %} {% trans 'Email' %} {% trans 'Title' %} {% trans 'Payment ID' %} {% trans 'Payer' %} {% trans 'Transaction ID' %} {% 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 %}