{% extends "account_keeping/base.html" %}
{% load i18n %}

{% block main %}
<div class="container">
    <h1>{% trans "Welcome to Django Account Keeping" %}</h1>
    <p>{% trans "Click at one of the main navigation items to start. Soon we will show the most important current stats on this page." %}</p>
    {% for account, stats in accounts_stats.items %}
        <h2>{{ account.name }} ({{ account.currency }})</h2>
        <p class="well"><strong>Current balance:</strong> {{ stats.balance_gross }}</p>
    {% endfor %}

    {% if transactions_without_invoice %}
        <h2>{% trans "Transactions without invoice" %}</h2>
        {% include "account_keeping/partials/transactions_table.html" with transactions=transactions_without_invoice %}
    {% endif %}

    {% if invoices_without_pdf %}
        <h2>{% trans "Invoices without PDF" %}</h2>
        {% include "account_keeping/partials/invoices_table.html" with invoices=invoices_without_pdf %}
    {% endif %}

    {% if unpaid_invoices_with_transactions %}
        <h2>{% trans "Unpaid Freckle invoices with transactions" %}</h2>
        {% for invoice in unpaid_invoices_with_transactions %}
            {{ invoice }}
        {% endfor %}
    {% endif %}
</div>
{% endblock %}
