{% extends 'base.html' %} {% load i18n cashbook_extras %} {% block content %}

{% trans "Reports" %}

{% comment %} {% endcomment %}
{% trans "Date Filter" %}{% if date_label %}: {{ date_label }}{% endif %} ▾
{% trans "Share" %} {% if tab == 'yesterday' %} {% trans "Export Yesterday CSV" %} {% elif tab == 'customer' %} {% trans "Export Customer CSV" %} {% elif tab == 'supplier' %} {% trans "Export Supplier CSV" %} {% else %} {% trans "Export P&L CSV" %} {% endif %}
{% if tab == 'yesterday' %}

{% trans "Yesterday Sales" %} — {{ yesterday }}

{% trans "Total" %}: {{ yesterday_total }} {{ biz.currency|currency_label }}
{% for t in yesterday_sales %} {% empty %} {% endfor %}
{% trans "Date" %} {% trans "Account" %} {% trans "Category" %} {% trans "Amount" %} {% trans "Note" %}
{{ t.date }} {{ t.account.name }} {% if t.category %}{{ t.category.name }}{% endif %} {{ t.amount }} {{ t.currency|currency_label }} {{ t.description }}
{% trans "No sales yesterday." %}
{% elif tab == 'customer' %}

{% trans "Customer Statement" %}{% if customer %} — {{ customer.name }}{% endif %} — {{ start|date:'Y-m-d' }} {% trans "to" %} {{ end|date:'Y-m-d' }}

{% if customer %}
{% trans "Total In" %}: {{ customer_in_total }} {{ biz.currency|currency_label }}
{% trans "Total Out" %}: {{ customer_out_total }} {{ biz.currency|currency_label }}
{% trans "Receivable" %}: {{ customer_receivable }} {{ biz.currency|currency_label }}
{% for t in customer_qs %} {% empty %} {% endfor %}
{% trans "Date" %} {% trans "Type" %} {% trans "Account" %} {% trans "Category" %} {% trans "Amount" %} {% trans "Note" %}
{{ t.date }} {{ t.get_ttype_display }} {{ t.account.name }} {% if t.category %}{{ t.category.name }}{% endif %} {{ t.amount }} {{ t.currency|currency_label }} {{ t.description }}
{% trans "No transactions for this customer in range." %}
{% endif %}
{% elif tab == 'supplier' %}

{% trans "Supplier Statement" %}{% if supplier %} — {{ supplier.name }}{% endif %} — {{ start|date:'Y-m-d' }} {% trans "to" %} {{ end|date:'Y-m-d' }}

{% if supplier %}
{% trans "Total In" %}: {{ supplier_in_total }} {{ biz.currency|currency_label }}
{% trans "Total Out" %}: {{ supplier_out_total }} {{ biz.currency|currency_label }}
{% trans "Payable" %}: {{ supplier_payable }} {{ biz.currency|currency_label }}
{% for t in supplier_qs %} {% empty %} {% endfor %}
{% trans "Date" %} {% trans "Type" %} {% trans "Account" %} {% trans "Category" %} {% trans "Amount" %} {% trans "Note" %}
{{ t.date }} {{ t.get_ttype_display }} {{ t.account.name }} {% if t.category %}{{ t.category.name }}{% endif %} {{ t.amount }} {{ t.currency|currency_label }} {{ t.description }}
{% trans "No transactions for this supplier in range." %}
{% endif %}
{% else %}

{% trans "Profit & Loss" %} — {{ start|date:'Y-m-d' }} {% trans "to" %} {{ end|date:'Y-m-d' }}

{% trans "Income by Category" %}
{% for row in pl_income_rows %} {% empty %} {% endfor %}
{{ row.category__name }}{{ row.total }} {{ biz.currency|currency_label }}
{% trans "No income in range." %}
{% trans "Expense by Category" %}
{% for row in pl_expense_rows %} {% empty %} {% endfor %}
{{ row.category__name }}{{ row.total }} {{ biz.currency|currency_label }}
{% trans "No expense in range." %}
{% trans "Net" %}
{{ net }} {{ biz.currency|currency_label }}
{% endif %}
{% endblock %}