<div class="ibox">
<div class="ibox-title">
<h5>{{ 'SalesOverview' | trans }}</h5>
</div>
<div class="ibox-content">
{% set info = finance_service.salesSummary() %}
<table class="table table-striped table-bordered datatable desc" cellspacing="0" width="100%" id="example" >
<thead>
<tr>
<th data-priority="1">{{ 'User' | trans }}</th>
{% if widget.boolean1 == true %}
<th data-priority="1">{{ 'Leads.Open' | trans }}</th>
{% endif %}
<th data-priority="1">{{ 'Proposal.Open' | trans }}</th>
<th data-priority="1">{{ 'Proposal.Interview' | trans }}</th>
<th data-priority="1">{{ 'Contract.Active' | trans }}</th>
<th data-priority="1">{{ 'Contract.Actions' | trans }}</th>
</tr>
</thead>
<tbody>
{% for key,recruiter in info.recruiterarray %}
<tr>
<td>{{recruiter}}</td>
{% if widget.boolean1 == true %}
<td><a href="{{ path('lead_index', {'open':1, 'user':key}) }}" >{{info.openleadarray[key]}}</a></td>
{% endif %}
<td><a href="{{ path('proposal_index', {'open':1, 'user':key}) }}" >{{info.openproposalarray[key]}}</a></td>
<td><a href="{{ path('proposal_index', {'open':1, 'interview':1, 'user':key}) }}" >{{info.openinterviewarray[key]}}</a></td>
<td><a href="{{ path('contract_index', {'open':1, 'user':key}) }}" >{{info.activecontractarray[key]}} {%if info.activesecondarycontractarray[key] != 0 %} (+ {{info.activesecondarycontractarray[key]}}){%endif%}</a></td>
<td><a href="{{ path('contract_index', {'action':1, 'user':key}) }}" >{{info.actionrequiredcontractarray[key]}}</a></td>
</tr>
{% endfor %}
<tr>
<td> <b>Total</b></td>
{% if widget.boolean1 == true %}
<td><a href="{{ path('lead_index', {'open':1}) }}" >{{info.totalleads}}</a></td>
{% endif %}
<td><a href="{{ path('proposal_index', {'open':1}) }}" >{{info.totalproposals}}</a></td>
<td><a href="{{ path('proposal_index', {'open':1, 'interview':1}) }}" >{{info.totalinterviews}}</a></td>
<td><a href="{{ path('contract_index', {'open':1}) }}" >{{info.totalcontracts}}</a></td>
<td> <a href="{{ path('contract_index', {'action':1}) }}" >{{info.totalactionrequiredcontracts}}</a></td>
</tr>
</tbody>
</table>
</div>
</div>