{% extends "accounting/layout.html" %}
{% load currency_filters %}

{% block content %}
    <h1 class="page-header">Tax Report <small>don't spend that money</small></h1>

    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">{{ form_title }}</h3>
        </div>
        <div class="panel-body">
            {% include "accounting/reports/_partials/period_form.html" with form=form %}
        </div>
    </div>

    <hr>

    <table class="table">
        <thead>
            <tr>
                <th>Tax Name</th>
                <th>Taxable Amount</th>
                <th>Taxes</th>
            </tr>
        </thead>
        {% for summary in tax_summaries %}
        <tbody>
            <tr class="empty-line"><td></td></tr>
            <tr>
                <td><strong>{{ summary.tax_rate }}</strong></td>
                <td></td>
                <td></td>
            <tr>
                <td>
                    <abbr href="#" data-toggle="tooltip" data-placement="top" title="The amount includes fully or partially paid invoices">
                        Collected
                    </abbr>
                </td>
                <td>{{ summary.taxable_amount|currency }}</td>
                <td>{{ summary.collected_taxes|currency }}</td>
            </tr>
            <tr>
                <td>Expenses</td>
                <td>{{ summary.expenses_amount|currency }}</td>
                <td>{{ summary.deductible_taxes|currency }}</td>
            </tr>
            <tr>
                <td>NET</td>
                <td>{{ summary.net_amount|currency }}</td>
                <td>{{ summary.net_taxes|currency }}</td>
            </tr>
        </tbody>
        {% endfor %}
    </table>
{% endblock content %}
