
{% load i18n %}

<table>
    <thead>
        <tr>
            <th class="cell-number">{% trans '#' %}</th>
            <th>{% trans 'Service name' %}</th>
            <th>{% trans 'Code' %}</th>
            <th>{% trans 'Worker' %}</th>
            <th>{% trans 'Qty' %}</th>
            <th>{% trans 'Price' %}</th>
            <th>{% trans 'Sum' %}</th>
        </tr>
    </thead>
    <tbody>
        {% for item in services %}
            <tr>
                <td class="cell-number">{{ forloop.counter }}</td>
                <td>{{ item.name }}</td>
                <td>{{ item.code }}</td>
                <td>{{ item.worker|default:'' }}</td>
                <td>{{ item.qty }}</td>
                <td class="text-right">{{ item.price }}</td>
                <td class="text-right">{{ item.subtotal }}</td>
            </tr>
        {% endfor %}
    </tbody>
    <tfoot>
        <tr>
            <td class="cell-total" colspan="7">
                {% trans 'Total' %}: {{ sale.service_total }}
            </td>
        </tr>
    </tfoot>
</table>
