{% load eo_facture %}
<div class="module" id="income">
    <table id="income-table" class="table">
    <caption>Chiffre d'affaire par an</caption>
        <thead>
            <tr>
                <th>Année</th>
                {% for i in income_by_year %}
                    <th>{{ i.year }}</th>
                {% endfor %}
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Encaissé</td>
                {% for i in income_by_year %}
                    <td>{{ i.paid|amountformat }}</td>
                {% endfor %}
            </tr>
            <tr>
                <td>Facturé</td>
                {% for i in income_by_year %}
                    <td>{{ i.invoiced|amountformat }}</td>
                {% endfor %}
            </tr>
            <tr>
                <td>Contracté</td>
                {% for i in income_by_year %}
                    <td>{{ i.contracted|amountformat }}</td>
                {% endfor %}
            </tr>
            <tr>
                <td>Souts-traité</td>
                {% for i in income_by_year %}
                    <td>{{ i.sous_traite|amountformat }}</td>
                {% endfor %}
            </tr>
            <tr>
                <td>Total</td>
                {% for i in income_by_year %}
                    <td>{{ i.total|amountformat }}</td>
                {% endfor %}
            </tr>
        </tbody>
    </table>
</div>

