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

{% block content %}
    <h1 class="page-header">Pay Run Report <small>don't spend that money neither</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 table-striped table-bordered">
        <thead>
            <tr>
                <th>Employee</th>
                <th>Gross pay</th>
                <th>Payroll Tax Rate</th>
                <th class="text-right">Payroll Taxes</th>
            </tr>
        </thead>
        <tbody>
            {% for summary in summaries %}
            <tr>
                <td><strong>{{ summary.employee }}</strong></td>
                <td>{{ summary.total_excl_tax|currency }}</td>
                <td>{{ summary.payroll_tax_rate|percentage }}</td>
                <td class="text-right">{{ summary.payroll_taxes|currency }}</td>
            <tr>
            {% endfor %}
        </tbody>
    </table>

    <div class="row text-right">
        <div class="col-xs-2 col-xs-offset-8">
            <p>
                <strong>
                    Total Taxes : <br>
                </strong>
            </p>
        </div>
        <div class="col-xs-2">
            <strong>
                {{ total_payroll_taxes|currency }} <br>
            </strong>
        </div>
    </div>
{% endblock content %}
